summaryrefslogtreecommitdiffstats
path: root/src/tools/moc/moc.cpp
diff options
context:
space:
mode:
authorAhmad Samir <a.samirh78@gmail.com>2023-05-23 23:33:54 +0300
committerThiago Macieira <thiago.macieira@intel.com>2023-06-05 15:23:01 -0700
commit58329bbd2be6a4e7f1bf87b3c9fbaea73c8c6a66 (patch)
tree03a623d591c997df091ac78496b591ac4ff31d1d /src/tools/moc/moc.cpp
parent4b4d384f3e8e7e762faf033ad2585e45a5a70514 (diff)
Moc: remove STRINGDATA fallback code
If QT_MOC_HAS_STRINGDATA isn't defined, just put an '#error' directive in the generated code. Since the proposal of doing ±4 versions of tool compatibility hasn't been adopted, just remove the fallback string code. Requested by Thiago in code review. Drive-by changes: - Use "STRINGDATA" in comments too - Remove a now unused static helper Change-Id: I6dbdf427b7219b8b32076a9e0a41799c0a476ff9 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/tools/moc/moc.cpp')
-rw-r--r--src/tools/moc/moc.cpp11
1 files changed, 1 insertions, 10 deletions
diff --git a/src/tools/moc/moc.cpp b/src/tools/moc/moc.cpp
index d4973b87ac..4a9e3463ac 100644
--- a/src/tools/moc/moc.cpp
+++ b/src/tools/moc/moc.cpp
@@ -1111,16 +1111,7 @@ void Moc::generate(FILE *out, FILE *jsonOutput)
for (const QByteArray &qtContainer : qtContainers)
fprintf(out, "#include <QtCore/%s>\n", qtContainer.constData());
- fprintf(out, "\n%s#include <QtCore/qtmochelpers.h>\n%s\n",
-#if QT_VERSION <= QT_VERSION_CHECK(6, 9, 0)
- "#if __has_include(<QtCore/qtmochelpers.h>)\n",
- "#else\n"
- "QT_BEGIN_MOC_NAMESPACE\n"
- "#endif\n"
-#else
- "", ""
-#endif
- );
+ fprintf(out, "\n#include <QtCore/qtmochelpers.h>\n");
fprintf(out, "\n#include <memory>\n\n"); // For std::addressof