Commit 28024901 authored by Laurent Montel's avatar Laurent Montel 😁

Do not duplicate work of KAboutData::setupCommandLine()

parent 3257c8b2
...@@ -135,8 +135,6 @@ int main(int argc, char **argv) ...@@ -135,8 +135,6 @@ int main(int argc, char **argv)
QGuiApplication::setWindowIcon(QIcon::fromTheme("preferences-desktop-font-installer")); QGuiApplication::setWindowIcon(QIcon::fromTheme("preferences-desktop-font-installer"));
QCommandLineParser parser; QCommandLineParser parser;
parser.addVersionOption();
parser.addHelpOption();
const QCommandLineOption embedOption(QLatin1String("embed"), i18n("Makes the dialog transient for an X app specified by winid"), QLatin1String("winid")); const QCommandLineOption embedOption(QLatin1String("embed"), i18n("Makes the dialog transient for an X app specified by winid"), QLatin1String("winid"));
parser.addOption(embedOption); parser.addOption(embedOption);
parser.addPositionalArgument(QLatin1String("[URL]"), i18n("URL to install")); parser.addPositionalArgument(QLatin1String("[URL]"), i18n("URL to install"));
......
...@@ -437,8 +437,6 @@ int main(int argc, char **argv) ...@@ -437,8 +437,6 @@ int main(int argc, char **argv)
QGuiApplication::setWindowIcon(QIcon::fromTheme("kfontprint")); QGuiApplication::setWindowIcon(QIcon::fromTheme("kfontprint"));
QCommandLineParser parser; QCommandLineParser parser;
parser.addVersionOption();
parser.addHelpOption();
const QCommandLineOption embedOption(QLatin1String("embed"), i18n("Makes the dialog transient for an X app specified by winid"), QLatin1String("winid")); const QCommandLineOption embedOption(QLatin1String("embed"), i18n("Makes the dialog transient for an X app specified by winid"), QLatin1String("winid"));
parser.addOption(embedOption); parser.addOption(embedOption);
const QCommandLineOption sizeOption(QLatin1String("size"), i18n("Size index to print fonts"), QLatin1String("index")); const QCommandLineOption sizeOption(QLatin1String("size"), i18n("Size index to print fonts"), QLatin1String("index"));
......
...@@ -42,8 +42,6 @@ int main( int argc, char *argv[] ) ...@@ -42,8 +42,6 @@ int main( int argc, char *argv[] )
KAboutData::setApplicationData(aboutData); KAboutData::setApplicationData(aboutData);
QCommandLineParser parser; QCommandLineParser parser;
parser.addHelpOption();
parser.addVersionOption();
aboutData.setupCommandLine(&parser); aboutData.setupCommandLine(&parser);
parser.process(application); parser.process(application);
aboutData.processCommandLine(&parser); aboutData.processCommandLine(&parser);
......
...@@ -36,8 +36,6 @@ int main(int argc, char **argv) ...@@ -36,8 +36,6 @@ int main(int argc, char **argv)
QCommandLineParser parser; QCommandLineParser parser;
KAboutData::setApplicationData(aboutData); KAboutData::setApplicationData(aboutData);
parser.addVersionOption();
parser.addHelpOption();
aboutData.setupCommandLine(&parser); aboutData.setupCommandLine(&parser);
parser.process(app); parser.process(app);
aboutData.processCommandLine(&parser); aboutData.processCommandLine(&parser);
......
Markdown is supported
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