| 100 | } |
| 101 | |
| 102 | void TestDocument::viewDeletion() |
| 103 | { |
| 104 | Controller controller; |
| 105 | Document *doc = new ToolDocument(QStringLiteral("tool"), &controller, new SimpleToolWidgetFactory<QTextEdit>(QStringLiteral("tool"))); |
| 106 | |
| 107 | View *view = doc->createView(); |
| 108 | QVERIFY(view->initializeWidget(nullptr)); |
| 109 | QCOMPARE(doc->views().count(), 1); |
| 110 | |
| 111 | delete view; |
| 112 | QCOMPARE(doc->views().count(), 0); |
| 113 | } |
| 114 | |
| 115 | QTEST_MAIN(TestDocument) |
| 116 |
nothing calls this directly
no test coverage detected