# HG changeset patch # User Chris Cannam # Date 1570700140 -3600 # Node ID 2cd56528616af5940380ef572bff29bbc16a920f # Parent 7bed1c28b5e95d75b9ec4f81719ee1246c864270 OK, the old QCommandLineOption constructor didn't permit that usage - be more explicit diff -r 7bed1c28b5e9 -r 2cd56528616a main/main.cpp --- 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 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 ("[ ...]", QApplication::tr("One or more Sonic Visualiser (.sv) and audio files may be provided."));