]> cloud.milkyroute.net Git - dolphin.git/commitdiff
Fix container detaching
authorElvis Angelaccio <elvis.angelaccio@kde.org>
Sat, 8 Jun 2019 11:11:47 +0000 (13:11 +0200)
committerElvis Angelaccio <elvis.angelaccio@kde.org>
Sat, 8 Jun 2019 11:11:47 +0000 (13:11 +0200)
src/global.cpp
src/global.h

index 97d743438440efdcf33ab71f2ba9913889d27bdc..995cad5594f7acdc53560b67b0c90eb10558dd64 100644 (file)
@@ -70,7 +70,7 @@ void Dolphin::openNewWindow(const QList<QUrl> &urls, QWidget *window, const Open
     );
 }
 
     );
 }
 
-bool Dolphin::attachToExistingInstance(const QList<QUrl>& urls, bool openFiles, bool splitView, const QString& preferredService)
+bool Dolphin::attachToExistingInstance(const QList<QUrl>& inputUrls, bool openFiles, bool splitView, const QString& preferredService)
 {
     if (KWindowSystem::isPlatformWayland()) {
         // TODO: once Wayland clients can raise or activate themselves remove this conditional
 {
     if (KWindowSystem::isPlatformWayland()) {
         // TODO: once Wayland clients can raise or activate themselves remove this conditional
@@ -118,7 +118,8 @@ bool Dolphin::attachToExistingInstance(const QList<QUrl>& urls, bool openFiles,
     QStringList newUrls;
 
     // check to see if any instances already have any of the given URLs open
     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<bool> isUrlOpen = service.first->call(QStringLiteral("isUrlOpen"), url);
         bool urlFound = false;
         for (auto& service: dolphinServices) {
             QDBusReply<bool> isUrlOpen = service.first->call(QStringLiteral("isUrlOpen"), url);
index 16305eafebbaec9a63b64b94ab21fbac155f4098..fb58036afcc4d96d541186c94bf264c995f9cb43 100644 (file)
@@ -46,7 +46,7 @@ namespace Dolphin {
      * Attaches URLs to an existing Dolphin instance if possible.
      * Returns true if URLs were successfully attached
      */
      * Attaches URLs to an existing Dolphin instance if possible.
      * Returns true if URLs were successfully attached
      */
-    bool attachToExistingInstance(const QList<QUrl>& urls, bool openFiles, bool splitView, const QString& preferredService = QString());
+    bool attachToExistingInstance(const QList<QUrl>& inputUrls, bool openFiles, bool splitView, const QString& preferredService = QString());
 
     /**
      * TODO: Move this somewhere global to all KDE apps, not just Dolphin
 
     /**
      * TODO: Move this somewhere global to all KDE apps, not just Dolphin