X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/de8ea90ca78ccfb26dd501dc3bc089fb24ad9094..5e84fffd6ed97a173d7250e7563998ea5dc395a0:/src/global.cpp diff --git a/src/global.cpp b/src/global.cpp index 3d17a733b..e81b7d34d 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 @@ -61,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; } @@ -119,7 +119,8 @@ QVector, QStringList>> Do } // Look for dolphin instances among all available dbus services. - const QStringList dbusServices = QDBusConnection::sessionBus().interface()->registeredServiceNames().value(); + QDBusConnectionInterface *sessionInterface = QDBusConnection::sessionBus().interface(); + const QStringList dbusServices = sessionInterface ? sessionInterface->registeredServiceNames().value() : QStringList(); // Don't match the service without trailing "-" (unique instance) const QString pattern = QStringLiteral("org.kde.dolphin-"); // Don't match the pid without leading "-" @@ -140,6 +141,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) {