Changeset View
Changeset View
Standalone View
Standalone View
app/main.cpp
Show All 32 Lines | 31 | { | |||
---|---|---|---|---|---|
33 | 33 | | |||
34 | KLocalizedString::setApplicationDomain("systemsettings"); | 34 | KLocalizedString::setApplicationDomain("systemsettings"); | ||
35 | 35 | | |||
36 | // About data | 36 | // About data | ||
37 | KAboutData aboutData("systemsettings", i18n("System Settings"), PROJECT_VERSION, i18n("Central configuration center for KDE."), KAboutLicense::GPL, i18n("(c) 2009, Ben Cooksley")); | 37 | KAboutData aboutData("systemsettings", i18n("System Settings"), PROJECT_VERSION, i18n("Central configuration center for KDE."), KAboutLicense::GPL, i18n("(c) 2009, Ben Cooksley")); | ||
38 | aboutData.addAuthor(i18n("Ben Cooksley"), i18n("Maintainer"), "bcooksley@kde.org"); | 38 | aboutData.addAuthor(i18n("Ben Cooksley"), i18n("Maintainer"), "bcooksley@kde.org"); | ||
39 | aboutData.addAuthor(i18n("Mathias Soeken"), i18n("Developer"), "msoeken@informatik.uni-bremen.de"); | 39 | aboutData.addAuthor(i18n("Mathias Soeken"), i18n("Developer"), "msoeken@informatik.uni-bremen.de"); | ||
40 | aboutData.addAuthor(i18n("Will Stephenson"), i18n("Internal module representation, internal module model"), "wstephenson@kde.org"); | 40 | aboutData.addAuthor(i18n("Will Stephenson"), i18n("Internal module representation, internal module model"), "wstephenson@kde.org"); | ||
41 | | ||||
42 | if (qEnvironmentVariableIsSet("KDE_FULL_SESSION")) { | ||||
43 | aboutData.setDesktopFileName(QStringLiteral("systemsettings")); | ||||
44 | } else { | ||||
41 | aboutData.setDesktopFileName(QStringLiteral("kdesystemsettings")); | 45 | aboutData.setDesktopFileName(QStringLiteral("kdesystemsettings")); | ||
46 | } | ||||
47 | | ||||
42 | KAboutData::setApplicationData(aboutData); | 48 | KAboutData::setApplicationData(aboutData); | ||
43 | 49 | | |||
44 | application.setAttribute(Qt::AA_UseHighDpiPixmaps, true); | 50 | application.setAttribute(Qt::AA_UseHighDpiPixmaps, true); | ||
45 | application.setWindowIcon(QIcon::fromTheme("preferences-system")); | 51 | application.setWindowIcon(QIcon::fromTheme("preferences-system")); | ||
46 | QCommandLineParser parser; | 52 | QCommandLineParser parser; | ||
47 | parser.addHelpOption(); | 53 | parser.addHelpOption(); | ||
48 | parser.addVersionOption(); | 54 | parser.addVersionOption(); | ||
49 | aboutData.setupCommandLine(&parser); | 55 | aboutData.setupCommandLine(&parser); | ||
50 | parser.process(application); | 56 | parser.process(application); | ||
51 | aboutData.processCommandLine(&parser); | 57 | aboutData.processCommandLine(&parser); | ||
52 | 58 | | |||
53 | SettingsBase *mainWindow = new SettingsBase(); | 59 | SettingsBase *mainWindow = new SettingsBase(); | ||
54 | mainWindow->show(); | 60 | mainWindow->show(); | ||
55 | application.setMainWindow(mainWindow); | 61 | application.setMainWindow(mainWindow); | ||
56 | return application.exec(); | 62 | return application.exec(); | ||
57 | } | 63 | } |