Commit ec74b8ba authored by Friedrich W. H. Kossebau's avatar Friedrich W. H. Kossebau Committed by Kai Uwe Broulik
Browse files

[krunner] No need to duplicate work of KAboutData::setApplicationData

Summary: Also let KAboutData handle app arguments

Reviewers: broulik, apol

Reviewed By: apol

Subscribers: plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D10398
parent 83464067
......@@ -52,15 +52,22 @@ int main(int argc, char **argv)
// TODO: Make it a QGuiApplication once we don't depend on KDELibs4Support
// QGuiApplication app(argc, argv);
app.setApplicationName(QStringLiteral("krunner"));
app.setOrganizationDomain(QStringLiteral("kde.org"));
app.setApplicationVersion(QStringLiteral(PROJECT_VERSION));
KAboutData aboutData(QStringLiteral("krunner"),
i18n("krunner"),
QStringLiteral(PROJECT_VERSION),
i18n("Run Command interface"),
KAboutLicense::GPL);
KAboutData::setApplicationData(aboutData);
app.setQuitOnLastWindowClosed(false);
parser.setApplicationDescription(i18n("Run Command interface"));
aboutData.setupCommandLine(&parser);
parser.addHelpOption();
parser.addVersionOption();
parser.process(app);
aboutData.processCommandLine(&parser);
if (!KAuthorized::authorize(QStringLiteral("run_command"))) {
return -1;
......@@ -68,14 +75,6 @@ int main(int argc, char **argv)
KDBusService service(KDBusService::Unique);
KAboutData aboutData(QStringLiteral("krunner"),
i18n("krunner"),
QStringLiteral(PROJECT_VERSION),
i18n("Run Command interface"),
KAboutLicense::GPL);
KAboutData::setApplicationData(aboutData);
QGuiApplication::setFallbackSessionManagementEnabled(false);
auto disableSessionManagement = [](QSessionManager &sm) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment