| 297 | } |
| 298 | |
| 299 | static QWidget* checkAreaCommon(MainWindow* mw) |
| 300 | { |
| 301 | QVERIFY_RETURN(mw, {}); |
| 302 | Area *area = mw->area(); |
| 303 | checkToolViews(area); |
| 304 | RETURN_IF_TEST_FAILED({}); |
| 305 | |
| 306 | //check that all docks have their widgets |
| 307 | const auto toolDocks = mw->toolDocks(); |
| 308 | for (const auto* const dock : toolDocks) { |
| 309 | QVERIFY_RETURN(dock->widget(), {}); |
| 310 | } |
| 311 | QCOMPARE_RETURN(toolDocks.count(), area->toolViews().count(), {}); |
| 312 | |
| 313 | //check that mainwindow have all splitters and widgets in splitters inside centralWidget |
| 314 | QWidget *central = mw->centralWidget(); |
| 315 | QVERIFY_RETURN(central, {}); |
| 316 | QVERIFY_RETURN(central->inherits("QWidget"), {}); |
| 317 | |
| 318 | QWidget *splitter = central->findChild<QSplitter*>(); |
| 319 | QVERIFY_RETURN(splitter, {}); |
| 320 | QVERIFY_RETURN(splitter->inherits("QSplitter"), {}); |
| 321 | |
| 322 | return splitter; |
| 323 | } |
| 324 | |
| 325 | void TestAreaOperation::checkArea1(MainWindow* mw) |
| 326 | { |
no test coverage detected