diff --git a/kdevplatform/tests/testcore.cpp b/kdevplatform/tests/testcore.cpp --- a/kdevplatform/tests/testcore.cpp +++ b/kdevplatform/tests/testcore.cpp @@ -26,6 +26,7 @@ #include #include #include +#include #include #include "../shell/core_p.h" @@ -60,6 +61,13 @@ // the unit tests should work anyways core->uiController()->activeMainWindow()->hide(); } + + // resume the background parser when a unit test replaces the project controller + QObject::connect(core->d->projectController.data(), &ProjectController::destroyed, + core, [core]() { + core->d->languageController->backgroundParser()->resume(); + }); + return core; }