Fix leaks in tests

This commit is contained in:
Nyall Dawson 2015-08-28 13:04:29 +10:00
parent 95816f589f
commit ebf3baccc2
2 changed files with 3 additions and 2 deletions

View File

@ -98,6 +98,7 @@ void TestQgsComposerMultiFrame::addFrame()
{
QgsComposerHtml* htmlItem = new QgsComposerHtml( mComposition, false );
QgsComposerFrame* frame1 = new QgsComposerFrame( mComposition, htmlItem, 0, 0, 100, 200 );
htmlItem->addFrame( frame1 );
//should not be inherited
frame1->setHidePageIfEmpty( true );

View File

@ -619,10 +619,10 @@ void TestQgsComposerTableV2::removeDuplicates()
//check if removing attributes in unique mode works correctly (should result in duplicate rows,
//which will be stripped out)
table->columns()->removeLast();
delete table->columns()->takeLast();
table->refreshAttributes();
QCOMPARE( table->contents()->length(), 2 );
table->columns()->removeLast();
delete table->columns()->takeLast();
table->refreshAttributes();
QCOMPARE( table->contents()->length(), 1 );
table->setUniqueRowsOnly( false );