X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/92b178b7404b002778d8288353f65e27ee5de5dd..c4ecf1cb2bf199ddccd02990429b535385475ffc:/src/main.cpp diff --git a/src/main.cpp b/src/main.cpp index d68cc3cc1..f811c4f06 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -27,10 +27,6 @@ #include #include -#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) -#include -#endif - #define HAVE_STYLE_MANAGER __has_include() #if HAVE_STYLE_MANAGER #include @@ -43,11 +39,7 @@ #include #if HAVE_X11 -#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) #include -#else -#include -#endif #endif #ifndef Q_OS_WIN @@ -81,13 +73,6 @@ int main(int argc, char **argv) KIconTheme::initTheme(); #endif - /** - * enable high dpi support - */ -#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) - QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps, true); - QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling, true); -#endif QApplication app(argc, argv); app.setWindowIcon(QIcon::fromTheme(QStringLiteral("system-file-manager"), app.windowIcon())); @@ -106,15 +91,6 @@ int main(int argc, char **argv) #endif #endif - KCrash::initialize(); - -#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) - Kdelibs4ConfigMigrator migrate(QStringLiteral("dolphin")); - migrate.setConfigFiles(QStringList() << QStringLiteral("dolphinrc")); - migrate.setUiFiles(QStringList() << QStringLiteral("dolphinpart.rc") << QStringLiteral("dolphinui.rc")); - migrate.migrate(); -#endif - KLocalizedString::setApplicationDomain(dolphinTranslationDomain); KAboutData aboutData(QStringLiteral("dolphin"), @@ -152,6 +128,7 @@ int main(int argc, char **argv) aboutData.addAuthor(i18nc("@info:credit", "Michael Austin"), i18nc("@info:credit", "Documentation"), QStringLiteral("tuxedup@users.sourceforge.net")); KAboutData::setApplicationData(aboutData); + KCrash::initialize(); QCommandLineParser parser; aboutData.setupCommandLine(&parser); @@ -187,6 +164,9 @@ int main(int argc, char **argv) } if (parser.isSet(QStringLiteral("daemon"))) { + // Prevent KApplicationLauncherJob from cause the application to quit on job finish. + QCoreApplication::setQuitLockEnabled(false); + // Disable session management for the daemonized version // See https://bugs.kde.org/show_bug.cgi?id=417219 auto disableSessionManagement = [](QSessionManager &sm) {