Skip to content

Commit a7db24c

Browse files
committed
Merge pull request #1995 from Jojo-Schmitz/cmd-line-args-mac
make command line parsing compatible with Qt 5.3
2 parents 5c862c3 + 83be79f commit a7db24c

File tree

1 file changed

+25
-27
lines changed

1 file changed

+25
-27
lines changed

mscore/musescore.cpp

Lines changed: 25 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -4510,33 +4510,31 @@ int main(int argc, char* av[])
45104510

45114511
parser.addHelpOption(); // -?, -h, --help
45124512
parser.addVersionOption(); // -v, --version
4513-
parser.addOptions({
4514-
//{{"v", "version"}, "Print version"}, // see above
4515-
{ "long-version", "Print detailed version information"},
4516-
{{"d", "debug"}, "Debug mode"},
4517-
{{"L", "layout-debug"}, "Layout debug"},
4518-
{{"s", "no-synthesizer"}, "No internal synthesizer"},
4519-
{{"m", "no-midi"}, "No midi"},
4520-
{{"a", "use-audio"}, "Use audio driver: jack, alsa, pulse, or portaudio", "driver"},
4521-
{{"n", "new-score"}, "Start with new score"},
4522-
{{"I", "dump-midi-in"}, "Dump midi input"},
4523-
{{"O", "dump-midi-out"}, "Dump midi output"},
4524-
{{"o", "export-to"}, "Export to 'file'; format depends on file extension", "file"},
4525-
{{"r", "image-resolution"}, "Set output resolution for image export", "dpi"},
4526-
{{"T", "trim-image"}, "Trim exported image with specified margin (in pixels)", "margin"},
4527-
{{"x", "gui-scaling"}, "Set scaling factor for GUI elements", "factor"},
4528-
{{"S", "style"}, "Load style file", "style"},
4529-
{{"p", "plugin"}, "Execure named plugin", "name"},
4530-
{ "template-mode","Save template mode, no page size"},
4531-
{{"F", "factory-settings"}, "Use factory settings"},
4532-
{{"R", "revert-settings"}, "Revert to default preferences"},
4533-
{{"i", "load-icons"}, "Load icons from INSTALLPATH/icons"},
4534-
{{"e", "experimental"}, "Enable experimental features"},
4535-
{{"c", "config-folder"}, "Override config/settings folder", "dir"},
4536-
{{"t", "test-mode"}, "Set testMode flag for all files"},
4537-
{{"M", "midi-operations"}, "Specify MIDI import operations file", "file"},
4538-
{{"w", "no-webview"}, "No web view in start center"},
4539-
});
4513+
//parser.addOption(QCommandLineOption({"v", "version"}, "Print version")); // see above
4514+
parser.addOption(QCommandLineOption( "long-version", "Print detailed version information"));
4515+
parser.addOption(QCommandLineOption({"d", "debug"}, "Debug mode"));
4516+
parser.addOption(QCommandLineOption({"L", "layout-debug"}, "Layout debug"));
4517+
parser.addOption(QCommandLineOption({"s", "no-synthesizer"}, "No internal synthesizer"));
4518+
parser.addOption(QCommandLineOption({"m", "no-midi"}, "No midi"));
4519+
parser.addOption(QCommandLineOption({"a", "use-audio"}, "Use audio driver: jack, alsa, pulse, or portaudio", "driver"));
4520+
parser.addOption(QCommandLineOption({"n", "new-score"}, "Start with new score"));
4521+
parser.addOption(QCommandLineOption({"I", "dump-midi-in"}, "Dump midi input"));
4522+
parser.addOption(QCommandLineOption({"O", "dump-midi-out"}, "Dump midi output"));
4523+
parser.addOption(QCommandLineOption({"o", "export-to"}, "Export to 'file'; format depends on file extension", "file"));
4524+
parser.addOption(QCommandLineOption({"r", "image-resolution"}, "Set output resolution for image export", "dpi"));
4525+
parser.addOption(QCommandLineOption({"T", "trim-image"}, "Trim exported image with specified margin (in pixels)", "margin"));
4526+
parser.addOption(QCommandLineOption({"x", "gui-scaling"}, "Set scaling factor for GUI elements", "factor"));
4527+
parser.addOption(QCommandLineOption({"S", "style"}, "Load style file", "style"));
4528+
parser.addOption(QCommandLineOption({"p", "plugin"}, "Execure named plugin", "name"));
4529+
parser.addOption(QCommandLineOption( "template-mode", "Save template mode, no page size"));
4530+
parser.addOption(QCommandLineOption({"F", "factory-settings"}, "Use factory settings"));
4531+
parser.addOption(QCommandLineOption({"R", "revert-settings"}, "Revert to default preferences"));
4532+
parser.addOption(QCommandLineOption({"i", "load-icons"}, "Load icons from INSTALLPATH/icons"));
4533+
parser.addOption(QCommandLineOption({"e", "experimental"}, "Enable experimental features"));
4534+
parser.addOption(QCommandLineOption({"c", "config-folder"}, "Override config/settings folder", "dir"));
4535+
parser.addOption(QCommandLineOption({"t", "test-mode"}, "Set testMode flag for all files"));
4536+
parser.addOption(QCommandLineOption({"M", "midi-operations"}, "Specify MIDI import operations file", "file"));
4537+
parser.addOption(QCommandLineOption({"w", "no-webview"}, "No web view in start center"));
45404538
parser.addPositionalArgument("scorefiles", "The files to open", "[scorefile...]");
45414539

45424540
parser.process(QCoreApplication::arguments());

0 commit comments

Comments
 (0)