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

Method reopenWhileLoading

kdevplatform/shell/tests/test_projectcontroller.cpp:264–279  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

262}
263
264void TestProjectController::reopenWhileLoading()
265{
266 // Open the same project again while the first is still
267 // loading. The second open request should be blocked.
268 m_projCtrl->setDialogProvider(new DialogProviderFake);
269 auto spy = createOpenedSpy();
270 m_projCtrl->openProject(m_projFilePath.toUrl());
271 //m_projCtrl->openProject(m_projFilePath.toUrl());
272 WAIT_FOR_OPEN_SIGNAL;
273 // wait a bit for a second signal, this should timeout
274 QSignalSpy signal(m_projCtrl, SIGNAL(projectOpened(KDevelop::IProject*)));
275 QVERIFY2(!signal.wait(100), "Received 2 projectOpened signals.");
276 QCOMPARE(m_projCtrl->projectCount(), 1);
277 auto* proj = assertProjectOpened(m_projName);
278 assertSpyCaughtProject(spy.get(), proj);
279}
280
281void TestProjectController::openMultiple()
282{

Callers

nothing calls this directly

Calls 6

setDialogProviderMethod · 0.80
waitMethod · 0.80
projectCountMethod · 0.80
openProjectMethod · 0.45
toUrlMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected