Fix leak in tst_qquicklistmodel unit test
authorChris Adams <christopher.adams@nokia.com>
Mon, 12 Mar 2012 03:39:45 +0000 (13:39 +1000)
committerQt by Nokia <qt-info@nokia.com>
Tue, 13 Mar 2012 01:02:49 +0000 (02:02 +0100)
Change-Id: I6883f263648d425240503f6abbd358b744d68506
Reviewed-by: Glenn Watson <glenn.watson@nokia.com>

tests/auto/qml/qquicklistmodel/tst_qquicklistmodel.cpp

index 8d62376..bf26452 100644 (file)
@@ -990,6 +990,8 @@ void tst_qquicklistmodel::get_worker()
     QCOMPARE(spyResult.at(0).toInt(), index);
     QCOMPARE(spyResult.at(1).toInt(), 1);  // only 1 item is modified at a time
     QVERIFY(spyResult.at(2).value<QList<int> >().contains(role));
+
+    delete item;
 }
 
 void tst_qquicklistmodel::get_worker_data()