summaryrefslogtreecommitdiffstats
path: root/tests/auto/cmake
diff options
context:
space:
mode:
authorFrederik Gladhorn <frederik.gladhorn@theqtcompany.com>2014-12-17 16:09:54 +0100
committerTony Sarajärvi <tony.sarajarvi@digia.com>2014-12-30 10:05:58 +0100
commit8bd84b11d34ad7a7d01f46f157c1a31485eef2e2 (patch)
treebdda6982f9eed24af3cd0c7ef36263809e452ae4 /tests/auto/cmake
parent4295203dd67a4c4d0aa0fe1a8b116069542e4474 (diff)
Fix cmake test_moc_macro_target with namespace
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 <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Tony Sarajärvi <tony.sarajarvi@digia.com> Reviewed-by: Stephen Kelly <steveire@gmail.com>
Diffstat (limited to 'tests/auto/cmake')
-rw-r--r--tests/auto/cmake/test_moc_macro_target/interface/myinterface.h6
1 files changed, 6 insertions, 0 deletions
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 <qglobal.h>
+
class MyInterface
{
};
+QT_BEGIN_NAMESPACE
+
Q_DECLARE_INTERFACE(MyInterface, "org.cmake.example.MyInterface")
+QT_END_NAMESPACE
+
#endif