]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/global.cpp
Tighter match own service when trying to find suitable window to open path in.
[dolphin.git] / src / global.cpp
index e7ff67d776578cfa88368e1177b99b1e94c77b91..97d743438440efdcf33ab71f2ba9913889d27bdc 100644 (file)
@@ -81,7 +81,8 @@ bool Dolphin::attachToExistingInstance(const QList<QUrl>& urls, bool openFiles,
 
     // Don't match the service without trailing "-" (unique instance)
     const QString pattern = QStringLiteral("org.kde.dolphin-");
-    const QString myPid = QString::number(QCoreApplication::applicationPid());
+    // Don't match the pid without leading "-"
+    const QString myPid = QStringLiteral("-") + QString::number(QCoreApplication::applicationPid());
     QVector<QPair<QSharedPointer<QDBusInterface>, QStringList>> dolphinServices;
     if (!preferredService.isEmpty()) {
         QSharedPointer<QDBusInterface> preferred(