From def9e3fc1bb2370c9f614edb8c5380aabed49ce2 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Tue, 4 Nov 2014 15:05:35 -0800 Subject: 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 --- qt-ui/models.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'qt-ui') 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")); -- cgit v1.2.3-70-g09d2