|
|
|
|
@ -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) { |
|
|
|
|
|