changeset 2361:2cd56528616a

OK, the old QCommandLineOption constructor didn't permit that usage - be more explicit
author Chris Cannam
date Thu, 10 Oct 2019 10:35:40 +0100
parents 7bed1c28b5e9
children 7dd8ebdc829f
files main/main.cpp
diffstat 1 files changed, 13 insertions(+), 16 deletions(-) [+]
line wrap: on
line diff
--- a/main/main.cpp	Thu Oct 10 10:21:52 2019 +0100
+++ b/main/main.cpp	Thu Oct 10 10:35:40 2019 +0100
@@ -264,22 +264,19 @@
     parser.addHelpOption();
     parser.addVersionOption();
 
-    QList<QCommandLineOption> commandOptions {
-        { "no-audio", QApplication::tr
-          ("Do not attempt to open an audio output device.") },
-        { "no-osc", QApplication::tr
-          ("Do not provide an Open Sound Control port for remote control.") },
-        { "no-splash", QApplication::tr
-          ("Do not show a splash screen.") },
-        { "osc-script", QApplication::tr
-          ("Batch run the Open Sound Control script found in the given file. Supply \"-\" as file to read from stdin. Scripts consist of /command arg1 arg2 ... OSC control lines, optionally interleaved with numbers to specify pauses in seconds."),
-          "osc.txt" }
-    };
-    for (auto option: commandOptions) { // NB addOptions was added in
-                                        // Qt 5.4, slightly too new
-                                        // for us at present
-        parser.addOption(option);
-    }
+    parser.addOption(QCommandLineOption
+                     ("no-audio", QApplication::tr
+                      ("Do not attempt to open an audio output device.")));
+    parser.addOption(QCommandLineOption
+                     ("no-osc", QApplication::tr
+                      ("Do not provide an Open Sound Control port for remote control.")));
+    parser.addOption(QCommandLineOption
+                     ("no-splash", QApplication::tr
+                      ("Do not show a splash screen.")));
+    parser.addOption(QCommandLineOption
+                     ("osc-script", QApplication::tr
+                      ("Batch run the Open Sound Control script found in the given file. Supply \"-\" as file to read from stdin. Scripts consist of /command arg1 arg2 ... OSC control lines, optionally interleaved with numbers to specify pauses in seconds."),
+                      "osc.txt"));
 
     parser.addPositionalArgument
         ("[<file> ...]", QApplication::tr("One or more Sonic Visualiser (.sv) and audio files may be provided."));