mirror of
https://invent.kde.org/system/dolphin
synced 2024-08-21 17:30:15 +00:00
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.
This commit is contained in:
parent
531de16cd0
commit
3fdd93db97
|
@ -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()) {
|
||||
|
|
Loading…
Reference in a new issue