diff options
Diffstat (limited to 'tests/auto/qtsensors5/tst_qtsensors5.cpp')
-rw-r--r-- | tests/auto/qtsensors5/tst_qtsensors5.cpp | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/tests/auto/qtsensors5/tst_qtsensors5.cpp b/tests/auto/qtsensors5/tst_qtsensors5.cpp index 383a4762..31f0f852 100644 --- a/tests/auto/qtsensors5/tst_qtsensors5.cpp +++ b/tests/auto/qtsensors5/tst_qtsensors5.cpp @@ -40,8 +40,8 @@ ****************************************************************************/ #include <QtTest/QtTest> -#include <QDeclarativeEngine> -#include <QDeclarativeComponent> +#include <QQmlEngine> +#include <QQmlComponent> class tst_qtsensors5 : public QObject { @@ -74,16 +74,16 @@ private slots: QFETCH(QString, version); QFETCH(bool, exists); - QDeclarativeEngine engine; + QQmlEngine engine; QString qml = QString("import QtQuick 2.0\nimport QtSensors %1\nItem {}").arg(version); - QDeclarativeComponent c(&engine); + QQmlComponent c(&engine); c.setData(qml.toLocal8Bit(), QUrl::fromLocalFile(QDir::currentPath())); if (!exists) - QTest::ignoreMessage(QtWarningMsg, "QDeclarativeComponent: Component is not ready"); + QTest::ignoreMessage(QtWarningMsg, "QQmlComponent: Component is not ready"); QObject *obj = c.create(); QCOMPARE(exists, (obj != 0)); delete obj; - QList<QDeclarativeError> errors = c.errors(); + QList<QQmlError> errors = c.errors(); if (exists) { QCOMPARE(errors.count(), 0); } else { @@ -112,16 +112,16 @@ private slots: QFETCH(QString, element); QFETCH(bool, exists); - QDeclarativeEngine engine; + QQmlEngine engine; QString qml = QString("import QtQuick 2.0\nimport QtSensors %1\n%2 {}").arg(version).arg(element); - QDeclarativeComponent c(&engine); + QQmlComponent c(&engine); c.setData(qml.toLocal8Bit(), QUrl::fromLocalFile(QDir::currentPath())); if (!exists) - QTest::ignoreMessage(QtWarningMsg, "QDeclarativeComponent: Component is not ready"); + QTest::ignoreMessage(QtWarningMsg, "QQmlComponent: Component is not ready"); QObject *obj = c.create(); QCOMPARE(exists, (obj != 0)); delete obj; - QList<QDeclarativeError> errors = c.errors(); + QList<QQmlError> errors = c.errors(); QCOMPARE(errors.count(), 0); } @@ -138,15 +138,15 @@ private slots: QFETCH(QString, version); QFETCH(QString, element); - QDeclarativeEngine engine; + QQmlEngine engine; QString qml = QString("import QtQuick 2.0\nimport QtSensors %1\n%2 {}").arg(version).arg(element); - QDeclarativeComponent c(&engine); + QQmlComponent c(&engine); c.setData(qml.toLocal8Bit(), QUrl::fromLocalFile(QDir::currentPath())); - //QTest::ignoreMessage(QtWarningMsg, "QDeclarativeComponent: Component is not ready"); + //QTest::ignoreMessage(QtWarningMsg, "QQmlComponent: Component is not ready"); QObject *obj = c.create(); QCOMPARE(obj, static_cast<QObject*>(0)); delete obj; - QList<QDeclarativeError> errors = c.errors(); + QList<QQmlError> errors = c.errors(); QCOMPARE(errors.count(), 1); QString expected = QString("Cannot create %1").arg(element); QString actual = errors.first().description(); |