diff --git a/autotests/integration/activities_test.cpp b/autotests/integration/activities_test.cpp index 91c2385137..c9747ccf7c 100644 --- a/autotests/integration/activities_test.cpp +++ b/autotests/integration/activities_test.cpp @@ -31,6 +31,10 @@ along with this program. If not, see . #include "xcbutils.h" #include +#include +#include +#include + #include #include @@ -75,7 +79,12 @@ void ActivitiesTest::initTestCase() void ActivitiesTest::cleanupTestCase() { - QProcess::execute(QStringLiteral("kactivitymanagerd"), QStringList{QStringLiteral("stop")}); + // terminate any still running kactivitymanagerd + QDBusConnection::sessionBus().asyncCall(QDBusMessage::createMethodCall( + QStringLiteral("org.kde.ActivityManager"), + QStringLiteral("/ActivityManager"), + QStringLiteral("org.qtproject.Qt.QCoreApplication"), + QStringLiteral("quit"))); } void ActivitiesTest::init()