X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/d472cb2a25cef38dbebbd0ec9073e4ec05d65272..29383426d66feb255034a3e160ae48b6273773d1:/src/global.cpp diff --git a/src/global.cpp b/src/global.cpp index d217a67ec..0712aa173 100644 --- a/src/global.cpp +++ b/src/global.cpp @@ -62,8 +62,7 @@ bool Dolphin::attachToExistingInstance(const QList& inputUrls, bool openFi { bool attached = false; - // TODO: once Wayland clients can raise or activate themselves remove check from conditional - if (KWindowSystem::isPlatformWayland() || inputUrls.isEmpty() || !GeneralSettings::openExternallyCalledFolderInNewTab()) { + if (inputUrls.isEmpty() || !GeneralSettings::openExternallyCalledFolderInNewTab()) { return false; } @@ -91,16 +90,14 @@ bool Dolphin::attachToExistingInstance(const QList& 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;