summaryrefslogtreecommitdiffstats
path: root/tests/auto/qvarlengtharray
diff options
context:
space:
mode:
authorJoão Abecasis <joao.abecasis@nokia.com>2010-05-27 00:39:48 +0200
committerJoão Abecasis <joao.abecasis@nokia.com>2010-05-27 00:39:48 +0200
commit7249e71c722739f35641df35c70a1a5fc5e24a41 (patch)
tree80f58058ca11d3be1eaa5cf90132150a73b75a59 /tests/auto/qvarlengtharray
parent8060094144d6104659b8ce3b88d6f8b1e53cfb59 (diff)
Allow auto-test to compile when using namespaces
Auto-test added in 8060094144d6104659b8ce3b88d6f8b1e53cfb59 does not compile when using Qt in namespace, because Q_DECLARE_TYPEINFO needs to be used from inside QT_NAMESPACE. Wrapper macros added. Task-number: QTBUG-10978
Diffstat (limited to 'tests/auto/qvarlengtharray')
-rw-r--r--tests/auto/qvarlengtharray/tst_qvarlengtharray.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/tests/auto/qvarlengtharray/tst_qvarlengtharray.cpp b/tests/auto/qvarlengtharray/tst_qvarlengtharray.cpp
index 0b7dc131cd..39805e1c04 100644
--- a/tests/auto/qvarlengtharray/tst_qvarlengtharray.cpp
+++ b/tests/auto/qvarlengtharray/tst_qvarlengtharray.cpp
@@ -375,22 +375,23 @@ struct MyPrimitive
}
};
-Q_DECLARE_TYPEINFO(MyPrimitive, Q_PRIMITIVE_TYPE);
-
struct MyMovable
: MyBase
{
};
-Q_DECLARE_TYPEINFO(MyMovable, Q_MOVABLE_TYPE);
-
struct MyComplex
: MyBase
{
};
+QT_BEGIN_NAMESPACE
+
+Q_DECLARE_TYPEINFO(MyPrimitive, Q_PRIMITIVE_TYPE);
+Q_DECLARE_TYPEINFO(MyMovable, Q_MOVABLE_TYPE);
Q_DECLARE_TYPEINFO(MyComplex, Q_COMPLEX_TYPE);
+QT_END_NAMESPACE
bool QTBUG10978_proceed = true;