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

Method testRemoveModel

plugins/problemreporter/tests/test_problemsview.cpp:114–129  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

112}
113
114void TestProblemsView::testRemoveModel()
115{
116 // Remove the model
117 ProblemModelSet* pms = ICore::self()->languageController()->problemModelSet();
118 ProblemModel* model = pms->findModel(QStringLiteral("MODEL1_ID"));
119 QVERIFY(model);
120 pms->removeModel(QStringLiteral("MODEL1_ID"));
121 delete model;
122 model = nullptr;
123
124 // Now let's see if the view has been updated!
125 QTabWidget* tab = tabWidget();
126 QVERIFY(tab);
127 QCOMPARE(tab->count(), 1);
128 QCOMPARE(tab->tabText(0), QStringLiteral("MODEL2 (0)"));
129}
130
131void TestProblemsView::testAddRemoveProblems()
132{

Callers

nothing calls this directly

Calls 5

problemModelSetMethod · 0.80
languageControllerMethod · 0.80
findModelMethod · 0.80
removeModelMethod · 0.45
countMethod · 0.45

Tested by

no test coverage detected