diff options
| author | Thomas Posch <[email protected]> | 2019-06-03 21:52:10 +0200 |
|---|---|---|
| committer | Elvis Angelaccio <[email protected]> | 2019-06-03 21:52:40 +0200 |
| commit | 853a95b6d5d225e501d62f5858583d7c0527f9b3 (patch) | |
| tree | b9fed8137b8330463a8dd186d528e66860b34684 | |
| parent | 27e3907a3daf9a63d05c00a0ff746de6cfdf2bdf (diff) | |
Tighter match own service when trying to find suitable window to open path in.
Summary:
Current implementation matches org.kde.dolphin-.*PID while trying to exclude itself from the list of running instances.
With this fix applied only org.kde.dolphin-PID is matched.
Test Plan: Open dolphin twice. Observe only one window.
Reviewers: feverfew, #dolphin, elvisangelaccio
Reviewed By: #dolphin, elvisangelaccio
Subscribers: elvisangelaccio, kfm-devel
Tags: #dolphin
Differential Revision: https://phabricator.kde.org/D21547
| -rw-r--r-- | src/global.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/global.cpp b/src/global.cpp index e7ff67d77..97d743438 100644 --- a/src/global.cpp +++ b/src/global.cpp @@ -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( |
