From 8be5c9f4f27d3312715c0d60ea6c088ae32283b7 Mon Sep 17 00:00:00 2001 From: Luigi Toscano Date: Tue, 31 Jan 2017 01:29:58 +0100 Subject: Fix porting issues with kdesvn-askpass - properly setup and run the command line parser, fixing the order of the operations; - set the translation catalog; - remove a porting-related comment. --- src/askpass/kdesvn-askpass.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/askpass/kdesvn-askpass.cpp b/src/askpass/kdesvn-askpass.cpp index aea5986..030fa9c 100644 --- a/src/askpass/kdesvn-askpass.cpp +++ b/src/askpass/kdesvn-askpass.cpp @@ -30,7 +30,8 @@ int main(int argc, char **argv) { - QApplication app(argc, argv); // PORTING SCRIPT: move this to before the KAboutData initialization + QApplication app(argc, argv); + KLocalizedString::setApplicationDomain("kdesvn"); KAboutData aboutData(QStringLiteral("kdesvnaskpass"), i18n("kdesvnaskpass"), QStringLiteral("0.2"), i18n("ssh-askpass for kdesvn"), KAboutLicense::LicenseKey::LGPL, @@ -39,10 +40,10 @@ int main(int argc, char **argv) KAboutData::setApplicationData(aboutData); parser.addVersionOption(); parser.addHelpOption(); - aboutData.setupCommandLine(&parser); - aboutData.processCommandLine(&parser); parser.addPositionalArgument(QStringLiteral("[prompt]"), i18n("Prompt")); + aboutData.setupCommandLine(&parser); parser.process(app); + aboutData.processCommandLine(&parser); // no need for session management //app.disableSessionManagement(); -- cgit v1.1