Fixed memleak

The model was not being deleted when the table was, and thus we
recreated it for every print.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Tomaz Canabrava 2014-07-17 20:34:11 -03:00 committed by Dirk Hohndel
parent 426b640d2f
commit 30499fdb30

View file

@ -283,7 +283,7 @@ QTableView *PrintLayout::createProfileTable(ProfilePrintModel *model, const int
// resize
table->resize(tableW, profilePrintTableMaxH);
// hide the grid and set a stylesheet
table->setItemDelegate(new ProfilePrintDelegate(this));
table->setItemDelegate(new ProfilePrintDelegate(table));
table->setShowGrid(false);
table->setStyleSheet(
"QTableView { border: none }"