mirror of
https://invent.kde.org/system/dolphin
synced 2024-09-12 12:54:29 +00:00
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
This commit is contained in:
parent
27e3907a3d
commit
853a95b6d5
|
@ -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(
|
||||
|
|
Loading…
Reference in a new issue