MCPcopy Create free account
hub / github.com/KDE/kdevelop / checkAreaCommon

Function checkAreaCommon

kdevplatform/sublime/tests/test_areaoperation.cpp:299–323  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

297}
298
299static 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
325void TestAreaOperation::checkArea1(MainWindow* mw)
326{

Callers 2

checkArea1Method · 0.85
checkArea2Method · 0.85

Calls 5

checkToolViewsFunction · 0.85
toolDocksMethod · 0.80
areaMethod · 0.45
widgetMethod · 0.45
countMethod · 0.45

Tested by

no test coverage detected