Changeset View
Changeset View
Standalone View
Standalone View
src/global.cpp
Show First 20 Lines • Show All 75 Lines • ▼ Show 20 Line(s) | 75 | if (KWindowSystem::isPlatformWayland()) { | |||
---|---|---|---|---|---|
76 | // TODO: once Wayland clients can raise or activate themselves remove this conditional | 76 | // TODO: once Wayland clients can raise or activate themselves remove this conditional | ||
77 | return false; | 77 | return false; | ||
78 | } | 78 | } | ||
79 | 79 | | |||
80 | const QStringList services = QDBusConnection::sessionBus().interface()->registeredServiceNames().value(); | 80 | const QStringList services = QDBusConnection::sessionBus().interface()->registeredServiceNames().value(); | ||
81 | 81 | | |||
82 | // Don't match the service without trailing "-" (unique instance) | 82 | // Don't match the service without trailing "-" (unique instance) | ||
83 | const QString pattern = QStringLiteral("org.kde.dolphin-"); | 83 | const QString pattern = QStringLiteral("org.kde.dolphin-"); | ||
84 | const QString myPid = QString::number(QCoreApplication::applicationPid()); | 84 | // Don't match the pid without leading "-" | ||
85 | const QString myPid = QStringLiteral("-") + QString::number(QCoreApplication::applicationPid()); | ||||
85 | QVector<QPair<QSharedPointer<QDBusInterface>, QStringList>> dolphinServices; | 86 | QVector<QPair<QSharedPointer<QDBusInterface>, QStringList>> dolphinServices; | ||
86 | if (!preferredService.isEmpty()) { | 87 | if (!preferredService.isEmpty()) { | ||
87 | QSharedPointer<QDBusInterface> preferred( | 88 | QSharedPointer<QDBusInterface> preferred( | ||
88 | new QDBusInterface(preferredService, | 89 | new QDBusInterface(preferredService, | ||
89 | QStringLiteral("/dolphin/Dolphin_1"), | 90 | QStringLiteral("/dolphin/Dolphin_1"), | ||
90 | QStringLiteral("org.kde.dolphin.MainWindow")) | 91 | QStringLiteral("org.kde.dolphin.MainWindow")) | ||
91 | ); | 92 | ); | ||
92 | if (preferred->isValid()) { | 93 | if (preferred->isValid()) { | ||
▲ Show 20 Lines • Show All 51 Lines • Show Last 20 Lines |