From 30499fdb30148edbf51c9f33964c18537badf148 Mon Sep 17 00:00:00 2001 From: Tomaz Canabrava Date: Thu, 17 Jul 2014 20:34:11 -0300 Subject: 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 Signed-off-by: Dirk Hohndel --- qt-ui/printlayout.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 }" -- cgit v1.2.3-70-g09d2