┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlexander Lohnau <[email protected]>2021-08-14 13:07:24 +0200
committerAlexander Lohnau <[email protected]>2021-08-24 16:21:40 +0200
commit542e2a214a48a0eba6938381f1e043a37909f200 (patch)
tree9c4da1db345550a4fe0a6ce4825793e209863ee1 /src
parent696414069907b41f7738e3212ac0d68b58fed1bc (diff)
Fix selecting file always opening new instance
Instead try to attach to all existing instances and quit after succeeding. BUG: 440663
Diffstat (limited to 'src')
-rw-r--r--src/global.cpp14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/global.cpp b/src/global.cpp
index 197d6ec28..92b1f7f56 100644
--- a/src/global.cpp
+++ b/src/global.cpp
@@ -91,16 +91,14 @@ bool Dolphin::attachToExistingInstance(const QList<QUrl>& inputUrls, bool openFi
newUrls.append(url);
}
}
- dolphinInterfaces.front().second << newUrls;
for (const auto& interface: qAsConst(dolphinInterfaces)) {
- if (!interface.second.isEmpty()) {
- auto reply = openFiles ? interface.first->openFiles(interface.second, splitView) : interface.first->openDirectories(interface.second, splitView);
- reply.waitForFinished();
- if (!reply.isError()) {
- interface.first->activateWindow();
- attached = true;
- }
+ auto reply = openFiles ? interface.first->openFiles(newUrls, splitView) : interface.first->openDirectories(newUrls, splitView);
+ reply.waitForFinished();
+ if (!reply.isError()) {
+ interface.first->activateWindow();
+ attached = true;
+ break;
}
}
return attached;