From 7ea382b5eadb0476d17626ddeb62490d9f4fcaf6 Mon Sep 17 00:00:00 2001 From: Toby Tomkins Date: Wed, 23 Nov 2011 13:05:24 +1000 Subject: Fixed QtSensors autotest namespace compilation. Change-Id: Iaf903df5b74f8793e74a633cf4d42306d1e30263 Sanity-Review: Qt Sanity Bot Reviewed-by: Lincoln Ramsay --- tests/auto/qsensor/tst_qsensor.cpp | 4 ++++ tests/auto/sensors2qmlapi/tst_sensors2qmlapi.cpp | 3 +++ 2 files changed, 7 insertions(+) diff --git a/tests/auto/qsensor/tst_qsensor.cpp b/tests/auto/qsensor/tst_qsensor.cpp index ff495a07..9e8c87a4 100644 --- a/tests/auto/qsensor/tst_qsensor.cpp +++ b/tests/auto/qsensor/tst_qsensor.cpp @@ -54,6 +54,8 @@ #include "test_sensorimpl.h" #include "test_backends.h" +QT_BEGIN_NAMESPACE + // The unit test needs to change the behaviour of the library. It does this // through an exported but undocumented function. Q_SENSORS_EXPORT void sensors_unit_test_hook(int index); @@ -945,6 +947,8 @@ private slots: } }; +QT_END_NAMESPACE + QTEST_MAIN(tst_QSensor) #include "tst_qsensor.moc" diff --git a/tests/auto/sensors2qmlapi/tst_sensors2qmlapi.cpp b/tests/auto/sensors2qmlapi/tst_sensors2qmlapi.cpp index 568019b8..6c1e085b 100644 --- a/tests/auto/sensors2qmlapi/tst_sensors2qmlapi.cpp +++ b/tests/auto/sensors2qmlapi/tst_sensors2qmlapi.cpp @@ -57,6 +57,8 @@ QDeclAccelerometer* TestSensorPlugin::stAccel = 0; QDeclAmbientLightSensor* TestSensorPlugin::stAbl = 0; QDeclProximitySensor* TestSensorPlugin::stProxi = 0; +QT_BEGIN_NAMESPACE + Q_SENSORS_EXPORT void sensors_unit_test_hook(int index); class tst_Sensors2QMLAPI : public QObject @@ -620,6 +622,7 @@ void tst_Sensors2QMLAPI::testGesture() QCOMPARE(spy2_detected.count(), 1); } +QT_END_NAMESPACE QTEST_MAIN(tst_Sensors2QMLAPI) #include "tst_sensors2qmlapi.moc" -- cgit v1.2.3