aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2014-11-04 15:05:35 -0800
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-11-04 15:05:35 -0800
commitdef9e3fc1bb2370c9f614edb8c5380aabed49ce2 (patch)
tree5d20fdc0b3efe5bca8e8c63317e49d620450a6a2
parentc9e7528370e4eb4d8836b5deadb9d92ff0f4857c (diff)
downloadsubsurface-def9e3fc1bb2370c9f614edb8c5380aabed49ce2.tar.gz
Make sure we don't use the 'changed' flag uninitialized
Valgrind reported this while I was testing the previous commit. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r--qt-ui/models.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/qt-ui/models.cpp b/qt-ui/models.cpp
index 796397f77..64a5fd540 100644
--- a/qt-ui/models.cpp
+++ b/qt-ui/models.cpp
@@ -71,7 +71,9 @@ const QPixmap &trashIcon()
return *trashIconPixmap;
}
-CylindersModel::CylindersModel(QObject *parent) : rows(0)
+CylindersModel::CylindersModel(QObject *parent) :
+ rows(0),
+ changed(false)
{
// enum {REMOVE, TYPE, SIZE, WORKINGPRESS, START, END, O2, HE, DEPTH};
setHeaderDataStrings(QStringList() << "" << tr("Type") << tr("Size") << tr("Work press.") << tr("Start press.") << tr("End press.") << trUtf8("O" UTF8_SUBSCRIPT_2 "%") << tr("He%")
@@ -411,7 +413,9 @@ void CylindersModel::remove(const QModelIndex &index)
endRemoveRows();
}
-WeightModel::WeightModel(QObject *parent) : CleanerTableModel(parent), rows(0)
+WeightModel::WeightModel(QObject *parent) : CleanerTableModel(parent),
+ rows(0),
+ changed(false)
{
//enum Column {REMOVE, TYPE, WEIGHT};
setHeaderDataStrings(QStringList() << tr("") << tr("Type") << tr("Weight"));