diff options
author | Sarah Smith <sarah.j.smith@nokia.com> | 2011-12-23 13:34:10 +1000 |
---|---|---|
committer | Danny Pope <daniel.pope@nokia.com> | 2012-02-01 02:55:21 +0100 |
commit | d9c5034634efb2dec0a4d3976d4931ef6f1ef9b4 (patch) | |
tree | b44c2181206bffd3ece19eb0e3824dd91ce9f7b5 /tests | |
parent | 7f935aca4869feb4a2e2e6559229c311b2f2a370 (diff) |
Fix namespace compilation.
Back-ported from Qt5 changes:
24b1b6bd5c6a3960cfdf71cc644d95926430c267
d641f03b6efecce266ef329eb4bbc48d87c2fc12
2734491c7230bfa54af46ef56085a56e61eed8a0
f037bb1fa72b7dee790367776a913b18a07445ac
Change-Id: I73e2e8996376ea40b9763224554aafba7fe7bdb6
Reviewed-by: Danny Pope <daniel.pope@nokia.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/threed/qglcolladafxeffectfactory/tst_qglcolladafxeffectfactory.cpp | 2 | ||||
-rw-r--r-- | tests/auto/threed/qglpainter/qgltestwidget.h | 2 | ||||
-rw-r--r-- | tests/auto/threed/qray3d/tst_qray3d.cpp | 13 | ||||
-rw-r--r-- | tests/shared/qtest_helpers.h | 4 |
4 files changed, 9 insertions, 12 deletions
diff --git a/tests/auto/threed/qglcolladafxeffectfactory/tst_qglcolladafxeffectfactory.cpp b/tests/auto/threed/qglcolladafxeffectfactory/tst_qglcolladafxeffectfactory.cpp index 7ec91fe63..b60f122b9 100644 --- a/tests/auto/threed/qglcolladafxeffectfactory/tst_qglcolladafxeffectfactory.cpp +++ b/tests/auto/threed/qglcolladafxeffectfactory/tst_qglcolladafxeffectfactory.cpp @@ -45,7 +45,9 @@ #include <QColor> #include "qgl.h" +QT_BEGIN_NAMESPACE class QGLColladaFxEffect; +QT_END_NAMESPACE Q_DECLARE_METATYPE(QGLColladaFxEffect*) diff --git a/tests/auto/threed/qglpainter/qgltestwidget.h b/tests/auto/threed/qglpainter/qgltestwidget.h index e4967e058..7fb17e6a3 100644 --- a/tests/auto/threed/qglpainter/qgltestwidget.h +++ b/tests/auto/threed/qglpainter/qgltestwidget.h @@ -44,7 +44,9 @@ #include <QtOpenGL/qgl.h> +QT_BEGIN_NAMESPACE class QEventLoop; +QT_END_NAMESPACE class QGLTestWidget : public QGLWidget { diff --git a/tests/auto/threed/qray3d/tst_qray3d.cpp b/tests/auto/threed/qray3d/tst_qray3d.cpp index 9380213ed..97263c993 100644 --- a/tests/auto/threed/qray3d/tst_qray3d.cpp +++ b/tests/auto/threed/qray3d/tst_qray3d.cpp @@ -41,6 +41,7 @@ #include <QtTest/QtTest> #include "qray3d.h" +#include "../../../shared/qtest_helpers.h" class tst_QRay3D : public QObject { @@ -99,18 +100,6 @@ static inline bool fuzzyCompare(const QVector3D &lhs, const QVector3D &rhs) return false; } -// make failed QCOMPARE messages more detailed than "Compared values are not -// the same" -namespace QTest { - -template <> -inline char *toString(const QVector3D& vec) -{ - return qstrdup(qPrintable(QString::fromLatin1("(%1, %2, %3)").arg(vec.x()).arg(vec.y()).arg(vec.z()))); -} - -}; - void tst_QRay3D::create_data() { QTest::addColumn<QVector3D>("point"); diff --git a/tests/shared/qtest_helpers.h b/tests/shared/qtest_helpers.h index d7fb67aa5..b32be7a28 100644 --- a/tests/shared/qtest_helpers.h +++ b/tests/shared/qtest_helpers.h @@ -59,6 +59,8 @@ #include <QtGui/qvector2d.h> #include "qcolor4ub.h" +QT_BEGIN_NAMESPACE + namespace QTest { char *toString(const QVector4D &v) { @@ -152,4 +154,6 @@ namespace QTest { }; +QT_END_NAMESPACE + #endif // QTEST_HELPERS_H |