summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlivier Goffart <ogoffart@woboq.com>2017-10-16 11:53:53 +0200
committerLiang Qi <liang.qi@qt.io>2017-10-24 16:43:47 +0000
commitabcf558e49d5e8c20eda14badc30e93e2e9cba32 (patch)
tree0e0a292f7eeae709f0a2519b58214d6718d3d0a2
parent37a1478787d64b34a0716421c8a47f3246e41bfd (diff)
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 <jake.petroules@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
-rw-r--r--src/tools/moc/main.cpp1
1 files changed, 1 insertions, 0 deletions
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 <file> (preserve default include)."));
prependIncludeOption.setValueName(QStringLiteral("file"));
+ prependIncludeOption.setFlags(QCommandLineOption::ShortOptionStyle);
parser.addOption(prependIncludeOption);
QCommandLineOption includeOption(QStringLiteral("include"));