┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlex Richardson <[email protected]>2021-07-09 09:32:04 +0100
committerElvis Angelaccio <[email protected]>2021-07-10 20:18:28 +0000
commit3fdd93db97bab9ca15e65047d69774cfbfe22f27 (patch)
tree15d34568b8b5f4c3d95d6abe0df7532a36b619c6 /src
parent531de16cd0703882e8972bba60c9f295c2d81277 (diff)
Don't exit immediately if DBus isn't running
I am trying to run Dolphin on a minimal FreeBSD CHERI-RISC-V QEMU instance and I haven't got DBus running. Without this change, KDBusService causes dolphin to exit immediately since the default behaviour is to exit if it can't connect to DBus.
Diffstat (limited to 'src')
-rw-r--r--src/main.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/main.cpp b/src/main.cpp
index fba45f43c..ff726401e 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -178,7 +178,12 @@ int main(int argc, char **argv)
mainWindow->show();
- KDBusService dolphinDBusService;
+ // Allow starting Dolphin on a system that is not running DBus:
+ KDBusService::StartupOptions serviceOptions = KDBusService::Multiple;
+ if (!QDBusConnection::sessionBus().isConnected()) {
+ serviceOptions |= KDBusService::NoExitOnFailure;
+ }
+ KDBusService dolphinDBusService(serviceOptions);
DBusInterface interface;
if (!app.isSessionRestored()) {