From 03dbb62d31d4a115fed09049cf6995ce89d2fabe Mon Sep 17 00:00:00 2001 From: Sebastian Holtermann Date: Fri, 25 Jan 2019 19:09:45 +0100 Subject: Autogen: Reenable passing compiler implicit include directories to moc Since commit 5990ecb741 (Compute implicit include directories from compiler output, 2018-12-07) we now have compiler implicit include directory computation for gcc and clang. It should be safe now to pass these to `moc`. This patch re-enables passing the compiler implicit include directories to `moc`, which was disabled due to issue #18669. Fixes: #18041 Issue: #18669 --- Tests/QtAutogen/MocOsMacros/TestClass.cpp | 5 +++++ Tests/QtAutogen/MocOsMacros/TestClass.hpp | 5 +++++ Tests/QtAutogen/Tests.cmake | 3 +-- 3 files changed, 11 insertions(+), 2 deletions(-) (limited to 'Tests/QtAutogen') diff --git a/Tests/QtAutogen/MocOsMacros/TestClass.cpp b/Tests/QtAutogen/MocOsMacros/TestClass.cpp index 340d130b14..13f8fd93aa 100644 --- a/Tests/QtAutogen/MocOsMacros/TestClass.cpp +++ b/Tests/QtAutogen/MocOsMacros/TestClass.cpp @@ -1,6 +1,11 @@ #include "TestClass.hpp" #include +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 53000aa79c..87fd494789 100644 --- a/Tests/QtAutogen/MocOsMacros/TestClass.hpp +++ b/Tests/QtAutogen/MocOsMacros/TestClass.hpp @@ -3,12 +3,17 @@ #include #include +// include qplatformdefs.h for #18669 +#include 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 c53fb4f1d8..096d5e3bd5 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) -- cgit v1.2.1