Merge pull request #324 from multun/valgrind-ub

fix a number of uninitialized variable uses
preferencesAboutTextFull
kaamui 4 years ago committed by GitHub
commit ee5880040d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      src/document/UBDocumentController.cpp
  2. 1
      src/domain/UBGraphicsDelegateFrame.cpp
  3. 3
      src/domain/UBGraphicsScene.cpp
  4. 8
      src/domain/UBGraphicsStrokesGroup.cpp

@ -345,6 +345,7 @@ UBDocumentTreeNode *UBDocumentTreeNode::previousSibling()
UBDocumentTreeModel::UBDocumentTreeModel(QObject *parent) : UBDocumentTreeModel::UBDocumentTreeModel(QObject *parent) :
QAbstractItemModel(parent) QAbstractItemModel(parent)
, mRootNode(0) , mRootNode(0)
, mCurrentNode(nullptr)
{ {
UBDocumentTreeNode *rootNode = new UBDocumentTreeNode(UBDocumentTreeNode::Catalog, "root"); UBDocumentTreeNode *rootNode = new UBDocumentTreeNode(UBDocumentTreeNode::Catalog, "root");

@ -67,6 +67,7 @@ UBGraphicsDelegateFrame::UBGraphicsDelegateFrame(UBGraphicsItemDelegate* pDelega
, mFlippedY(false) , mFlippedY(false)
, mMirrorX(false) , mMirrorX(false)
, mMirrorY(false) , mMirrorY(false)
, mResizing(false)
, mTitleBarHeight(hasTitleBar ? 20 :0) , mTitleBarHeight(hasTitleBar ? 20 :0)
, mNominalTitleBarHeight(hasTitleBar ? 20:0) , mNominalTitleBarHeight(hasTitleBar ? 20:0)
{ {

@ -336,8 +336,9 @@ UBGraphicsScene::UBGraphicsScene(UBDocumentProxy* parent, bool enableUndoRedoSta
, magniferDisplayViewWidget(0) , magniferDisplayViewWidget(0)
, mZLayerController(new UBZLayerController(this)) , mZLayerController(new UBZLayerController(this))
, mpLastPolygon(NULL) , mpLastPolygon(NULL)
, mCurrentPolygon(0)
, mTempPolygon(NULL) , mTempPolygon(NULL)
, mDrawWithCompass(false)
, mCurrentPolygon(0)
, mSelectionFrame(0) , mSelectionFrame(0)
{ {
UBCoreGraphicsScene::setObjectName("BoardScene"); UBCoreGraphicsScene::setObjectName("BoardScene");

@ -35,7 +35,10 @@
#include "core/memcheck.h" #include "core/memcheck.h"
UBGraphicsStrokesGroup::UBGraphicsStrokesGroup(QGraphicsItem *parent) UBGraphicsStrokesGroup::UBGraphicsStrokesGroup(QGraphicsItem *parent)
:QGraphicsItemGroup(parent), UBGraphicsItem() : QGraphicsItemGroup(parent)
, UBGraphicsItem()
, debugTextEnabled(false) // set to true to get a graphical display of strokes' Z-levels
, mDebugText(nullptr)
{ {
setDelegate(new UBGraphicsItemDelegate(this, 0, GF_COMMON setDelegate(new UBGraphicsItemDelegate(this, 0, GF_COMMON
| GF_RESPECT_RATIO | GF_RESPECT_RATIO
@ -49,9 +52,6 @@ UBGraphicsStrokesGroup::UBGraphicsStrokesGroup(QGraphicsItem *parent)
setFlag(QGraphicsItem::ItemSendsGeometryChanges, true); setFlag(QGraphicsItem::ItemSendsGeometryChanges, true);
setFlag(QGraphicsItem::ItemIsSelectable, true); setFlag(QGraphicsItem::ItemIsSelectable, true);
setFlag(QGraphicsItem::ItemIsMovable, true); setFlag(QGraphicsItem::ItemIsMovable, true);
mDebugText = NULL;
debugTextEnabled = false; // set to true to get a graphical display of strokes' Z-levels
} }
UBGraphicsStrokesGroup::~UBGraphicsStrokesGroup() UBGraphicsStrokesGroup::~UBGraphicsStrokesGroup()

Loading…
Cancel
Save