summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJoão Abecasis <joao.abecasis@nokia.com>2010-05-26 22:39:48 (GMT)
committerJoão Abecasis <joao.abecasis@nokia.com>2010-05-26 22:39:48 (GMT)
commit7249e71c722739f35641df35c70a1a5fc5e24a41 (patch)
tree80f58058ca11d3be1eaa5cf90132150a73b75a59 /tests
parent8060094144d6104659b8ce3b88d6f8b1e53cfb59 (diff)
downloadQt-7249e71c722739f35641df35c70a1a5fc5e24a41.zip
Qt-7249e71c722739f35641df35c70a1a5fc5e24a41.tar.gz
Qt-7249e71c722739f35641df35c70a1a5fc5e24a41.tar.bz2
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')
-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 0b7dc13..39805e1 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;