summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Source/cmQtAutoGenInitializer.cxx9
-rw-r--r--Tests/QtAutogen/MocOsMacros/TestClass.cpp5
-rw-r--r--Tests/QtAutogen/MocOsMacros/TestClass.hpp5
-rw-r--r--Tests/QtAutogen/Tests.cmake3
4 files changed, 14 insertions, 8 deletions
diff --git a/Source/cmQtAutoGenInitializer.cxx b/Source/cmQtAutoGenInitializer.cxx
index 817f0b7..1d7f6d1 100644
--- a/Source/cmQtAutoGenInitializer.cxx
+++ b/Source/cmQtAutoGenInitializer.cxx
@@ -520,13 +520,10 @@ bool cmQtAutoGenInitializer::InitMoc()
// Moc includes
{
- // We need to disable this until we have all implicit includes available.
- // See issue #18669.
- // bool const appendImplicit = (this->QtVersion.Major >= 5);
-
+ bool const appendImplicit = (this->QtVersion.Major >= 5);
auto GetIncludeDirs =
- [this, localGen](std::string const& cfg) -> std::vector<std::string> {
- bool const appendImplicit = false;
+ [this, localGen,
+ appendImplicit](std::string const& cfg) -> std::vector<std::string> {
// Get the include dirs for this target, without stripping the implicit
// include dirs off, see
// https://gitlab.kitware.com/cmake/cmake/issues/13667
diff --git a/Tests/QtAutogen/MocOsMacros/TestClass.cpp b/Tests/QtAutogen/MocOsMacros/TestClass.cpp
index 340d130..13f8fd9 100644
--- a/Tests/QtAutogen/MocOsMacros/TestClass.cpp
+++ b/Tests/QtAutogen/MocOsMacros/TestClass.cpp
@@ -1,6 +1,11 @@
#include "TestClass.hpp"
#include <iostream>
+void TestClass::open()
+{
+ std::cout << "open\n";
+}
+
// -- Mac
#ifndef Q_OS_MAC
void TestClass::MacNotDef()
diff --git a/Tests/QtAutogen/MocOsMacros/TestClass.hpp b/Tests/QtAutogen/MocOsMacros/TestClass.hpp
index 53000aa..87fd494 100644
--- a/Tests/QtAutogen/MocOsMacros/TestClass.hpp
+++ b/Tests/QtAutogen/MocOsMacros/TestClass.hpp
@@ -3,12 +3,17 @@
#include <QObject>
#include <QtGlobal>
+// include qplatformdefs.h for #18669
+#include <qplatformdefs.h>
class TestClass : public QObject
{
Q_OBJECT
public Q_SLOTS:
+ // Method named "open" to test if #18669 is fixed
+ void open();
+
// -- Mac
#ifndef Q_OS_MAC
void MacNotDef();
diff --git a/Tests/QtAutogen/Tests.cmake b/Tests/QtAutogen/Tests.cmake
index c53fb4f..096d5e3 100644
--- a/Tests/QtAutogen/Tests.cmake
+++ b/Tests/QtAutogen/Tests.cmake
@@ -39,8 +39,7 @@ endif()
# Qt5 only tests
if(QT_TEST_VERSION GREATER 4)
ADD_AUTOGEN_TEST(MocMacroName mocMacroName)
- # Disabled for issue #18669
- #ADD_AUTOGEN_TEST(MocOsMacros)
+ ADD_AUTOGEN_TEST(MocOsMacros)
ADD_AUTOGEN_TEST(RerunMocPlugin)
if(APPLE)
ADD_AUTOGEN_TEST(MacOsFW)