controlpanelplugins/themeplugin/tsrc/unit/unittest_cpthemelistview/unittest_cpthemelistview.cpp
equal
deleted
inserted
replaced
60 QVERIFY( listView->themeList() != 0 ); |
60 QVERIFY( listView->themeList() != 0 ); |
61 |
61 |
62 delete listView; |
62 delete listView; |
63 } |
63 } |
64 |
64 |
65 // no getter so this is basically a NULL test. |
|
66 void TestCpThemeListView::testSetModel() |
65 void TestCpThemeListView::testSetModel() |
67 { |
66 { |
68 CpThemeListView *listView = new CpThemeListView(); |
67 CpThemeListView *listView = new CpThemeListView(); |
69 QStandardItemModel *model = new QStandardItemModel(this); |
68 QStandardItemModel *model = new QStandardItemModel(this); |
70 |
69 |
71 listView->setModel(model); |
70 listView->setModel(model); |
|
71 QVERIFY(listView->themeList()->model() == model); |
72 |
72 |
73 // model shouldn't be deleted because it is a QObject with a parent. |
73 // model shouldn't be deleted because it is a QObject with a parent. |
74 |
74 |
75 delete listView; |
75 delete listView; |
76 } |
76 } |