[education/rkward/kf5] rkward: Fix warning about duplicate addition of help command line option
Thomas Friedrichsmeier
null at kde.org
Wed Apr 10 16:12:08 BST 2024
Git commit 105904712c5d968f4d38023bf49467476ecd49e9 by Thomas Friedrichsmeier.
Committed on 04/04/2024 at 09:37.
Pushed by tfry into branch 'kf5'.
Fix warning about duplicate addition of help command line option
M +1 -3 rkward/main.cpp
https://invent.kde.org/education/rkward/-/commit/105904712c5d968f4d38023bf49467476ecd49e9
diff --git a/rkward/main.cpp b/rkward/main.cpp
index 5b26a8d8f..301acd23d 100644
--- a/rkward/main.cpp
+++ b/rkward/main.cpp
@@ -278,8 +278,7 @@ int main (int argc, char *argv[]) {
KAboutData::setApplicationData (aboutData);
QCommandLineParser parser;
- parser.addVersionOption ();
- parser.addHelpOption ();
+ aboutData.setupCommandLine(&parser);
parser.addOption (QCommandLineOption ("evaluate", i18n ("After starting (and after loading the specified workspace, if applicable), evaluate the given R code."), "Rcode", QString ()));
parser.addOption (QCommandLineOption ("debug-level", i18n ("Verbosity of debug messages (0-5)"), "level", "2"));
parser.addOption (QCommandLineOption ("debug-flags", i18n ("Mask for components to debug (see debug.h)"), "flags", QString::number (DEBUG_ALL)));
@@ -292,7 +291,6 @@ int main (int argc, char *argv[]) {
parser.addOption(QCommandLineOption("quirkmode", i18n("Disable some startup validation code. Experimental option, not intended for regular use.")));
parser.addPositionalArgument ("files", i18n ("File or files to open, typically a workspace, or an R script file. When loading several things, you should specify the workspace, first."), "[Files...]");
- aboutData.setupCommandLine (&parser);
parser.process (app);
aboutData.processCommandLine (&parser);
More information about the rkward-tracker
mailing list