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>
This commit is contained in:
Frederik Gladhorn 2014-12-17 16:09:54 +01:00 committed by Tony Sarajärvi
parent 4295203dd6
commit 8bd84b11d3

View File

@ -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