]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/global.cpp
Merge branch 'release/21.08'
[dolphin.git] / src / global.cpp
index 92b1f7f56939ddfa64933465ff2559d065a67a99..0712aa173f8c7429d7e6c80ce0f86a7692e4c441 100644 (file)
@@ -62,8 +62,7 @@ bool Dolphin::attachToExistingInstance(const QList<QUrl>& 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;
     }
 
@@ -118,7 +117,8 @@ QVector<QPair<QSharedPointer<OrgKdeDolphinMainWindowInterface>, 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 "-"