summaryrefslogtreecommitdiff
path: root/Source/cmQtAutoGenerators.cxx
diff options
context:
space:
mode:
authorSebastian Holtermann <sebholt@xwmw.org>2017-06-19 08:00:46 +0200
committerSebastian Holtermann <sebholt@xwmw.org>2017-06-20 10:49:00 +0200
commit01d2b745aa8f2fd27addbd4f94d3f7d5acb35a15 (patch)
tree029651a0451b4e2beda2870a98f8c74640ecdda2 /Source/cmQtAutoGenerators.cxx
parent829ce06c352e84f9b0b5fdd6acd10429181a91ef (diff)
downloadcmake-01d2b745aa8f2fd27addbd4f94d3f7d5acb35a15.tar.gz
Autogen: Check for Q_OBJECT/Q_GADGET after brace
Closes #16971
Diffstat (limited to 'Source/cmQtAutoGenerators.cxx')
-rw-r--r--Source/cmQtAutoGenerators.cxx6
1 files changed, 4 insertions, 2 deletions
diff --git a/Source/cmQtAutoGenerators.cxx b/Source/cmQtAutoGenerators.cxx
index 27e492834e..7f0bd862ae 100644
--- a/Source/cmQtAutoGenerators.cxx
+++ b/Source/cmQtAutoGenerators.cxx
@@ -281,9 +281,11 @@ cmQtAutoGenerators::cmQtAutoGenerators()
// Moc macro filters
this->MocMacroFilters[0].first = "Q_OBJECT";
- this->MocMacroFilters[0].second.compile("[\n][ \t]*Q_OBJECT[^a-zA-Z0-9_]");
+ this->MocMacroFilters[0].second.compile(
+ "[\n][ \t]*{?[ \t]*Q_OBJECT[^a-zA-Z0-9_]");
this->MocMacroFilters[1].first = "Q_GADGET";
- this->MocMacroFilters[1].second.compile("[\n][ \t]*Q_GADGET[^a-zA-Z0-9_]");
+ this->MocMacroFilters[1].second.compile(
+ "[\n][ \t]*{?[ \t]*Q_GADGET[^a-zA-Z0-9_]");
// Precompile regular expressions
this->MocRegExpInclude.compile(