]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/main.cpp
Make strings in credits HIG compliant
[dolphin.git] / src / main.cpp
index d68cc3cc1e8f429d06f8235b8629598038b9999d..5ddef13d4dd670bd6956a2ca68f6c43eca6d59ca 100644 (file)
 #include <KLocalizedString>
 #include <KWindowSystem>
 
-#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
-#include <Kdelibs4ConfigMigrator>
-#endif
-
 #define HAVE_STYLE_MANAGER __has_include(<KStyleManager>)
 #if HAVE_STYLE_MANAGER
 #include <KStyleManager>
 #include <QSessionManager>
 
 #if HAVE_X11
-#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
 #include <private/qtx11extras_p.h>
-#else
-#include <QX11Info>
-#endif
 #endif
 
 #ifndef Q_OS_WIN
@@ -77,19 +69,10 @@ int main(int argc, char **argv)
     /**
      * trigger initialisation of proper icon theme
      */
-#if KICONTHEMES_VERSION >= QT_VERSION_CHECK(6, 3, 0)
     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()));
+    app.setWindowIcon(QIcon::fromTheme(QStringLiteral("org.kde.dolphin"), app.windowIcon()));
 
 #if HAVE_STYLE_MANAGER
     /**
@@ -106,15 +89,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"),
@@ -122,7 +96,7 @@ int main(int argc, char **argv)
                          QStringLiteral(DOLPHIN_VERSION_STRING),
                          i18nc("@title", "File Manager"),
                          KAboutLicense::GPL,
-                         i18nc("@info:credit", "(C) 2006-2022 The Dolphin Developers"));
+                         i18nc("@info:credit", "© 2006–2025 The Dolphin Developers"));
     aboutData.setHomepage(QStringLiteral("https://apps.kde.org/dolphin"));
     aboutData.addAuthor(i18nc("@info:credit", "Felix Ernst"),
                         i18nc("@info:credit", "Maintainer (since 2021) and developer"),
@@ -131,16 +105,16 @@ int main(int argc, char **argv)
                         i18nc("@info:credit", "Maintainer (since 2021) and developer (since 2019)"),
                         QStringLiteral("meven@kde.org"));
     aboutData.addAuthor(i18nc("@info:credit", "Elvis Angelaccio"),
-                        i18nc("@info:credit", "Maintainer (2018-2021) and developer"),
+                        i18nc("@info:credit", "Maintainer (20182021) and developer"),
                         QStringLiteral("elvis.angelaccio@kde.org"));
     aboutData.addAuthor(i18nc("@info:credit", "Emmanuel Pescosta"),
-                        i18nc("@info:credit", "Maintainer (2014-2018) and developer"),
+                        i18nc("@info:credit", "Maintainer (20142018) and developer"),
                         QStringLiteral("emmanuelpescosta099@gmail.com"));
     aboutData.addAuthor(i18nc("@info:credit", "Frank Reininghaus"),
-                        i18nc("@info:credit", "Maintainer (2012-2014) and developer"),
+                        i18nc("@info:credit", "Maintainer (20122014) and developer"),
                         QStringLiteral("frank78ac@googlemail.com"));
     aboutData.addAuthor(i18nc("@info:credit", "Peter Penz"),
-                        i18nc("@info:credit", "Maintainer and developer (2006-2012)"),
+                        i18nc("@info:credit", "Maintainer and developer (20062012)"),
                         QStringLiteral("peter.penz19@gmail.com"));
     aboutData.addAuthor(i18nc("@info:credit", "Sebastian Trüg"), i18nc("@info:credit", "Developer"), QStringLiteral("trueg@kde.org"));
     aboutData.addAuthor(i18nc("@info:credit", "David Faure"), i18nc("@info:credit", "Developer"), QStringLiteral("faure@kde.org"));
@@ -152,6 +126,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 +162,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) {