Verified Commit 542e2a21 authored by Alexander Lohnau's avatar Alexander Lohnau
Browse files

Fix selecting file always opening new instance

Instead try to attach to all existing instances and quit after succeeding.

BUG: 440663
parent 69641406
Pipeline #76370 passed with stage
in 5 minutes and 21 seconds
......@@ -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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment