Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

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

Don't repeat work of KAboutData::setupCommandLine().

parent 1659d12a
......@@ -33,8 +33,6 @@ int main(int argc, char **argv)
KAboutData::setApplicationData(aboutData);
QCommandLineParser parser;
parser.addVersionOption();
parser.addHelpOption();
aboutData.setupCommandLine(&parser);
parser.process(app);
aboutData.processCommandLine(&parser);
......
......@@ -67,8 +67,6 @@ int main(int argc, char **argv)
app.setQuitLockEnabled(false);
QCommandLineParser parser;
KAboutData::setApplicationData(aboutdata);
parser.addVersionOption();
parser.addHelpOption();
parser.addOption({ { QStringLiteral("c"), QStringLiteral("config") },
i18n("Configuration file to open"), QStringLiteral("configfile"),
QStringLiteral("config.xml") });
......
......@@ -44,8 +44,6 @@ int main(int argc, char *argv[])
QCommandLineParser parser;
KAboutData::setApplicationData(aboutData);
parser.addVersionOption();
parser.addHelpOption();
aboutData.setupCommandLine(&parser);
parser.process(app);
aboutData.processCommandLine(&parser);
......
......@@ -71,8 +71,6 @@ int main(int argc, char **argv)
KAboutData::setApplicationData(aboutData);
QCommandLineParser parser;
parser.addVersionOption();
parser.addHelpOption();
aboutData.setupCommandLine(&parser);
parser.process(app);
aboutData.processCommandLine(&parser);
......
......@@ -96,8 +96,6 @@ int main(int argc, char **argv)
KAboutData::setApplicationData(aboutData);
QCommandLineParser parser;
parser.addVersionOption();
parser.addHelpOption();
aboutData.setupCommandLine(&parser);
parser.process(app);
aboutData.processCommandLine(&parser);
......
......@@ -38,8 +38,6 @@ int main(int argc, char **argv)
KAboutData::setApplicationData(aboutData);
QCommandLineParser parser;
parser.addVersionOption();
parser.addHelpOption();
aboutData.setupCommandLine(&parser);
parser.process(app);
......
......@@ -39,8 +39,6 @@ int main(int argc, char *argv[])
app.setWindowIcon(QIcon::fromTheme(QStringLiteral("akonadi")));
QCommandLineParser parser;
parser.addVersionOption();
parser.addHelpOption();
aboutData.setupCommandLine(&parser);
parser.process(app);
aboutData.processCommandLine(&parser);
......
......@@ -93,14 +93,11 @@ int main(int argc, char **argv)
QCommandLineParser parser;
KAboutData::setApplicationData(aboutData);
parser.addVersionOption();
parser.addHelpOption();
parser.addOption(QCommandLineOption(QStringList() << QStringLiteral("path"), i18n("IMAP destination path"), QStringLiteral("argument")));
parser.addOption(QCommandLineOption(QStringList() << QStringLiteral("mimetype"), i18n("Source mimetype"), QStringLiteral("argument"), QStringLiteral("application/octet-stream")));
parser.addOption(QCommandLineOption(QStringList() << QStringLiteral("file"), i18n("Source file"), QStringLiteral("argument")));
parser.addOption(QCommandLineOption(QStringList() << QStringLiteral("count"), i18n("Number of times this file is added"), QStringLiteral("argument"), QStringLiteral("1")));
//PORTING SCRIPT: adapt aboutdata variable if necessary
aboutData.setupCommandLine(&parser);
parser.process(app);
aboutData.processCommandLine(&parser);
......
......@@ -34,8 +34,6 @@ int main(int argc, char **argv)
KAboutData::setApplicationData(aboutData);
QCommandLineParser parser;
parser.addVersionOption();
parser.addHelpOption();
aboutData.setupCommandLine(&parser);
parser.process(app);
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