Skip to content

Commit ebf3bac

Browse files
committed
Fix leaks in tests
1 parent 95816f5 commit ebf3bac

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

tests/src/core/testqgscomposermultiframe.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ void TestQgsComposerMultiFrame::addFrame()
9898
{
9999
QgsComposerHtml* htmlItem = new QgsComposerHtml( mComposition, false );
100100
QgsComposerFrame* frame1 = new QgsComposerFrame( mComposition, htmlItem, 0, 0, 100, 200 );
101+
htmlItem->addFrame( frame1 );
101102

102103
//should not be inherited
103104
frame1->setHidePageIfEmpty( true );

tests/src/core/testqgscomposertablev2.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -619,10 +619,10 @@ void TestQgsComposerTableV2::removeDuplicates()
619619

620620
//check if removing attributes in unique mode works correctly (should result in duplicate rows,
621621
//which will be stripped out)
622-
table->columns()->removeLast();
622+
delete table->columns()->takeLast();
623623
table->refreshAttributes();
624624
QCOMPARE( table->contents()->length(), 2 );
625-
table->columns()->removeLast();
625+
delete table->columns()->takeLast();
626626
table->refreshAttributes();
627627
QCOMPARE( table->contents()->length(), 1 );
628628
table->setUniqueRowsOnly( false );

0 commit comments

Comments
 (0)