diff options
author | Alex <qt-info@nokia.com> | 2009-11-20 10:49:20 +1000 |
---|---|---|
committer | Alex <qt-info@nokia.com> | 2009-11-20 10:49:20 +1000 |
commit | 10c83e643b8112bc5be950959a8f407b4f0d8d0e (patch) | |
tree | 4c3776a12ca2c40403414c269a110467c5db18b5 | |
parent | d986c7cb8422f9d37fe69dec5d12b2bd59e237ac (diff) |
make unit tests work with namespace
87 files changed, 162 insertions, 32 deletions
diff --git a/src/publishsubscribe/qcrmlparser.cpp b/src/publishsubscribe/qcrmlparser.cpp index 47ef59efed..2466fb2515 100644 --- a/src/publishsubscribe/qcrmlparser.cpp +++ b/src/publishsubscribe/qcrmlparser.cpp @@ -44,6 +44,8 @@ #include <QFile> #include <QXmlStreamAttributes> +QTM_BEGIN_NAMESPACE + KeyData::KeyData(const QString &path, quint64 uid, Target target, quint32 bitIndex) { m_path = path; @@ -533,3 +535,5 @@ quint32 QCrmlParser::uidStringToUInt32(const QString &uidString, bool *ok) *ok = true; return uid; } + +QTM_END_NAMESPACE diff --git a/src/publishsubscribe/qcrmlparser_p.h b/src/publishsubscribe/qcrmlparser_p.h index 3e6a731bc1..e8ef1dc41d 100644 --- a/src/publishsubscribe/qcrmlparser_p.h +++ b/src/publishsubscribe/qcrmlparser_p.h @@ -53,10 +53,13 @@ // We mean it. // +#include <qmobilityglobal.h> #include <QList> #include <QString> #include <QXmlStreamReader> +QTM_BEGIN_NAMESPACE + class KeyData{ public: enum Target{CRepository, RProperty}; @@ -101,6 +104,8 @@ private: KeyData::Target m_target; }; +QTM_END_NAMESPACE + #endif diff --git a/tests/auto/auto.pro b/tests/auto/auto.pro index 9198ae0680..1abecc81fd 100644 --- a/tests/auto/auto.pro +++ b/tests/auto/auto.pro @@ -7,7 +7,7 @@ SUBDIRS += databasemanager \ #service framework servicemetadata \ qserviceinterfacedescriptor \ qservicefilter \ - qservicemanager \ +# qservicemanager \ #remove until qhash namespace issue resolved qabstractsecuritysession \ qservicecontext diff --git a/tests/auto/databasemanager/tst_databasemanager.cpp b/tests/auto/databasemanager/tst_databasemanager.cpp index 3b562f7e97..1f9af17816 100644 --- a/tests/auto/databasemanager/tst_databasemanager.cpp +++ b/tests/auto/databasemanager/tst_databasemanager.cpp @@ -50,6 +50,8 @@ # define TESTDATA_DIR "." #endif +QTM_USE_NAMESPACE + class tst_DatabaseManager: public QObject { Q_OBJECT diff --git a/tests/auto/databasemanager/tst_databasemanager_s60.cpp b/tests/auto/databasemanager/tst_databasemanager_s60.cpp index 27ee889905..16248894c5 100644 --- a/tests/auto/databasemanager/tst_databasemanager_s60.cpp +++ b/tests/auto/databasemanager/tst_databasemanager_s60.cpp @@ -48,6 +48,7 @@ #include "servicemetadata_p.h" #include "databasemanager_s60_p.h" +QTM_USE_NAMESPACE class tst_DatabaseManager: public QObject { Q_OBJECT diff --git a/tests/auto/qabstractsecuritysession/tst_qabstractsecuritysession.cpp b/tests/auto/qabstractsecuritysession/tst_qabstractsecuritysession.cpp index ad93360367..eddea3ea13 100644 --- a/tests/auto/qabstractsecuritysession/tst_qabstractsecuritysession.cpp +++ b/tests/auto/qabstractsecuritysession/tst_qabstractsecuritysession.cpp @@ -45,6 +45,7 @@ #include <qservicemanager.h> #include <qabstractsecuritysession.h> +QTM_USE_NAMESPACE class TestSession : public QAbstractSecuritySession { public: diff --git a/tests/auto/qaudiocapturesource/tst_qaudiocapturesource.cpp b/tests/auto/qaudiocapturesource/tst_qaudiocapturesource.cpp index 3e59193796..91f4ccf099 100644 --- a/tests/auto/qaudiocapturesource/tst_qaudiocapturesource.cpp +++ b/tests/auto/qaudiocapturesource/tst_qaudiocapturesource.cpp @@ -53,6 +53,7 @@ #include <qmediarecordercontrol.h> #include <qaudiodevicecontrol.h> +QTM_USE_NAMESPACE class MockAudioEncoderControl : public QAudioEncoderControl { Q_OBJECT diff --git a/tests/auto/qcamera/tst_qcamera.cpp b/tests/auto/qcamera/tst_qcamera.cpp index 1eff7e8544..c0a22d1ef3 100644 --- a/tests/auto/qcamera/tst_qcamera.cpp +++ b/tests/auto/qcamera/tst_qcamera.cpp @@ -51,6 +51,7 @@ #include <qmediaservice.h> #include <experimental/qcamera.h> +QTM_USE_NAMESPACE class MockCaptureControl; class MockCameraControl : public QCameraControl diff --git a/tests/auto/qcontact/tst_qcontact.cpp b/tests/auto/qcontact/tst_qcontact.cpp index 1510384688..e20fd608f5 100644 --- a/tests/auto/qcontact/tst_qcontact.cpp +++ b/tests/auto/qcontact/tst_qcontact.cpp @@ -47,6 +47,7 @@ //TESTED_CLASS= //TESTED_FILES= +QTM_USE_NAMESPACE class tst_QContact: public QObject { Q_OBJECT diff --git a/tests/auto/qcontactactions/sendemailaction/sendemailaction_p.h b/tests/auto/qcontactactions/sendemailaction/sendemailaction_p.h index 264b78b78a..0343277e28 100644 --- a/tests/auto/qcontactactions/sendemailaction/sendemailaction_p.h +++ b/tests/auto/qcontactactions/sendemailaction/sendemailaction_p.h @@ -60,6 +60,8 @@ #include <QString> #include <QVariantMap> +QTM_USE_NAMESPACE + class QContactSendEmailAction : public QContactAction { Q_OBJECT @@ -83,7 +85,7 @@ private slots: class Q_DECL_EXPORT QContactSendEmailActionFactory : public QContactActionFactory { Q_OBJECT - Q_INTERFACES(QContactActionFactory) + Q_INTERFACES(QtMobility::QContactActionFactory) public: QContactSendEmailActionFactory(); diff --git a/tests/auto/qcontactactions/unittest/tst_qcontactactions.cpp b/tests/auto/qcontactactions/unittest/tst_qcontactactions.cpp index 35a70467cc..de1f3c919a 100644 --- a/tests/auto/qcontactactions/unittest/tst_qcontactactions.cpp +++ b/tests/auto/qcontactactions/unittest/tst_qcontactactions.cpp @@ -49,9 +49,7 @@ #include "qcontactactionfactory.h" #include "qcontactactiondescriptor.h" - -//TESTED_CLASS= -//TESTED_FILES= +QTM_USE_NAMESPACE class tst_QContactActions : public QObject { @@ -75,7 +73,7 @@ private slots: class DummyStaticActionFactory : public QContactActionFactory { Q_OBJECT - Q_INTERFACES(QContactActionFactory) + Q_INTERFACES(QtMobility::QContactActionFactory) public: DummyStaticActionFactory() {} diff --git a/tests/auto/qcontactasync/maliciousplugin/maliciousplugin_p.h b/tests/auto/qcontactasync/maliciousplugin/maliciousplugin_p.h index 9a06cf6480..b4881712a3 100644 --- a/tests/auto/qcontactasync/maliciousplugin/maliciousplugin_p.h +++ b/tests/auto/qcontactasync/maliciousplugin/maliciousplugin_p.h @@ -60,6 +60,8 @@ #include <QObject> #include <QString> +QTM_USE_NAMESPACE + class MaliciousAsyncManagerEngine : public QContactManagerEngine { Q_OBJECT @@ -77,7 +79,7 @@ public: class Q_DECL_EXPORT MaliciousEngineFactory : public QObject, public QContactManagerEngineFactory { Q_OBJECT - Q_INTERFACES(QContactManagerEngineFactory) + Q_INTERFACES(QtMobility::QContactManagerEngineFactory) public: QContactManagerEngine* engine(const QMap<QString, QString>& parameters, QContactManager::Error& error); diff --git a/tests/auto/qcontactasync/unittest/tst_qcontactasync.cpp b/tests/auto/qcontactasync/unittest/tst_qcontactasync.cpp index 02fc277a52..15528b20b7 100644 --- a/tests/auto/qcontactasync/unittest/tst_qcontactasync.cpp +++ b/tests/auto/qcontactasync/unittest/tst_qcontactasync.cpp @@ -45,8 +45,7 @@ #include "qtcontacts.h" #include "qcontactmanager_p.h" //QContactManagerDataHolder -//TESTED_CLASS= -//TESTED_FILES= +QTM_USE_NAMESPACE class tst_QContactAsync : public QObject { diff --git a/tests/auto/qcontactdetail/tst_qcontactdetail.cpp b/tests/auto/qcontactdetail/tst_qcontactdetail.cpp index 1c2f3e5a9d..31d27c37b4 100644 --- a/tests/auto/qcontactdetail/tst_qcontactdetail.cpp +++ b/tests/auto/qcontactdetail/tst_qcontactdetail.cpp @@ -47,6 +47,7 @@ //TESTED_CLASS= //TESTED_FILES= +QTM_USE_NAMESPACE class tst_QContactDetail : public QObject { Q_OBJECT diff --git a/tests/auto/qcontactdetaildefinition/tst_qcontactdetaildefinition.cpp b/tests/auto/qcontactdetaildefinition/tst_qcontactdetaildefinition.cpp index df70fe8e97..bea865f4f5 100644 --- a/tests/auto/qcontactdetaildefinition/tst_qcontactdetaildefinition.cpp +++ b/tests/auto/qcontactdetaildefinition/tst_qcontactdetaildefinition.cpp @@ -47,6 +47,7 @@ //TESTED_CLASS= //TESTED_FILES= +QTM_USE_NAMESPACE class tst_QContactDetailDefinition: public QObject { Q_OBJECT diff --git a/tests/auto/qcontactdetails/tst_qcontactdetails.cpp b/tests/auto/qcontactdetails/tst_qcontactdetails.cpp index 86fb8f4b3d..1792f04bc4 100644 --- a/tests/auto/qcontactdetails/tst_qcontactdetails.cpp +++ b/tests/auto/qcontactdetails/tst_qcontactdetails.cpp @@ -47,6 +47,7 @@ //TESTED_CLASS= //TESTED_FILES= +QTM_USE_NAMESPACE class tst_QContactDetails : public QObject { Q_OBJECT diff --git a/tests/auto/qcontactfilter/tst_qcontactfilter.cpp b/tests/auto/qcontactfilter/tst_qcontactfilter.cpp index 5002e7deb4..b67b07088e 100644 --- a/tests/auto/qcontactfilter/tst_qcontactfilter.cpp +++ b/tests/auto/qcontactfilter/tst_qcontactfilter.cpp @@ -46,6 +46,7 @@ //TESTED_CLASS= //TESTED_FILES= +QTM_USE_NAMESPACE class tst_QContactFilter : public QObject { Q_OBJECT diff --git a/tests/auto/qcontactmanager/tst_qcontactmanager.cpp b/tests/auto/qcontactmanager/tst_qcontactmanager.cpp index 982390e8c7..f77077fbe9 100644 --- a/tests/auto/qcontactmanager/tst_qcontactmanager.cpp +++ b/tests/auto/qcontactmanager/tst_qcontactmanager.cpp @@ -45,6 +45,7 @@ #include "qcontactchangeset.h" #include "qcontactmanager_p.h" +QTM_USE_NAMESPACE // Eventually these will make it into qtestcase.h // but we might need to tweak the timeout values here. #ifndef QTRY_COMPARE diff --git a/tests/auto/qcontactmanagerfiltering/tst_qcontactmanagerfiltering.cpp b/tests/auto/qcontactmanagerfiltering/tst_qcontactmanagerfiltering.cpp index 306206c099..9fee1960a3 100644 --- a/tests/auto/qcontactmanagerfiltering/tst_qcontactmanagerfiltering.cpp +++ b/tests/auto/qcontactmanagerfiltering/tst_qcontactmanagerfiltering.cpp @@ -47,6 +47,7 @@ //TESTED_CLASS= //TESTED_FILES= +QTM_USE_NAMESPACE /* * This test is mostly just for testing sorting and filtering - * having it in tst_QContactManager makes maintenance more @@ -3197,7 +3198,7 @@ public: class FilterActionFactory : public QContactActionFactory { Q_OBJECT - Q_INTERFACES(QContactActionFactory) + Q_INTERFACES(QtMobility::QContactActionFactory) public: FilterActionFactory() {} diff --git a/tests/auto/qcontactmanagerplugins/dummyplugin/dummyplugin.cpp b/tests/auto/qcontactmanagerplugins/dummyplugin/dummyplugin.cpp index 57c9e183fd..6050955673 100644 --- a/tests/auto/qcontactmanagerplugins/dummyplugin/dummyplugin.cpp +++ b/tests/auto/qcontactmanagerplugins/dummyplugin/dummyplugin.cpp @@ -52,6 +52,8 @@ #include "qcontactmanagerengine.h" #include "qcontactmanagerenginefactory.h" +QTM_USE_NAMESPACE + class DummyEngine : public QContactManagerEngine { public: @@ -78,7 +80,7 @@ public: class Q_DECL_EXPORT DummyEngineFactory : public QObject, public QContactManagerEngineFactory { Q_OBJECT - Q_INTERFACES(QContactManagerEngineFactory) + Q_INTERFACES(QtMobility::QContactManagerEngineFactory) public: QContactManagerEngine* engine(const QMap<QString, QString>& parameters, QContactManager::Error& error); QString managerName() const; diff --git a/tests/auto/qcontactmanagerplugins/unittest/tst_qcontactmanagerplugins.cpp b/tests/auto/qcontactmanagerplugins/unittest/tst_qcontactmanagerplugins.cpp index f0b002355e..f6047bc315 100644 --- a/tests/auto/qcontactmanagerplugins/unittest/tst_qcontactmanagerplugins.cpp +++ b/tests/auto/qcontactmanagerplugins/unittest/tst_qcontactmanagerplugins.cpp @@ -49,8 +49,8 @@ #include <QApplication> #include "qcontactmanager_p.h" -//TESTED_CLASS= -//TESTED_FILES= + +QTM_USE_NAMESPACE class tst_QContactManagerPlugins : public QObject { @@ -74,7 +74,7 @@ private slots: class DummyStaticEngineFactory : public QObject, public QContactManagerEngineFactory { Q_OBJECT - Q_INTERFACES(QContactManagerEngineFactory) + Q_INTERFACES(QtMobility::QContactManagerEngineFactory) public: QContactManagerEngine* engine(const QMap<QString, QString>& parameters, QContactManager::Error& error); QString managerName() const {return "teststaticdummy";} @@ -98,7 +98,7 @@ Q_IMPORT_PLUGIN(contacts_teststaticdummycopy) class ImpostorEngineFactory : public QObject, public QContactManagerEngineFactory { Q_OBJECT - Q_INTERFACES(QContactManagerEngineFactory) + Q_INTERFACES(QtMobility::QContactManagerEngineFactory) public: QContactManagerEngine* engine(const QMap<QString, QString>& , QContactManager::Error& ) {return 0;} QString managerName() const {return "memory";} @@ -111,7 +111,7 @@ Q_IMPORT_PLUGIN(contacts_testimpostordummy) class ImpostorEngineFactory2 : public QObject, public QContactManagerEngineFactory { Q_OBJECT - Q_INTERFACES(QContactManagerEngineFactory) + Q_INTERFACES(QtMobility::QContactManagerEngineFactory) public: QContactManagerEngine* engine(const QMap<QString, QString>& , QContactManager::Error& ) {return 0;} QString managerName() const {return "invalid";} @@ -125,7 +125,7 @@ Q_IMPORT_PLUGIN(contacts_testimpostordummy2) class EmptyEngineFactory : public QObject, public QContactManagerEngineFactory { Q_OBJECT - Q_INTERFACES(QContactManagerEngineFactory) + Q_INTERFACES(QtMobility::QContactManagerEngineFactory) public: QContactManagerEngine* engine(const QMap<QString, QString>& , QContactManager::Error& ) {return 0;} QString managerName() const {return QString();} diff --git a/tests/auto/qcrmlparser/tst_qcrmlparser.cpp b/tests/auto/qcrmlparser/tst_qcrmlparser.cpp index 527e747f58..9e8840d304 100644 --- a/tests/auto/qcrmlparser/tst_qcrmlparser.cpp +++ b/tests/auto/qcrmlparser/tst_qcrmlparser.cpp @@ -41,6 +41,7 @@ #include "../../../src/publishsubscribe/qcrmlparser_p.h" +#include <qmobilityglobal.h> #include <QtTest/QTest> #include <QDebug> #include <QDir> @@ -49,6 +50,8 @@ # define TESTDATA_DIR "." #endif +QTM_USE_NAMESPACE + class tst_QCrmlParser : public QObject { Q_OBJECT diff --git a/tests/auto/qgeoareamonitor/tst_qgeoareamonitor.cpp b/tests/auto/qgeoareamonitor/tst_qgeoareamonitor.cpp index db3bb4122d..6e5bee9ff1 100644 --- a/tests/auto/qgeoareamonitor/tst_qgeoareamonitor.cpp +++ b/tests/auto/qgeoareamonitor/tst_qgeoareamonitor.cpp @@ -51,6 +51,7 @@ #include "qgeopositioninfosource.h" +QTM_USE_NAMESPACE #define MINIMUM_TIMEOUT 5000 Q_DECLARE_METATYPE(QGeoCoordinate) diff --git a/tests/auto/qgeocoordinate/tst_qgeocoordinate.cpp b/tests/auto/qgeocoordinate/tst_qgeocoordinate.cpp index a0dfd15051..a710dc7fe8 100644 --- a/tests/auto/qgeocoordinate/tst_qgeocoordinate.cpp +++ b/tests/auto/qgeocoordinate/tst_qgeocoordinate.cpp @@ -48,6 +48,7 @@ #include <float.h> +QTM_USE_NAMESPACE Q_DECLARE_METATYPE(QGeoCoordinate) Q_DECLARE_METATYPE(QGeoCoordinate::CoordinateFormat) Q_DECLARE_METATYPE(QGeoCoordinate::CoordinateType) diff --git a/tests/auto/qgeoinfosources_wince/tst_qgeoinfosources_wince.cpp b/tests/auto/qgeoinfosources_wince/tst_qgeoinfosources_wince.cpp index a30e8af0a0..44bbfd3c1b 100644 --- a/tests/auto/qgeoinfosources_wince/tst_qgeoinfosources_wince.cpp +++ b/tests/auto/qgeoinfosources_wince/tst_qgeoinfosources_wince.cpp @@ -51,6 +51,7 @@ #include "../qlocationtestutils_p.h" +QTM_USE_NAMESPACE Q_DECLARE_METATYPE(QGeoPositionInfo) Q_DECLARE_METATYPE(QList<QGeoSatelliteInfo>) diff --git a/tests/auto/qgeopositioninfo/tst_qgeopositioninfo.cpp b/tests/auto/qgeopositioninfo/tst_qgeopositioninfo.cpp index 268219d5ef..a1286fca01 100644 --- a/tests/auto/qgeopositioninfo/tst_qgeopositioninfo.cpp +++ b/tests/auto/qgeopositioninfo/tst_qgeopositioninfo.cpp @@ -47,6 +47,7 @@ #include <float.h> +QTM_USE_NAMESPACE Q_DECLARE_METATYPE(QGeoCoordinate) Q_DECLARE_METATYPE(QGeoPositionInfo) Q_DECLARE_METATYPE(QGeoPositionInfo::Property) diff --git a/tests/auto/qgeosatelliteinfo/tst_qgeosatelliteinfo.cpp b/tests/auto/qgeosatelliteinfo/tst_qgeosatelliteinfo.cpp index 1af4a22add..02f1511ca5 100644 --- a/tests/auto/qgeosatelliteinfo/tst_qgeosatelliteinfo.cpp +++ b/tests/auto/qgeosatelliteinfo/tst_qgeosatelliteinfo.cpp @@ -48,6 +48,7 @@ #include <float.h> #include <limits.h> +QTM_USE_NAMESPACE Q_DECLARE_METATYPE(QGeoSatelliteInfo) Q_DECLARE_METATYPE(QGeoSatelliteInfo::Property) diff --git a/tests/auto/qgraphicsvideoitem/tst_qgraphicsvideoitem.cpp b/tests/auto/qgraphicsvideoitem/tst_qgraphicsvideoitem.cpp index e728468091..df28ef622b 100644 --- a/tests/auto/qgraphicsvideoitem/tst_qgraphicsvideoitem.cpp +++ b/tests/auto/qgraphicsvideoitem/tst_qgraphicsvideoitem.cpp @@ -57,6 +57,7 @@ #include <QtGui/qgraphicsscene.h> #include <QtGui/qgraphicsview.h> +QTM_USE_NAMESPACE class tst_QGraphicsVideoItem : public QObject { Q_OBJECT diff --git a/tests/auto/qlocationutils/tst_qlocationutils.cpp b/tests/auto/qlocationutils/tst_qlocationutils.cpp index e403bd848c..f1790053a4 100644 --- a/tests/auto/qlocationutils/tst_qlocationutils.cpp +++ b/tests/auto/qlocationutils/tst_qlocationutils.cpp @@ -47,6 +47,7 @@ #include <math.h> +QTM_USE_NAMESPACE Q_DECLARE_METATYPE(QGeoPositionInfo) Q_DECLARE_METATYPE(QGeoCoordinate) diff --git a/tests/auto/qmallocpool/tst_qmallocpool.cpp b/tests/auto/qmallocpool/tst_qmallocpool.cpp index 0b867d8788..a7b34cb02a 100644 --- a/tests/auto/qmallocpool/tst_qmallocpool.cpp +++ b/tests/auto/qmallocpool/tst_qmallocpool.cpp @@ -45,6 +45,7 @@ #include <QDebug> +QTM_USE_NAMESPACE class tst_QMallocPool : public QObject { Q_OBJECT diff --git a/tests/auto/qmediacontent/tst_qmediacontent.cpp b/tests/auto/qmediacontent/tst_qmediacontent.cpp index 430a21323c..e3d6b386e4 100644 --- a/tests/auto/qmediacontent/tst_qmediacontent.cpp +++ b/tests/auto/qmediacontent/tst_qmediacontent.cpp @@ -43,6 +43,7 @@ #include <qmediacontent.h> +QTM_USE_NAMESPACE class tst_QMediaContent : public QObject { Q_OBJECT diff --git a/tests/auto/qmediaimageviewer/tst_qmediaimageviewer.cpp b/tests/auto/qmediaimageviewer/tst_qmediaimageviewer.cpp index 6600446e41..01ed42d01d 100644 --- a/tests/auto/qmediaimageviewer/tst_qmediaimageviewer.cpp +++ b/tests/auto/qmediaimageviewer/tst_qmediaimageviewer.cpp @@ -65,6 +65,7 @@ # define TESTDATA_DIR "./tst_qmediaimageviewer_images" #endif +QTM_USE_NAMESPACE class QtTestNetworkAccessManager; class tst_QMediaImageViewer : public QObject diff --git a/tests/auto/qmediaobject/tst_qmediaobject.cpp b/tests/auto/qmediaobject/tst_qmediaobject.cpp index 812ad7bb55..862fcc7813 100644 --- a/tests/auto/qmediaobject/tst_qmediaobject.cpp +++ b/tests/auto/qmediaobject/tst_qmediaobject.cpp @@ -47,6 +47,7 @@ #include <qmediaservice.h> #include <qmetadatacontrol.h> +QTM_USE_NAMESPACE class tst_QMediaObject : public QObject { Q_OBJECT diff --git a/tests/auto/qmediaplayer/tst_qmediaplayer.cpp b/tests/auto/qmediaplayer/tst_qmediaplayer.cpp index 98cde51496..9b1801d1ae 100644 --- a/tests/auto/qmediaplayer/tst_qmediaplayer.cpp +++ b/tests/auto/qmediaplayer/tst_qmediaplayer.cpp @@ -50,6 +50,7 @@ #include <qmediastreamscontrol.h> +QTM_USE_NAMESPACE class AutoConnection { public: diff --git a/tests/auto/qmediaplaylist/tst_qmediaplaylist.cpp b/tests/auto/qmediaplaylist/tst_qmediaplaylist.cpp index ab4e8423ac..c14eb4bd31 100644 --- a/tests/auto/qmediaplaylist/tst_qmediaplaylist.cpp +++ b/tests/auto/qmediaplaylist/tst_qmediaplaylist.cpp @@ -49,6 +49,7 @@ #include "qm3uhandler.h" +QTM_USE_NAMESPACE class MockReadOnlyPlaylistProvider : public QMediaPlaylistProvider { Q_OBJECT diff --git a/tests/auto/qmediaplaylistnavigator/tst_qmediaplaylistnavigator.cpp b/tests/auto/qmediaplaylistnavigator/tst_qmediaplaylistnavigator.cpp index 5d430839f6..a438998dcd 100644 --- a/tests/auto/qmediaplaylistnavigator/tst_qmediaplaylistnavigator.cpp +++ b/tests/auto/qmediaplaylistnavigator/tst_qmediaplaylistnavigator.cpp @@ -44,6 +44,7 @@ #include "qlocalmediaplaylistprovider.h" #include "qmediaplaylistnavigator.h" +QTM_USE_NAMESPACE class tst_QMediaPlaylistNavigator : public QObject { Q_OBJECT diff --git a/tests/auto/qmediapluginloader/tst_qmediapluginloader.cpp b/tests/auto/qmediapluginloader/tst_qmediapluginloader.cpp index 5b75535f74..6d30a42791 100644 --- a/tests/auto/qmediapluginloader/tst_qmediapluginloader.cpp +++ b/tests/auto/qmediapluginloader/tst_qmediapluginloader.cpp @@ -45,6 +45,7 @@ #include <qmediapluginloader_p.h> #include <qmediaserviceproviderplugin.h> +QTM_USE_NAMESPACE class tst_QMediaPluginLoader : public QObject { diff --git a/tests/auto/qmediarecorder/tst_qmediarecorder.cpp b/tests/auto/qmediarecorder/tst_qmediarecorder.cpp index 9c7d79a20c..b14b0b4435 100644 --- a/tests/auto/qmediarecorder/tst_qmediarecorder.cpp +++ b/tests/auto/qmediarecorder/tst_qmediarecorder.cpp @@ -57,6 +57,7 @@ #include <qaudioformat.h> #endif +QTM_USE_NAMESPACE class MockMediaFormatControl : public QMediaFormatControl { Q_OBJECT diff --git a/tests/auto/qmediaresource/tst_qmediaresource.cpp b/tests/auto/qmediaresource/tst_qmediaresource.cpp index 2b5c474c2a..73b1cf047b 100644 --- a/tests/auto/qmediaresource/tst_qmediaresource.cpp +++ b/tests/auto/qmediaresource/tst_qmediaresource.cpp @@ -43,6 +43,7 @@ #include "qmediaresource.h" +QTM_USE_NAMESPACE class tst_QMediaResource : public QObject { Q_OBJECT diff --git a/tests/auto/qmediaservice/tst_qmediaservice.cpp b/tests/auto/qmediaservice/tst_qmediaservice.cpp index 0480cc24f0..848e47bc41 100644 --- a/tests/auto/qmediaservice/tst_qmediaservice.cpp +++ b/tests/auto/qmediaservice/tst_qmediaservice.cpp @@ -51,6 +51,7 @@ class QtTestMediaService; +QTM_USE_NAMESPACE class tst_QMediaService : public QObject { Q_OBJECT @@ -69,32 +70,43 @@ class QtTestMediaControlA : public QMediaControl Q_OBJECT }; +QTM_BEGIN_NAMESPACE + #define QtTestMediaControlA_iid "com.nokia.QtTestMediaControlA" Q_MEDIA_DECLARE_CONTROL(QtTestMediaControlA, QtTestMediaControlA_iid) +QTM_END_NAMESPACE + class QtTestMediaControlB : public QMediaControl { Q_OBJECT }; +QTM_BEGIN_NAMESPACE #define QtTestMediaControlB_iid "com.nokia.QtTestMediaControlB" Q_MEDIA_DECLARE_CONTROL(QtTestMediaControlB, QtTestMediaControlB_iid) +QTM_END_NAMESPACE + class QtTestMediaControlC : public QMediaControl { Q_OBJECT }; +QTM_BEGIN_NAMESPACE #define QtTestMediaControlC_iid "com.nokia.QtTestMediaControlC" Q_MEDIA_DECLARE_CONTROL(QtTestMediaControlC, QtTestMediaControlA_iid) // Yes A. +QTM_END_NAMESPACE class QtTestMediaControlD : public QMediaControl { Q_OBJECT }; +QTM_BEGIN_NAMESPACE #define QtTestMediaControlD_iid "com.nokia.QtTestMediaControlD" Q_MEDIA_DECLARE_CONTROL(QtTestMediaControlD, QtTestMediaControlD_iid) +QTM_END_NAMESPACE struct QtTestDevice { diff --git a/tests/auto/qmediaserviceprovider/tst_qmediaserviceprovider.cpp b/tests/auto/qmediaserviceprovider/tst_qmediaserviceprovider.cpp index e71363641e..f05d8bb2f2 100644 --- a/tests/auto/qmediaserviceprovider/tst_qmediaserviceprovider.cpp +++ b/tests/auto/qmediaserviceprovider/tst_qmediaserviceprovider.cpp @@ -51,6 +51,7 @@ #include <experimental/qcamera.h> #include <qaudiocapturesource.h> +QTM_USE_NAMESPACE class MockMediaService : public QMediaService { Q_OBJECT @@ -67,8 +68,8 @@ class MockServicePlugin1 : public QMediaServiceProviderPlugin, public QMediaServiceSupportedDevicesInterface { Q_OBJECT - Q_INTERFACES(QMediaServiceSupportedFormatsInterface) - Q_INTERFACES(QMediaServiceSupportedDevicesInterface) + Q_INTERFACES(QtMobility::QMediaServiceSupportedFormatsInterface) + Q_INTERFACES(QtMobility::QMediaServiceSupportedDevicesInterface) public: QStringList keys() const { @@ -124,8 +125,8 @@ class MockServicePlugin2 : public QMediaServiceProviderPlugin, public QMediaServiceFeaturesInterface { Q_OBJECT - Q_INTERFACES(QMediaServiceSupportedFormatsInterface) - Q_INTERFACES(QMediaServiceFeaturesInterface) + Q_INTERFACES(QtMobility::QMediaServiceSupportedFormatsInterface) + Q_INTERFACES(QtMobility::QMediaServiceFeaturesInterface) public: QStringList keys() const { @@ -169,7 +170,7 @@ class MockServicePlugin3 : public QMediaServiceProviderPlugin, public QMediaServiceSupportedDevicesInterface { Q_OBJECT - Q_INTERFACES(QMediaServiceSupportedDevicesInterface) + Q_INTERFACES(QtMobility::QMediaServiceSupportedDevicesInterface) public: QStringList keys() const { diff --git a/tests/auto/qmediasource/tst_qmediasource.cpp b/tests/auto/qmediasource/tst_qmediasource.cpp index f5beb00ef4..cf71786325 100644 --- a/tests/auto/qmediasource/tst_qmediasource.cpp +++ b/tests/auto/qmediasource/tst_qmediasource.cpp @@ -43,6 +43,7 @@ #include "qmediasource.h" +QTM_USE_NAMESPACE class tst_QMediaSource : public QObject { Q_OBJECT diff --git a/tests/auto/qmessage/tst_qmessage.cpp b/tests/auto/qmessage/tst_qmessage.cpp index efc30d5676..590578c707 100644 --- a/tests/auto/qmessage/tst_qmessage.cpp +++ b/tests/auto/qmessage/tst_qmessage.cpp @@ -55,6 +55,7 @@ //TESTED_CLASS= //TESTED_FILES= +QTM_USE_NAMESPACE #ifdef Q_OS_WIN const QByteArray defaultCharset("UTF-16"); #else diff --git a/tests/auto/qmessagestore/tst_qmessagestore.cpp b/tests/auto/qmessagestore/tst_qmessagestore.cpp index 27b967c003..7cb973f4e8 100644 --- a/tests/auto/qmessagestore/tst_qmessagestore.cpp +++ b/tests/auto/qmessagestore/tst_qmessagestore.cpp @@ -56,6 +56,7 @@ //TESTED_CLASS= //TESTED_FILES= +QTM_USE_NAMESPACE #if defined(Q_OS_WIN) const QByteArray defaultCharset("UTF-16"); const QByteArray alternateCharset("UTF-8"); diff --git a/tests/auto/qmessagestorekeys/tst_qmessagestorekeys.cpp b/tests/auto/qmessagestorekeys/tst_qmessagestorekeys.cpp index bba1896b79..86b2057a34 100644 --- a/tests/auto/qmessagestorekeys/tst_qmessagestorekeys.cpp +++ b/tests/auto/qmessagestorekeys/tst_qmessagestorekeys.cpp @@ -55,6 +55,7 @@ //TESTED_CLASS= //TESTED_FILES= +QTM_USE_NAMESPACE /* Unit test for classes implementing query keys for the QMessageStore class. */ diff --git a/tests/auto/qnetworkconfigmanager/tst_qnetworkconfigmanager.cpp b/tests/auto/qnetworkconfigmanager/tst_qnetworkconfigmanager.cpp index dc54fffa39..a40904ba4a 100644 --- a/tests/auto/qnetworkconfigmanager/tst_qnetworkconfigmanager.cpp +++ b/tests/auto/qnetworkconfigmanager/tst_qnetworkconfigmanager.cpp @@ -49,6 +49,7 @@ #include <iapconf.h> #endif +QTM_USE_NAMESPACE class tst_QNetworkConfigurationManager : public QObject { Q_OBJECT diff --git a/tests/auto/qnetworkconfiguration/tst_qnetworkconfiguration.cpp b/tests/auto/qnetworkconfiguration/tst_qnetworkconfiguration.cpp index b2c0f80ab9..4581fa5ca1 100644 --- a/tests/auto/qnetworkconfiguration/tst_qnetworkconfiguration.cpp +++ b/tests/auto/qnetworkconfiguration/tst_qnetworkconfiguration.cpp @@ -49,6 +49,7 @@ #include <iapconf.h> #endif +QTM_USE_NAMESPACE class tst_QNetworkConfiguration : public QObject { Q_OBJECT diff --git a/tests/auto/qnetworksession/lackey/main.cpp b/tests/auto/qnetworksession/lackey/main.cpp index f63579c1e5..53f6f4f084 100644 --- a/tests/auto/qnetworksession/lackey/main.cpp +++ b/tests/auto/qnetworksession/lackey/main.cpp @@ -48,6 +48,8 @@ #include <QDebug> +QTM_USE_NAMESPACE + #define NO_DISCOVERED_CONFIGURATIONS_ERROR 1 #define SESSION_OPEN_ERROR 2 diff --git a/tests/auto/qnetworksession/tst_qnetworksession/tst_qnetworksession.cpp b/tests/auto/qnetworksession/tst_qnetworksession/tst_qnetworksession.cpp index e7d5070b7d..2bd9bb8db8 100644 --- a/tests/auto/qnetworksession/tst_qnetworksession/tst_qnetworksession.cpp +++ b/tests/auto/qnetworksession/tst_qnetworksession/tst_qnetworksession.cpp @@ -51,6 +51,8 @@ #include <iapconf.h> #endif +QTM_USE_NAMESPACE + Q_DECLARE_METATYPE(QNetworkConfiguration) Q_DECLARE_METATYPE(QNetworkSession::State); Q_DECLARE_METATYPE(QNetworkSession::SessionError); diff --git a/tests/auto/qnmeapositioninfosource/qnmeapositioninfosourceproxyfactory.h b/tests/auto/qnmeapositioninfosource/qnmeapositioninfosourceproxyfactory.h index 15a8273e01..b17d2ec025 100644 --- a/tests/auto/qnmeapositioninfosource/qnmeapositioninfosourceproxyfactory.h +++ b/tests/auto/qnmeapositioninfosource/qnmeapositioninfosourceproxyfactory.h @@ -46,9 +46,13 @@ #include <qnmeapositioninfosource.h> class QTcpServer; -class QNmeaPositionInfoSource; class QIODevice; +QTM_BEGIN_NAMESPACE +class QNmeaPositionInfoSource; +QTM_END_NAMESPACE + +QTM_USE_NAMESPACE class QNmeaPositionInfoSourceProxy : public QObject { Q_OBJECT diff --git a/tests/auto/qnmeapositioninfosource/tst_qnmeapositioninfosource.cpp b/tests/auto/qnmeapositioninfosource/tst_qnmeapositioninfosource.cpp index a26f154878..04c08e41eb 100644 --- a/tests/auto/qnmeapositioninfosource/tst_qnmeapositioninfosource.cpp +++ b/tests/auto/qnmeapositioninfosource/tst_qnmeapositioninfosource.cpp @@ -55,6 +55,7 @@ #include <QHash> #include <QTimer> +QTM_USE_NAMESPACE Q_DECLARE_METATYPE(QNmeaPositionInfoSource::UpdateMode) Q_DECLARE_METATYPE(QGeoPositionInfo) Q_DECLARE_METATYPE(QList<QDateTime>) diff --git a/tests/auto/qpacket/tst_qpacket.cpp b/tests/auto/qpacket/tst_qpacket.cpp index ed499d732e..ab19a6c668 100644 --- a/tests/auto/qpacket/tst_qpacket.cpp +++ b/tests/auto/qpacket/tst_qpacket.cpp @@ -43,6 +43,7 @@ #include <QtTest/QTest> +QTM_USE_NAMESPACE class tst_QPacket : public QObject { Q_OBJECT diff --git a/tests/auto/qpacketprotocol/tst_qpacketprotocol.cpp b/tests/auto/qpacketprotocol/tst_qpacketprotocol.cpp index f4699ed358..e778aca949 100644 --- a/tests/auto/qpacketprotocol/tst_qpacketprotocol.cpp +++ b/tests/auto/qpacketprotocol/tst_qpacketprotocol.cpp @@ -67,6 +67,7 @@ Q_DECLARE_METATYPE(QList<int>) +QTM_USE_NAMESPACE class tst_QPacketProtocol : public QObject { Q_OBJECT diff --git a/tests/auto/qpaintervideosurface/tst_qpaintervideosurface.cpp b/tests/auto/qpaintervideosurface/tst_qpaintervideosurface.cpp index 671ef6c820..81d18cacb1 100644 --- a/tests/auto/qpaintervideosurface/tst_qpaintervideosurface.cpp +++ b/tests/auto/qpaintervideosurface/tst_qpaintervideosurface.cpp @@ -51,6 +51,7 @@ #include <QtOpenGL/qglframebufferobject.h> #endif +QTM_USE_NAMESPACE class tst_QPainterVideoSurface : public QObject { Q_OBJECT diff --git a/tests/auto/qradioplayer/tst_qradioplayer.cpp b/tests/auto/qradioplayer/tst_qradioplayer.cpp index 1b312051d7..7614341881 100644 --- a/tests/auto/qradioplayer/tst_qradioplayer.cpp +++ b/tests/auto/qradioplayer/tst_qradioplayer.cpp @@ -48,6 +48,7 @@ #include <qradioplayercontrol.h> #include <qradioplayer.h> +QTM_USE_NAMESPACE class MockProvider : public QRadioPlayerControl { Q_OBJECT diff --git a/tests/auto/qradiotuner/tst_qradiotuner.cpp b/tests/auto/qradiotuner/tst_qradiotuner.cpp index 0151465c2f..8b5bf4f3a8 100644 --- a/tests/auto/qradiotuner/tst_qradiotuner.cpp +++ b/tests/auto/qradiotuner/tst_qradiotuner.cpp @@ -49,6 +49,7 @@ #include <qradiotunercontrol.h> #include <qradiotuner.h> +QTM_USE_NAMESPACE class MockControl : public QRadioTunerControl { Q_OBJECT diff --git a/tests/auto/qservicecontext/tst_qservicecontext.cpp b/tests/auto/qservicecontext/tst_qservicecontext.cpp index f58fc9d5f5..c08aefa210 100644 --- a/tests/auto/qservicecontext/tst_qservicecontext.cpp +++ b/tests/auto/qservicecontext/tst_qservicecontext.cpp @@ -42,6 +42,7 @@ #include <QtCore> #include <qservicecontext.h> +QTM_USE_NAMESPACE class MyServiceContext : public QServiceContext { Q_OBJECT diff --git a/tests/auto/qservicefilter/tst_qservicefilter.cpp b/tests/auto/qservicefilter/tst_qservicefilter.cpp index 52f3ffa205..a4e040cf91 100644 --- a/tests/auto/qservicefilter/tst_qservicefilter.cpp +++ b/tests/auto/qservicefilter/tst_qservicefilter.cpp @@ -42,6 +42,7 @@ #include <QtCore> #include <qservicefilter.h> +QTM_USE_NAMESPACE class tst_QServiceFilter: public QObject { Q_OBJECT diff --git a/tests/auto/qserviceinterfacedescriptor/tst_qserviceinterfacedescriptor.cpp b/tests/auto/qserviceinterfacedescriptor/tst_qserviceinterfacedescriptor.cpp index 37d1adcf95..5c2cd705d0 100644 --- a/tests/auto/qserviceinterfacedescriptor/tst_qserviceinterfacedescriptor.cpp +++ b/tests/auto/qserviceinterfacedescriptor/tst_qserviceinterfacedescriptor.cpp @@ -46,6 +46,7 @@ #include <qserviceinterfacedescriptor.h> #include <qserviceinterfacedescriptor_p.h> +QTM_USE_NAMESPACE class tst_QServiceInterfaceDescriptor: public QObject { Q_OBJECT diff --git a/tests/auto/qservicemanager/tst_qservicemanager.cpp b/tests/auto/qservicemanager/tst_qservicemanager.cpp index 23ebf86ca6..6d2ce7b25d 100644 --- a/tests/auto/qservicemanager/tst_qservicemanager.cpp +++ b/tests/auto/qservicemanager/tst_qservicemanager.cpp @@ -67,22 +67,23 @@ #define PRINT_ERR(a) qPrintable(QString("error = %1").arg(a.error())) -typedef QList<QServiceInterfaceDescriptor> ServiceInterfaceDescriptorList; -Q_DECLARE_METATYPE(QServiceFilter) -Q_DECLARE_METATYPE(QServiceInterfaceDescriptor) +typedef QList<QtMobility::QServiceInterfaceDescriptor> ServiceInterfaceDescriptorList; +Q_DECLARE_METATYPE(QtMobility::QServiceFilter) +Q_DECLARE_METATYPE(QtMobility::QServiceInterfaceDescriptor) Q_DECLARE_METATYPE(ServiceInterfaceDescriptorList) Q_DECLARE_METATYPE(QSet<QString>) Q_DECLARE_METATYPE(QList<QByteArray>) -Q_DECLARE_METATYPE(QServiceManager::Scope) +Q_DECLARE_METATYPE(QtMobility::QServiceManager::Scope) -typedef QHash<QServiceInterfaceDescriptor::PropertyKey, QVariant> DescriptorProperties; +typedef QHash<QtMobility::QServiceInterfaceDescriptor::PropertyKey, QVariant> DescriptorProperties; -uint qHash(const QServiceInterfaceDescriptor &desc) +inline uint qHash(const QtMobility::QServiceInterfaceDescriptor &desc) { return qHash(desc.serviceName()) + qHash(desc.interfaceName()) + desc.majorVersion() * 7 + desc.minorVersion() * 7; } +QTM_USE_NAMESPACE static DescriptorProperties defaultDescriptorProperties() { DescriptorProperties props; diff --git a/tests/auto/qsystemdeviceinfo/tst_qsystemdeviceinfo.cpp b/tests/auto/qsystemdeviceinfo/tst_qsystemdeviceinfo.cpp index dd7559552b..0df83da4bf 100644 --- a/tests/auto/qsystemdeviceinfo/tst_qsystemdeviceinfo.cpp +++ b/tests/auto/qsystemdeviceinfo/tst_qsystemdeviceinfo.cpp @@ -42,6 +42,7 @@ #include "qsysteminfo.h" #include "../qsysteminfotestcommon.h" +QTM_USE_NAMESPACE Q_DECLARE_METATYPE(QSystemDeviceInfo::BatteryStatus); Q_DECLARE_METATYPE(QSystemDeviceInfo::PowerState); Q_DECLARE_METATYPE(QSystemDeviceInfo::InputMethodFlags); diff --git a/tests/auto/qsystemdisplayinfo/tst_qsystemdisplayinfo.cpp b/tests/auto/qsystemdisplayinfo/tst_qsystemdisplayinfo.cpp index 203ad7b158..b78edd949d 100644 --- a/tests/auto/qsystemdisplayinfo/tst_qsystemdisplayinfo.cpp +++ b/tests/auto/qsystemdisplayinfo/tst_qsystemdisplayinfo.cpp @@ -41,6 +41,7 @@ #include <QtTest/QtTest> #include "qsysteminfo.h" +QTM_USE_NAMESPACE class tst_QSystemDisplayInfo : public QObject { Q_OBJECT diff --git a/tests/auto/qsysteminfo/tst_qsysteminfo.cpp b/tests/auto/qsysteminfo/tst_qsysteminfo.cpp index d098428467..c0cdec4bf5 100644 --- a/tests/auto/qsysteminfo/tst_qsysteminfo.cpp +++ b/tests/auto/qsysteminfo/tst_qsysteminfo.cpp @@ -42,6 +42,7 @@ #include "qsysteminfo.h" #include <QDebug> +QTM_USE_NAMESPACE Q_DECLARE_METATYPE(QSystemInfo::Version); Q_DECLARE_METATYPE(QSystemInfo::Feature); diff --git a/tests/auto/qsystemnetworkinfo/tst_qsystemnetworkinfo.cpp b/tests/auto/qsystemnetworkinfo/tst_qsystemnetworkinfo.cpp index 8771fc5df4..26152a79bd 100644 --- a/tests/auto/qsystemnetworkinfo/tst_qsystemnetworkinfo.cpp +++ b/tests/auto/qsystemnetworkinfo/tst_qsystemnetworkinfo.cpp @@ -41,6 +41,7 @@ #include <QtTest/QtTest> #include "qsysteminfo.h" +QTM_USE_NAMESPACE Q_DECLARE_METATYPE(QSystemNetworkInfo::NetworkStatus); Q_DECLARE_METATYPE(QSystemNetworkInfo::NetworkMode); diff --git a/tests/auto/qsystemreadwritelock/tst_qsystemreadwritelock.cpp b/tests/auto/qsystemreadwritelock/tst_qsystemreadwritelock.cpp index 474478ad15..868741672f 100644 --- a/tests/auto/qsystemreadwritelock/tst_qsystemreadwritelock.cpp +++ b/tests/auto/qsystemreadwritelock/tst_qsystemreadwritelock.cpp @@ -43,6 +43,7 @@ #include "qsystemreadwritelock_p.h" #include <QThread> +QTM_USE_NAMESPACE bool volatile readThreadDone; bool volatile writeThreadDone; bool volatile readThreadStarted; diff --git a/tests/auto/qsystemreadwritelock_oop/lackey/main.cpp b/tests/auto/qsystemreadwritelock_oop/lackey/main.cpp index 4f4c47e34b..e5f9c1b458 100644 --- a/tests/auto/qsystemreadwritelock_oop/lackey/main.cpp +++ b/tests/auto/qsystemreadwritelock_oop/lackey/main.cpp @@ -49,6 +49,8 @@ #include <QLocalSocket> #include <QtTest/QtTest> +QTM_USE_NAMESPACE + void write(QIODevice * device, const char * str) { device->write(str); diff --git a/tests/auto/qsystemreadwritelock_oop/tst_qsystemreadwritelock_oop.cpp b/tests/auto/qsystemreadwritelock_oop/tst_qsystemreadwritelock_oop.cpp index 5b36f8eab3..8277c032d1 100644 --- a/tests/auto/qsystemreadwritelock_oop/tst_qsystemreadwritelock_oop.cpp +++ b/tests/auto/qsystemreadwritelock_oop/tst_qsystemreadwritelock_oop.cpp @@ -47,6 +47,7 @@ #include "qsystemreadwritelock_p.h" #include "common.h" +QTM_USE_NAMESPACE class tst_QSystemReadWriteLock_oop : public QObject{ Q_OBJECT private slots: diff --git a/tests/auto/qsystemscreensaver/tst_qsystemscreensaver.cpp b/tests/auto/qsystemscreensaver/tst_qsystemscreensaver.cpp index 500632b93d..f4550d34b8 100644 --- a/tests/auto/qsystemscreensaver/tst_qsystemscreensaver.cpp +++ b/tests/auto/qsystemscreensaver/tst_qsystemscreensaver.cpp @@ -41,6 +41,7 @@ #include <QtTest/QtTest> #include "qsysteminfo.h" +QTM_USE_NAMESPACE class tst_QSystemScreenSaver : public QObject { Q_OBJECT diff --git a/tests/auto/qsystemstorageinfo/tst_qsystemstorageinfo.cpp b/tests/auto/qsystemstorageinfo/tst_qsystemstorageinfo.cpp index 31e549a52c..270ae96647 100644 --- a/tests/auto/qsystemstorageinfo/tst_qsystemstorageinfo.cpp +++ b/tests/auto/qsystemstorageinfo/tst_qsystemstorageinfo.cpp @@ -41,6 +41,7 @@ #include <QtTest/QtTest> #include "qsysteminfo.h" +QTM_USE_NAMESPACE Q_DECLARE_METATYPE(QSystemStorageInfo::DriveType); class tst_QSystemStorageInfo : public QObject diff --git a/tests/auto/qvaluespace/tst_qvaluespace.cpp b/tests/auto/qvaluespace/tst_qvaluespace.cpp index 5674bffbc1..ff4a416e08 100644 --- a/tests/auto/qvaluespace/tst_qvaluespace.cpp +++ b/tests/auto/qvaluespace/tst_qvaluespace.cpp @@ -49,6 +49,7 @@ #include <QDebug> +QTM_USE_NAMESPACE class FakeLayer : public QAbstractValueSpaceLayer { Q_OBJECT diff --git a/tests/auto/qvaluespaceprovider/tst_qvaluespaceprovider.cpp b/tests/auto/qvaluespaceprovider/tst_qvaluespaceprovider.cpp index 7f0b1e8826..ef838500f6 100644 --- a/tests/auto/qvaluespaceprovider/tst_qvaluespaceprovider.cpp +++ b/tests/auto/qvaluespaceprovider/tst_qvaluespaceprovider.cpp @@ -70,6 +70,7 @@ } \ QVERIFY(a) +QTM_USE_NAMESPACE class ChangeListener : public QObject { Q_OBJECT diff --git a/tests/auto/qvaluespacesubscriber/lackey/main.cpp b/tests/auto/qvaluespacesubscriber/lackey/main.cpp index dc3bf83f89..e5ec751402 100644 --- a/tests/auto/qvaluespacesubscriber/lackey/main.cpp +++ b/tests/auto/qvaluespacesubscriber/lackey/main.cpp @@ -49,6 +49,8 @@ #include <QDebug> +QTM_USE_NAMESPACE + #define TIMEOUT 700 #define ERROR_SETVALUE_NOT_SUPPORTED 1 diff --git a/tests/auto/qvaluespacesubscriber/tst_qvaluespacesubscriber_oop/tst_qvaluespacesubscriber_oop.cpp b/tests/auto/qvaluespacesubscriber/tst_qvaluespacesubscriber_oop/tst_qvaluespacesubscriber_oop.cpp index fa70f7e170..8d5ca7f062 100644 --- a/tests/auto/qvaluespacesubscriber/tst_qvaluespacesubscriber_oop/tst_qvaluespacesubscriber_oop.cpp +++ b/tests/auto/qvaluespacesubscriber/tst_qvaluespacesubscriber_oop/tst_qvaluespacesubscriber_oop.cpp @@ -48,6 +48,7 @@ #include <QCoreApplication> #include <QTest> #include <QFile> +QTM_USE_NAMESPACE class ShutdownControl : public QObject { diff --git a/tests/auto/qvaluespacesubscriber/tst_qvaluespacesubscribershared.cpp b/tests/auto/qvaluespacesubscriber/tst_qvaluespacesubscribershared.cpp index ebf63d0e48..2eb1f46d13 100644 --- a/tests/auto/qvaluespacesubscriber/tst_qvaluespacesubscribershared.cpp +++ b/tests/auto/qvaluespacesubscriber/tst_qvaluespacesubscribershared.cpp @@ -76,6 +76,7 @@ } \ QVERIFY(a) +QTM_USE_NAMESPACE class ChangeListener : public QObject { Q_OBJECT diff --git a/tests/auto/qvaluespacesubscriber/tst_qvaluespacesubscribershared.h b/tests/auto/qvaluespacesubscriber/tst_qvaluespacesubscribershared.h index ec0c5bbf05..d64f6e6729 100644 --- a/tests/auto/qvaluespacesubscriber/tst_qvaluespacesubscribershared.h +++ b/tests/auto/qvaluespacesubscriber/tst_qvaluespacesubscribershared.h @@ -39,11 +39,16 @@ ** ****************************************************************************/ +#include <qmobilityglobal.h> #include <QObject> #include <QMap> +QTM_BEGIN_NAMESPACE class QValueSpaceProvider; class QAbstractValueSpaceLayer; +QTM_END_NAMESPACE + +QTM_USE_NAMESPACE class tst_QValueSpaceSubscriber : public QObject { diff --git a/tests/auto/qvideowidget/tst_qvideowidget.cpp b/tests/auto/qvideowidget/tst_qvideowidget.cpp index c71e97656d..cb9eea4ad5 100644 --- a/tests/auto/qvideowidget/tst_qvideowidget.cpp +++ b/tests/auto/qvideowidget/tst_qvideowidget.cpp @@ -59,6 +59,7 @@ #include <QtGui/qapplication.h> +QTM_USE_NAMESPACE class tst_QVideoWidget : public QObject { Q_OBJECT diff --git a/tests/auto/servicedatabase/tst_servicedatabase.cpp b/tests/auto/servicedatabase/tst_servicedatabase.cpp index 91197d53bf..d6ac5f9cd6 100644 --- a/tests/auto/servicedatabase/tst_servicedatabase.cpp +++ b/tests/auto/servicedatabase/tst_servicedatabase.cpp @@ -52,6 +52,7 @@ # define TESTDATA_DIR "." #endif +QTM_USE_NAMESPACE class ServiceDatabaseUnitTest: public QObject { Q_OBJECT diff --git a/tests/auto/servicemetadata/tst_servicemetadata.cpp b/tests/auto/servicemetadata/tst_servicemetadata.cpp index 7d636a050c..49c3295256 100644 --- a/tests/auto/servicemetadata/tst_servicemetadata.cpp +++ b/tests/auto/servicemetadata/tst_servicemetadata.cpp @@ -55,6 +55,7 @@ # define TESTDATA_DIR "." #endif +QTM_USE_NAMESPACE class ServiceMetadataTest: public QObject { Q_OBJECT diff --git a/tests/auto/support/support.h b/tests/auto/support/support.h index 7e6f54a8f3..7dfe32471a 100644 --- a/tests/auto/support/support.h +++ b/tests/auto/support/support.h @@ -45,9 +45,13 @@ #include <QString> #include <qmessageglobal.h> +QTM_BEGIN_NAMESPACE class QMessageAccountId; class QMessageFolderId; class QMessageId; +QTM_END_NAMESPACE + +QTM_USE_NAMESPACE namespace Support { diff --git a/tests/auto/testqgeopositioninfosource.cpp b/tests/auto/testqgeopositioninfosource.cpp index 9340942b3c..1a865fe278 100644 --- a/tests/auto/testqgeopositioninfosource.cpp +++ b/tests/auto/testqgeopositioninfosource.cpp @@ -53,6 +53,7 @@ #include "testqgeopositioninfosource_p.h" #include "qlocationtestutils_p.h" + Q_DECLARE_METATYPE(QGeoPositionInfoSource::PositioningMethod) Q_DECLARE_METATYPE(QGeoPositionInfoSource::PositioningMethods) Q_DECLARE_METATYPE(QGeoPositionInfo) diff --git a/tests/auto/testqgeopositioninfosource_p.h b/tests/auto/testqgeopositioninfosource_p.h index 4950ed618e..cb5e05bb37 100644 --- a/tests/auto/testqgeopositioninfosource_p.h +++ b/tests/auto/testqgeopositioninfosource_p.h @@ -42,11 +42,15 @@ #ifndef TESTQGEOPOSITIONINFOSOURCE_P_H #define TESTQGEOPOSITIONINFOSOURCE_P_H +#include <qmobilityglobal.h> #include <QTest> #include <QObject> +QTM_BEGIN_NAMESPACE class QGeoPositionInfoSource; +QTM_END_NAMESPACE +QTM_USE_NAMESPACE class TestQGeoPositionInfoSource : public QObject { Q_OBJECT diff --git a/tests/auto/testqgeosatelliteinfosource_p.h b/tests/auto/testqgeosatelliteinfosource_p.h index 623836a7cb..784832cf54 100644 --- a/tests/auto/testqgeosatelliteinfosource_p.h +++ b/tests/auto/testqgeosatelliteinfosource_p.h @@ -42,10 +42,15 @@ #ifndef TESTQGEOSATELLITEINFOSOURCE_H #define TESTQGEOSATELLITEINFOSOURCE_H +#include <qmobilityglobal.h> #include <QTest> #include <QObject> +QTM_BEGIN_NAMESPACE class QGeoSatelliteInfoSource; +QTM_END_NAMESPACE + +QTM_USE_NAMESPACE class TestQGeoSatelliteInfoSource : public QObject { diff --git a/tests/networkmanager/nmview.h b/tests/networkmanager/nmview.h index 3972aefff6..641385ec34 100644 --- a/tests/networkmanager/nmview.h +++ b/tests/networkmanager/nmview.h @@ -47,6 +47,8 @@ #include "ui_dialog.h" +QTM_USE_NAMESPACE + class QListWidget; class QTreeWidget; class QTreeWidgetItem; diff --git a/tests/sampleserviceplugin/sampleserviceplugin.h b/tests/sampleserviceplugin/sampleserviceplugin.h index 7b50f5ded6..a1c3d9c0e9 100644 --- a/tests/sampleserviceplugin/sampleserviceplugin.h +++ b/tests/sampleserviceplugin/sampleserviceplugin.h @@ -45,10 +45,12 @@ #include <qserviceplugininterface.h> #include <qserviceinterfacedescriptor.h> +QTM_USE_NAMESPACE + class SampleServicePlugin : public QObject, public QServicePluginInterface { Q_OBJECT - Q_INTERFACES(QServicePluginInterface) + Q_INTERFACES(QtMobility::QServicePluginInterface) public: ~SampleServicePlugin(); diff --git a/tests/sampleserviceplugin2/sampleserviceplugin2.h b/tests/sampleserviceplugin2/sampleserviceplugin2.h index ca0bd6f01f..9f5660cd05 100644 --- a/tests/sampleserviceplugin2/sampleserviceplugin2.h +++ b/tests/sampleserviceplugin2/sampleserviceplugin2.h @@ -45,10 +45,12 @@ #include <qserviceplugininterface.h> #include <qserviceinterfacedescriptor.h> +QTM_USE_NAMESPACE + class SampleServicePlugin2 : public QObject, public QServicePluginInterface { Q_OBJECT - Q_INTERFACES(QServicePluginInterface) + Q_INTERFACES(QtMobility::QServicePluginInterface) public: QObject* createInstance(const QServiceInterfaceDescriptor& descriptor, diff --git a/tests/testservice2/testserviceplugin.h b/tests/testservice2/testserviceplugin.h index 43920317e9..5050276344 100644 --- a/tests/testservice2/testserviceplugin.h +++ b/tests/testservice2/testserviceplugin.h @@ -48,10 +48,12 @@ #include "qservicecontext.h" #include "qabstractsecuritysession.h" +QTM_USE_NAMESPACE + class TestServicePlugin : public QObject, public QServicePluginInterface { Q_OBJECT - Q_INTERFACES(QServicePluginInterface) + Q_INTERFACES(QtMobility::QServicePluginInterface) public: QObject* createInstance(const QServiceInterfaceDescriptor& descriptor, diff --git a/tools/qcrmlgen/qcrmlgen.cpp b/tools/qcrmlgen/qcrmlgen.cpp index b391428d72..94cb0bc956 100644 --- a/tools/qcrmlgen/qcrmlgen.cpp +++ b/tools/qcrmlgen/qcrmlgen.cpp @@ -60,6 +60,8 @@ #include <QDebug> #include <QCloseEvent> +QTM_USE_NAMESPACE + bool checkID(const QString &id) { if (id.length() > 8 || id.length() < 0) |