X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/de8ea90ca78ccfb26dd501dc3bc089fb24ad9094..fa8d9de4d866070acadd57178d20144bb5e62a0a:/src/global.cpp diff --git a/src/global.cpp b/src/global.cpp index 3d17a733b..92b1f7f56 100644 --- a/src/global.cpp +++ b/src/global.cpp @@ -9,6 +9,7 @@ #include "dolphin_generalsettings.h" #include "dolphindebug.h" #include "dolphinmainwindowinterface.h" +#include "views/viewproperties.h" #include #include @@ -90,16 +91,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; @@ -140,6 +139,12 @@ QVector, QStringList>> Do return dolphinInterfaces; } +QPair Dolphin::sortOrderForUrl(QUrl &url) +{ + ViewProperties globalProps(url); + return QPair(globalProps.sortRole(), globalProps.sortOrder()); +} + double GlobalConfig::animationDurationFactor() { if (s_animationDurationFactor >= 0.0) {