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

Method toolDocumentRemoval

kdevplatform/sublime/tests/test_areaoperation.cpp:737–762  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

735}
736
737void TestAreaOperation::toolDocumentRemoval()
738{
739 MainWindow mw(m_controller);
740 m_controller->showArea(m_area1, &mw);
741 m_controller->showArea(m_area2, &mw);
742 compareAreas1and2(m_area1, m_area2, MainWindowAffinity::SameWindow);
743
744 auto* const toolView = findNamedView(m_area1->toolViews(), "toolview1.2.1");
745 RETURN_IF_TEST_FAILED();
746 const QPointer viewWidget = toolView->widget();
747 QVERIFY(viewWidget);
748
749 // Adapted from KDevelop::UiController::removeToolView():
750 auto* const document = toolView->document();
751 for (auto* const view : document->views()) {
752 for (auto* const area : m_controller->allAreas()) {
753 area->removeToolView(view);
754 }
755 }
756 emit m_controller->toolViewRemoved(document);
757
758 // the tool view widget must be destroyed when its tool view is completely removed
759 QCOMPARE_EQ(viewWidget, nullptr);
760
761 delete document;
762}
763
764void TestAreaOperation::testAddingViewAfter()
765{

Callers

nothing calls this directly

Calls 8

compareAreas1and2Function · 0.85
findNamedViewFunction · 0.85
showAreaMethod · 0.80
allAreasMethod · 0.80
widgetMethod · 0.45
documentMethod · 0.45
viewsMethod · 0.45
removeToolViewMethod · 0.45

Tested by

no test coverage detected