fix uninitialized variable uses

I did a valgrind run to try and figure out why it OpenBoard crashes from
time to time, and found these two uninitialized variable uses.
preferencesAboutTextFull
Victor "multun" Collod 4 years ago
parent 853782394b
commit ab51a2eb24
  1. 1
      src/document/UBDocumentController.cpp
  2. 8
      src/domain/UBGraphicsStrokesGroup.cpp

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

@ -35,7 +35,10 @@
#include "core/memcheck.h"
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
| GF_RESPECT_RATIO
@ -49,9 +52,6 @@ UBGraphicsStrokesGroup::UBGraphicsStrokesGroup(QGraphicsItem *parent)
setFlag(QGraphicsItem::ItemSendsGeometryChanges, true);
setFlag(QGraphicsItem::ItemIsSelectable, true);
setFlag(QGraphicsItem::ItemIsMovable, true);
mDebugText = NULL;
debugTextEnabled = false; // set to true to get a graphical display of strokes' Z-levels
}
UBGraphicsStrokesGroup::~UBGraphicsStrokesGroup()

Loading…
Cancel
Save