summaryrefslogtreecommitdiffstats
path: root/qt-ui
diff options
context:
space:
mode:
authorGravatar Tomaz Canabrava <tomaz.canabrava@intel.com>2014-07-17 20:34:11 -0300
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-07-18 10:14:27 -0700
commit30499fdb30148edbf51c9f33964c18537badf148 (patch)
tree151dcc0658d9daf0d6045ccb27d10eb31ed72f26 /qt-ui
parent426b640d2f65dfe9345481f23d0bd49ce616e460 (diff)
downloadsubsurface-30499fdb30148edbf51c9f33964c18537badf148.tar.gz
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>
Diffstat (limited to 'qt-ui')
-rw-r--r--qt-ui/printlayout.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/qt-ui/printlayout.cpp b/qt-ui/printlayout.cpp
index 51b44c0ac..8b4d4ab45 100644
--- a/qt-ui/printlayout.cpp
+++ b/qt-ui/printlayout.cpp
@@ -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 }"