# HG changeset patch # User Chris Cannam # Date 1570699312 -3600 # Node ID 7bed1c28b5e95d75b9ec4f81719ee1246c864270 # Parent f195f037e4401ec86599947e3284d95df1f1e246 QCommandLineParser::addOptions is too recent for the compatibility deb build diff -r f195f037e440 -r 7bed1c28b5e9 main/main.cpp --- a/main/main.cpp Thu Oct 10 10:03:58 2019 +0100 +++ b/main/main.cpp Thu Oct 10 10:21:52 2019 +0100 @@ -264,17 +264,22 @@ parser.addHelpOption(); parser.addVersionOption(); - parser.addOptions({ - { "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" } - }); + 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.addPositionalArgument ("[ ...]", QApplication::tr("One or more Sonic Visualiser (.sv) and audio files may be provided."));