From 8bd84b11d34ad7a7d01f46f157c1a31485eef2e2 Mon Sep 17 00:00:00 2001 From: Frederik Gladhorn Date: Wed, 17 Dec 2014 16:09:54 +0100 Subject: Fix cmake test_moc_macro_target with namespace MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The interface macro needs to be in the Qt namespace, otherwise the template specialization in Q_DECLARE_INTERFACE fails. Task-number: QTBUG-41959 Change-Id: I818da5ba8460219d73c0d248ee410ac92f7498f4 Reviewed-by: Oswald Buddenhagen Reviewed-by: Tony Sarajärvi Reviewed-by: Stephen Kelly --- tests/auto/cmake/test_moc_macro_target/interface/myinterface.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'tests/auto/cmake') diff --git a/tests/auto/cmake/test_moc_macro_target/interface/myinterface.h b/tests/auto/cmake/test_moc_macro_target/interface/myinterface.h index 2558406486..becfe3037c 100644 --- a/tests/auto/cmake/test_moc_macro_target/interface/myinterface.h +++ b/tests/auto/cmake/test_moc_macro_target/interface/myinterface.h @@ -34,11 +34,17 @@ #ifndef MYINTERFACE_H #define MYINTERFACE_H +#include + class MyInterface { }; +QT_BEGIN_NAMESPACE + Q_DECLARE_INTERFACE(MyInterface, "org.cmake.example.MyInterface") +QT_END_NAMESPACE + #endif -- cgit v1.2.3