From 7249e71c722739f35641df35c70a1a5fc5e24a41 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Abecasis?= Date: Thu, 27 May 2010 00:39:48 +0200 Subject: 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 --- tests/auto/qvarlengtharray/tst_qvarlengtharray.cpp | 9 +++++---- 1 file 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; -- cgit v0.12