#include <KLocalizedString>
#include <Kdelibs4ConfigMigrator>
#include <KConfigGui>
+#include <KIO/PreviewJob>
#include <QApplication>
#include <QCommandLineParser>
QApplication app(argc, argv);
app.setWindowIcon(QIcon::fromTheme(QStringLiteral("system-file-manager"), app.windowIcon()));
+ KIO::PreviewJob::setDefaultDevicePixelRatio(app.devicePixelRatio());
+
KCrash::initialize();
Kdelibs4ConfigMigrator migrate(QStringLiteral("dolphin"));
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()) {