| 262 | } |
| 263 | |
| 264 | void 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 | |
| 281 | void TestProjectController::openMultiple() |
| 282 | { |
nothing calls this directly
no test coverage detected