Mercurial > hg > sonic-visualiser
changeset 2360:7bed1c28b5e9
QCommandLineParser::addOptions is too recent for the compatibility deb build
author | Chris Cannam |
---|---|
date | Thu, 10 Oct 2019 10:21:52 +0100 |
parents | f195f037e440 |
children | 2cd56528616a |
files | main/main.cpp |
diffstat | 1 files changed, 16 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- 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<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.addPositionalArgument ("[<file> ...]", QApplication::tr("One or more Sonic Visualiser (.sv) and audio files may be provided."));