From 2590135cd8542aa780141b67ab8fa4227ee4fde0 Mon Sep 17 00:00:00 2001 From: hjk Date: Fri, 21 Aug 2009 15:24:17 +0200 Subject: make moc, qregion and qsharedpointer autotest compile with namespaces --- tests/auto/moc/testproject/Plugin/Plugin.h | 2 ++ tests/auto/qregion/tst_qregion.cpp | 7 ++++++- tests/auto/qsharedpointer/tst_qsharedpointer.cpp | 2 ++ tests/auto/qsharedpointer/wrapper.h | 3 +++ .../qsharedpointer_and_qwidget/tst_qsharedpointer_and_qwidget.cpp | 2 ++ 5 files changed, 15 insertions(+), 1 deletion(-) diff --git a/tests/auto/moc/testproject/Plugin/Plugin.h b/tests/auto/moc/testproject/Plugin/Plugin.h index da3fa16..90fd985 100644 --- a/tests/auto/moc/testproject/Plugin/Plugin.h +++ b/tests/auto/moc/testproject/Plugin/Plugin.h @@ -45,6 +45,8 @@ struct MyInterface virtual void blah() = 0; }; +QT_BEGIN_NAMESPACE Q_DECLARE_INTERFACE(MyInterface, "MyInterface") +QT_END_NAMESPACE diff --git a/tests/auto/qregion/tst_qregion.cpp b/tests/auto/qregion/tst_qregion.cpp index 8c49146..063b024 100644 --- a/tests/auto/qregion/tst_qregion.cpp +++ b/tests/auto/qregion/tst_qregion.cpp @@ -965,10 +965,15 @@ void tst_QRegion::regionToPath_data() } } +#ifdef QT_BUILD_INTERNAL +QT_BEGIN_NAMESPACE +extern QPainterPath qt_regionToPath(const QRegion ®ion); +QT_END_NAMESPACE +#endif + void tst_QRegion::regionToPath() { #ifdef QT_BUILD_INTERNAL - extern QPainterPath qt_regionToPath(const QRegion ®ion); QFETCH(QPainterPath, path); diff --git a/tests/auto/qsharedpointer/tst_qsharedpointer.cpp b/tests/auto/qsharedpointer/tst_qsharedpointer.cpp index 50818fe..93f5b6e 100644 --- a/tests/auto/qsharedpointer/tst_qsharedpointer.cpp +++ b/tests/auto/qsharedpointer/tst_qsharedpointer.cpp @@ -51,9 +51,11 @@ #include #include +QT_BEGIN_NAMESPACE namespace QtSharedPointer { Q_CORE_EXPORT void internalSafetyCheckCleanCheck(); } +QT_END_NAMESPACE #ifdef Q_OS_SYMBIAN #define SRCDIR "." diff --git a/tests/auto/qsharedpointer/wrapper.h b/tests/auto/qsharedpointer/wrapper.h index c006686..4445860 100644 --- a/tests/auto/qsharedpointer/wrapper.h +++ b/tests/auto/qsharedpointer/wrapper.h @@ -41,7 +41,10 @@ #ifndef WRAPPER_H #define WRAPPER_H +QT_BEGIN_NAMESPACE template class QSharedPointer; +QT_END_NAMESPACE + class Wrapper { public: diff --git a/tests/auto/qsharedpointer_and_qwidget/tst_qsharedpointer_and_qwidget.cpp b/tests/auto/qsharedpointer_and_qwidget/tst_qsharedpointer_and_qwidget.cpp index d03b999..744e86a 100644 --- a/tests/auto/qsharedpointer_and_qwidget/tst_qsharedpointer_and_qwidget.cpp +++ b/tests/auto/qsharedpointer_and_qwidget/tst_qsharedpointer_and_qwidget.cpp @@ -43,9 +43,11 @@ #include #include +QT_BEGIN_NAMESPACE namespace QtSharedPointer { Q_CORE_EXPORT void internalSafetyCheckCleanCheck(); } +QT_END_NAMESPACE class tst_QSharedPointer_and_QWidget: public QObject { -- cgit v0.12