Changeset View
Changeset View
Standalone View
Standalone View
autotests/common/test.cpp
Show All 26 Lines | |||||
27 | Test::Test(QObject *parent) | 27 | Test::Test(QObject *parent) | ||
28 | : QObject(parent) | 28 | : QObject(parent) | ||
29 | { | 29 | { | ||
30 | 30 | | |||
31 | } | 31 | } | ||
32 | 32 | | |||
33 | bool Test::inEmptySession() | 33 | bool Test::inEmptySession() | ||
34 | { | 34 | { | ||
35 | QStringList services = | 35 | const QStringList services = | ||
36 | QDBusConnection::sessionBus().interface()->registeredServiceNames(); | 36 | QDBusConnection::sessionBus().interface()->registeredServiceNames(); | ||
37 | 37 | | |||
38 | foreach (const QString & service, services) { | 38 | for (const QString & service : services) { | ||
39 | bool kdeServiceAndNotKAMD = | 39 | bool kdeServiceAndNotKAMD = | ||
40 | service.startsWith(QStringLiteral("org.kde")) && | 40 | service.startsWith(QStringLiteral("org.kde")) && | ||
41 | service != KAMD_DBUS_SERVICE; | 41 | service != KAMD_DBUS_SERVICE; | ||
42 | 42 | | |||
43 | if (kdeServiceAndNotKAMD) { | 43 | if (kdeServiceAndNotKAMD) { | ||
44 | return false; | 44 | return false; | ||
45 | } | 45 | } | ||
46 | } | 46 | } | ||
Show All 10 Lines |