┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorElvis Angelaccio <[email protected]>2019-06-08 13:11:47 +0200
committerElvis Angelaccio <[email protected]>2019-06-08 13:11:47 +0200
commitd886cf3c85ebf536401b8a73a1d4ddbe51b78a0f (patch)
tree21a323979bcd01baa5f92c9b4003213d7642fe43 /src
parent1bcd47842224509964229a0bddc2277dfe1467da (diff)
Fix container detaching
Diffstat (limited to 'src')
-rw-r--r--src/global.cpp5
-rw-r--r--src/global.h2
2 files changed, 4 insertions, 3 deletions
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<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
@@ -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
- 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);
diff --git a/src/global.h b/src/global.h
index 16305eafe..fb58036af 100644
--- a/src/global.h
+++ b/src/global.h
@@ -46,7 +46,7 @@ namespace Dolphin {
* 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