From d886cf3c85ebf536401b8a73a1d4ddbe51b78a0f Mon Sep 17 00:00:00 2001 From: Elvis Angelaccio Date: Sat, 8 Jun 2019 13:11:47 +0200 Subject: Fix container detaching --- src/global.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/global.cpp') diff --git a/src/global.cpp b/src/global.cpp index 97d743438..995cad559 100644 --- a/src/global.cpp +++ b/src/global.cpp @@ -70,7 +70,7 @@ void Dolphin::openNewWindow(const QList &urls, QWidget *window, const Open ); } -bool Dolphin::attachToExistingInstance(const QList& urls, bool openFiles, bool splitView, const QString& preferredService) +bool Dolphin::attachToExistingInstance(const QList& inputUrls, bool openFiles, bool splitView, const QString& preferredService) { if (KWindowSystem::isPlatformWayland()) { // TODO: once Wayland clients can raise or activate themselves remove this conditional @@ -118,7 +118,8 @@ bool Dolphin::attachToExistingInstance(const QList& urls, bool openFiles, QStringList newUrls; // check to see if any instances already have any of the given URLs open - for (const QString& url : QUrl::toStringList(urls)) { + const auto urls = QUrl::toStringList(inputUrls); + for (const QString& url : urls) { bool urlFound = false; for (auto& service: dolphinServices) { QDBusReply isUrlOpen = service.first->call(QStringLiteral("isUrlOpen"), url); -- cgit v1.3