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>
This commit is contained in:
Boris Barbulovski 2014-01-15 18:52:42 +01:00 committed by Dirk Hohndel
parent a27f67c026
commit 6cc65f5e1c
11 changed files with 18 additions and 15 deletions

View file

@ -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"));