diff options
author | Boris Barbulovski <bbarbulovski@gmail.com> | 2014-01-15 18:52:42 +0100 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2014-01-16 12:15:47 +0700 |
commit | 6cc65f5e1cf1eb0c870323d4c19e2d5c9cc9fd11 (patch) | |
tree | 424ad29366d0ac0a09be8540b365342aca7f27dd /qt-ui/models.cpp | |
parent | a27f67c02612791fad73b4e0550d942dc3a5a339 (diff) | |
download | subsurface-6cc65f5e1cf1eb0c870323d4c19e2d5c9cc9fd11.tar.gz |
Fix some memory leaks.
Memory leaks were caused by broken parent/child relations.
Signed-off-by: Boris Barbulovski <bbarbulovski@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/models.cpp')
-rw-r--r-- | qt-ui/models.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/qt-ui/models.cpp b/qt-ui/models.cpp index cddd4ed2e..06bb95281 100644 --- a/qt-ui/models.cpp +++ b/qt-ui/models.cpp @@ -31,7 +31,7 @@ QFont defaultModelFont() return font; } -CleanerTableModel::CleanerTableModel(): QAbstractTableModel() +CleanerTableModel::CleanerTableModel(QObject *parent): QAbstractTableModel(parent) { } @@ -343,7 +343,7 @@ void CylindersModel::remove(const QModelIndex& index) endRemoveRows(); } -WeightModel::WeightModel(QObject* parent): current(0), rows(0) +WeightModel::WeightModel(QObject* parent): CleanerTableModel(parent), current(0), rows(0) { //enum Column {REMOVE, TYPE, WEIGHT}; setHeaderDataStrings(QStringList() << tr("") << tr("Type") << tr("Weight")); |