Fix memory leak in QAbstractItemModel autotest.

The test was allocating a new model on the heap each time init() was
invoked, but none of these models were deleted.

Change-Id: Ibe107b2dbc949a5f72940f67c08f4b0f46256c09
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
This commit is contained in:
Jason McDonald 2012-01-04 13:29:42 +10:00 committed by Qt by Nokia
parent ca81ec03d6
commit f599b5cd30

View File

@ -59,6 +59,7 @@ class tst_QAbstractItemModel : public QObject
public slots:
void initTestCase();
void init();
void cleanup();
private slots:
void index();
@ -275,6 +276,11 @@ void tst_QAbstractItemModel::init()
insertCommand->doCommand();
}
void tst_QAbstractItemModel::cleanup()
{
delete m_model;
}
/*
tests
*/