summaryrefslogtreecommitdiffstats
path: root/Source/cmQtAutoGenerators.cxx
diff options
context:
space:
mode:
authorSebastian Holtermann <sebholt@xwmw.org>2017-09-25 17:47:54 (GMT)
committerSebastian Holtermann <sebholt@xwmw.org>2017-09-27 12:13:12 (GMT)
commit786b5be03bf992fe78a9a6450d5665ab7233a815 (patch)
tree0036cf6097348b824aabf6835637ebe16f1da53e /Source/cmQtAutoGenerators.cxx
parent825baaa1b3698c40ac349f4d2daa45277e64397e (diff)
downloadCMake-786b5be03bf992fe78a9a6450d5665ab7233a815.zip
CMake-786b5be03bf992fe78a9a6450d5665ab7233a815.tar.gz
CMake-786b5be03bf992fe78a9a6450d5665ab7233a815.tar.bz2
Autogen: Define all macro names in CMAKE_AUTOMOC_MACRO_NAMES
Instead of adding `Q_OBJECT` and `Q_GADGET` to the macro search list in `Source/cmQtAutoGenerators.cxx`, add them in `Modules/CMakeGenericSystem.cmake` to the default value of `CMAKE_AUTOMOC_MACRO_NAMES`. Also add `Q_NAMESPACE` to `CMAKE_AUTOMOC_MACRO_NAMES` which closes #17299.
Diffstat (limited to 'Source/cmQtAutoGenerators.cxx')
-rw-r--r--Source/cmQtAutoGenerators.cxx8
1 files changed, 1 insertions, 7 deletions
diff --git a/Source/cmQtAutoGenerators.cxx b/Source/cmQtAutoGenerators.cxx
index bd0fb9a..f13312f 100644
--- a/Source/cmQtAutoGenerators.cxx
+++ b/Source/cmQtAutoGenerators.cxx
@@ -149,12 +149,6 @@ cmQtAutoGenerators::cmQtAutoGenerators()
}
}
- // Moc macro filters
- this->MocMacroFilters.emplace_back(
- "Q_OBJECT", "[\n][ \t]*{?[ \t]*Q_OBJECT[^a-zA-Z0-9_]");
- this->MocMacroFilters.emplace_back(
- "Q_GADGET", "[\n][ \t]*{?[ \t]*Q_GADGET[^a-zA-Z0-9_]");
-
// Precompile regular expressions
this->MocRegExpInclude.compile(
"[\n][ \t]*#[ \t]*include[ \t]+"
@@ -326,7 +320,7 @@ bool cmQtAutoGenerators::InitInfoFile(cmMakefile* makefile,
InfoGetList("AM_MOC_MACRO_NAMES");
for (std::string const& item : MocMacroNames) {
this->MocMacroFilters.emplace_back(
- item, ("[^a-zA-Z0-9_]" + item).append("[^a-zA-Z0-9_]"));
+ item, ("[\n][ \t]*{?[ \t]*" + item).append("[^a-zA-Z0-9_]"));
}
}
{