From abcf558e49d5e8c20eda14badc30e93e2e9cba32 Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Mon, 16 Oct 2017 11:53:53 +0200 Subject: moc: Restore compatibility with Qt 5.7's -b option In Qt 5.7, it was possible to call moc "-bfoo.h" or "-b foo.h" and it had the same effect. With the port to QCommandLineOption, we broke the -b option as it was not annotated as a short option. (Regression in a7e3c17e755881aa3169a2bb662338bbd2c67512) Task-number: QTBUG-63706 Change-Id: I161d0f1a4e65d129063b5e8431802257677da19d Reviewed-by: Jake Petroules Reviewed-by: Thiago Macieira --- src/tools/moc/main.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/tools/moc/main.cpp b/src/tools/moc/main.cpp index b30de66258..98cc9652ab 100644 --- a/src/tools/moc/main.cpp +++ b/src/tools/moc/main.cpp @@ -267,6 +267,7 @@ int runMoc(int argc, char **argv) QCommandLineOption prependIncludeOption(QStringLiteral("b")); prependIncludeOption.setDescription(QStringLiteral("Prepend #include (preserve default include).")); prependIncludeOption.setValueName(QStringLiteral("file")); + prependIncludeOption.setFlags(QCommandLineOption::ShortOptionStyle); parser.addOption(prependIncludeOption); QCommandLineOption includeOption(QStringLiteral("include")); -- cgit v1.2.3