diff options
| author | Alexander Lohnau <[email protected]> | 2021-08-14 13:07:24 +0200 |
|---|---|---|
| committer | Alexander Lohnau <[email protected]> | 2021-08-24 16:21:40 +0200 |
| commit | 542e2a214a48a0eba6938381f1e043a37909f200 (patch) | |
| tree | 9c4da1db345550a4fe0a6ce4825793e209863ee1 /src | |
| parent | 696414069907b41f7738e3212ac0d68b58fed1bc (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.cpp | 14 |
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; |
