diff options
author | Alan Alpert <aalpert@rim.com> | 2013-01-10 14:07:37 -0800 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-01-24 17:14:12 +0100 |
commit | bbb3d5b403511f6e0bc1966835983b2574596e25 (patch) | |
tree | 18af25145c1eb0474f0bac6531d9ec8ae4361c3b /tests/auto | |
parent | eab53ad9fe0aa9664702d446a704256f46106c56 (diff) |
Move ListModel and ListElement to the QtQml import
They're already in the QtQml module, but were left in the QtQuick import
because they were considered to be of minimal use without QtQuick types.
QtQml types are being developed would could make ListModel useful
without QtQuick, indicating that they should no longer be considered
QtQuick depedent.
Change-Id: I31499f2cc23baf4bc70fb451ba164408bed89ff6
Reviewed-by: Andrew den Exter <andrew.den.exter@qinetic.com.au>
Diffstat (limited to 'tests/auto')
-rw-r--r-- | tests/auto/qml/qml.pro | 4 | ||||
-rw-r--r-- | tests/auto/qml/qqmllistmodel/data/enumerate.qml (renamed from tests/auto/qml/qquicklistmodel/data/enumerate.qml) | 0 | ||||
-rw-r--r-- | tests/auto/qml/qqmllistmodel/data/multipleroles.qml (renamed from tests/auto/qml/qquicklistmodel/data/multipleroles.qml) | 0 | ||||
-rw-r--r-- | tests/auto/qml/qqmllistmodel/data/setmodelcachelist.qml (renamed from tests/auto/qml/qquicklistmodel/data/setmodelcachelist.qml) | 0 | ||||
-rw-r--r-- | tests/auto/qml/qqmllistmodel/data/signalhandlers.qml (renamed from tests/auto/qml/qquicklistmodel/data/signalhandlers.qml) | 0 | ||||
-rw-r--r-- | tests/auto/qml/qqmllistmodel/qqmllistmodel.pro (renamed from tests/auto/qml/qquicklistmodel/qquicklistmodel.pro) | 4 | ||||
-rw-r--r-- | tests/auto/qml/qqmllistmodel/tst_qqmllistmodel.cpp (renamed from tests/auto/qml/qquicklistmodel/tst_qquicklistmodel.cpp) | 110 | ||||
-rw-r--r-- | tests/auto/qml/qqmllistmodelworkerscript/data/model.qml (renamed from tests/auto/qml/qquicklistmodelworkerscript/data/model.qml) | 0 | ||||
-rw-r--r-- | tests/auto/qml/qqmllistmodelworkerscript/data/script.js (renamed from tests/auto/qml/qquicklistmodelworkerscript/data/script.js) | 0 | ||||
-rw-r--r-- | tests/auto/qml/qqmllistmodelworkerscript/data/workerremoveelement.js (renamed from tests/auto/qml/qquicklistmodelworkerscript/data/workerremoveelement.js) | 0 | ||||
-rw-r--r-- | tests/auto/qml/qqmllistmodelworkerscript/data/workerremoveelement.qml (renamed from tests/auto/qml/qquicklistmodelworkerscript/data/workerremoveelement.qml) | 0 | ||||
-rw-r--r-- | tests/auto/qml/qqmllistmodelworkerscript/data/workerremovelist.js (renamed from tests/auto/qml/qquicklistmodelworkerscript/data/workerremovelist.js) | 0 | ||||
-rw-r--r-- | tests/auto/qml/qqmllistmodelworkerscript/data/workerremovelist.qml (renamed from tests/auto/qml/qquicklistmodelworkerscript/data/workerremovelist.qml) | 0 | ||||
-rw-r--r-- | tests/auto/qml/qqmllistmodelworkerscript/data/workersync.js (renamed from tests/auto/qml/qquicklistmodelworkerscript/data/workersync.js) | 0 | ||||
-rw-r--r-- | tests/auto/qml/qqmllistmodelworkerscript/data/workersync.qml (renamed from tests/auto/qml/qquicklistmodelworkerscript/data/workersync.qml) | 0 | ||||
-rw-r--r-- | tests/auto/qml/qqmllistmodelworkerscript/qqmllistmodelworkerscript.pro (renamed from tests/auto/qml/qquicklistmodelworkerscript/qquicklistmodelworkerscript.pro) | 4 | ||||
-rw-r--r-- | tests/auto/qml/qqmllistmodelworkerscript/tst_qqmllistmodelworkerscript.cpp (renamed from tests/auto/qml/qquicklistmodelworkerscript/tst_qquicklistmodelworkerscript.cpp) | 82 | ||||
-rw-r--r-- | tests/auto/qml/qqmlmoduleplugin/imports/com/nokia/AutoTestQmlPluginType/qmldir | 1 | ||||
-rw-r--r-- | tests/auto/qml/qquickworkerscript/tst_qquickworkerscript.cpp | 2 | ||||
-rw-r--r-- | tests/auto/quick/qquickgridview/tst_qquickgridview.cpp | 4 | ||||
-rw-r--r-- | tests/auto/quick/qquicklistview/tst_qquicklistview.cpp | 4 | ||||
-rw-r--r-- | tests/auto/quick/qquickpathview/tst_qquickpathview.cpp | 4 |
22 files changed, 109 insertions, 110 deletions
diff --git a/tests/auto/qml/qml.pro b/tests/auto/qml/qml.pro index b77effe3e5..5d62b91094 100644 --- a/tests/auto/qml/qml.pro +++ b/tests/auto/qml/qml.pro @@ -45,8 +45,8 @@ PRIVATETESTS += \ qquickchangeset \ qqmlconnections \ qquicklistcompositor \ - qquicklistmodel \ - qquicklistmodelworkerscript \ + qqmllistmodel \ + qqmllistmodelworkerscript \ qquickworkerscript \ qqmlbundle \ qrcqml \ diff --git a/tests/auto/qml/qquicklistmodel/data/enumerate.qml b/tests/auto/qml/qqmllistmodel/data/enumerate.qml index f73d66b318..f73d66b318 100644 --- a/tests/auto/qml/qquicklistmodel/data/enumerate.qml +++ b/tests/auto/qml/qqmllistmodel/data/enumerate.qml diff --git a/tests/auto/qml/qquicklistmodel/data/multipleroles.qml b/tests/auto/qml/qqmllistmodel/data/multipleroles.qml index 4a331e2b3e..4a331e2b3e 100644 --- a/tests/auto/qml/qquicklistmodel/data/multipleroles.qml +++ b/tests/auto/qml/qqmllistmodel/data/multipleroles.qml diff --git a/tests/auto/qml/qquicklistmodel/data/setmodelcachelist.qml b/tests/auto/qml/qqmllistmodel/data/setmodelcachelist.qml index 58bf1ccd04..58bf1ccd04 100644 --- a/tests/auto/qml/qquicklistmodel/data/setmodelcachelist.qml +++ b/tests/auto/qml/qqmllistmodel/data/setmodelcachelist.qml diff --git a/tests/auto/qml/qquicklistmodel/data/signalhandlers.qml b/tests/auto/qml/qqmllistmodel/data/signalhandlers.qml index 750d99c5a3..750d99c5a3 100644 --- a/tests/auto/qml/qquicklistmodel/data/signalhandlers.qml +++ b/tests/auto/qml/qqmllistmodel/data/signalhandlers.qml diff --git a/tests/auto/qml/qquicklistmodel/qquicklistmodel.pro b/tests/auto/qml/qqmllistmodel/qqmllistmodel.pro index e2b88ccec6..ef044f1663 100644 --- a/tests/auto/qml/qquicklistmodel/qquicklistmodel.pro +++ b/tests/auto/qml/qqmllistmodel/qqmllistmodel.pro @@ -1,8 +1,8 @@ CONFIG += testcase -TARGET = tst_qquicklistmodel +TARGET = tst_qqmllistmodel macx:CONFIG -= app_bundle -SOURCES += tst_qquicklistmodel.cpp +SOURCES += tst_qqmllistmodel.cpp include (../../shared/util.pri) diff --git a/tests/auto/qml/qquicklistmodel/tst_qquicklistmodel.cpp b/tests/auto/qml/qqmllistmodel/tst_qqmllistmodel.cpp index 8deaae9902..22229febf3 100644 --- a/tests/auto/qml/qquicklistmodel/tst_qquicklistmodel.cpp +++ b/tests/auto/qml/qqmllistmodel/tst_qqmllistmodel.cpp @@ -43,7 +43,7 @@ #include <QtQuick/private/qquicktext_p.h> #include <QtQuick/private/qquickanimation_p.h> #include <QtQml/private/qqmlengine_p.h> -#include <QtQml/private/qquicklistmodel_p.h> +#include <QtQml/private/qqmllistmodel_p.h> #include <QtQml/private/qqmlexpression_p.h> #include <QQmlComponent> @@ -82,17 +82,17 @@ static bool isValidErrorMessage(const QString &msg, bool dynamicRoleTest) return valid; } -class tst_qquicklistmodel : public QQmlDataTest +class tst_qqmllistmodel : public QQmlDataTest { Q_OBJECT public: - tst_qquicklistmodel() + tst_qqmllistmodel() { qRegisterMetaType<QVector<int> >(); } private: - int roleFromName(const QQuickListModel *model, const QString &roleName); + int roleFromName(const QQmlListModel *model, const QString &roleName); static bool compareVariantList(const QVariantList &testList, QVariant object); @@ -132,11 +132,11 @@ private slots: void datetime_data(); }; -bool tst_qquicklistmodel::compareVariantList(const QVariantList &testList, QVariant object) +bool tst_qqmllistmodel::compareVariantList(const QVariantList &testList, QVariant object) { bool allOk = true; - QQuickListModel *model = qobject_cast<QQuickListModel *>(object.value<QObject *>()); + QQmlListModel *model = qobject_cast<QQmlListModel *>(object.value<QObject *>()); if (model == 0) return false; @@ -178,12 +178,12 @@ bool tst_qquicklistmodel::compareVariantList(const QVariantList &testList, QVari return allOk; } -int tst_qquicklistmodel::roleFromName(const QQuickListModel *model, const QString &roleName) +int tst_qqmllistmodel::roleFromName(const QQmlListModel *model, const QString &roleName) { return model->roleNames().key(roleName.toUtf8(), -1); } -void tst_qquicklistmodel::static_types_data() +void tst_qqmllistmodel::static_types_data() { QTest::addColumn<QString>("qml"); QTest::addColumn<QVariant>("value"); @@ -240,7 +240,7 @@ void tst_qquicklistmodel::static_types_data() << QString("<Unknown File>: Can't assign to existing role 'foo' of different type [List -> Number]"); } -void tst_qquicklistmodel::static_types() +void tst_qqmllistmodel::static_types() { QFETCH(QString, qml); QFETCH(QVariant, value); @@ -272,7 +272,7 @@ void tst_qquicklistmodel::static_types() delete obj; } -void tst_qquicklistmodel::static_i18n_data() +void tst_qqmllistmodel::static_i18n_data() { QTest::addColumn<QString>("qml"); QTest::addColumn<QVariant>("value"); @@ -309,7 +309,7 @@ void tst_qquicklistmodel::static_i18n_data() << QString("ListElement: improperly specified QT_TRID_NOOP"); } -void tst_qquicklistmodel::static_i18n() +void tst_qqmllistmodel::static_i18n() { QFETCH(QString, qml); QFETCH(QVariant, value); @@ -341,7 +341,7 @@ void tst_qquicklistmodel::static_i18n() delete obj; } -void tst_qquicklistmodel::static_nestedElements() +void tst_qqmllistmodel::static_nestedElements() { QFETCH(int, elementCount); @@ -379,7 +379,7 @@ void tst_qquicklistmodel::static_nestedElements() delete obj; } -void tst_qquicklistmodel::static_nestedElements_data() +void tst_qqmllistmodel::static_nestedElements_data() { QTest::addColumn<int>("elementCount"); @@ -389,7 +389,7 @@ void tst_qquicklistmodel::static_nestedElements_data() QTest::newRow("many items") << 5; } -void tst_qquicklistmodel::dynamic_data() +void tst_qqmllistmodel::dynamic_data() { QTest::addColumn<QString>("script"); QTest::addColumn<int>("result"); @@ -530,7 +530,7 @@ void tst_qquicklistmodel::dynamic_data() } } -void tst_qquicklistmodel::dynamic() +void tst_qqmllistmodel::dynamic() { QFETCH(QString, script); QFETCH(int, result); @@ -539,7 +539,7 @@ void tst_qquicklistmodel::dynamic() QQuickItem dummyItem0, dummyItem1; QQmlEngine engine; - QQuickListModel model; + QQmlListModel model; model.setDynamicRoles(dynamicRoles); QQmlEngine::setContextForObject(&model,engine.rootContext()); engine.rootContext()->setContextObject(&model); @@ -561,7 +561,7 @@ void tst_qquicklistmodel::dynamic() QVERIFY(spyCount.count() > 0); } -void tst_qquicklistmodel::enumerate() +void tst_qqmllistmodel::enumerate() { QQmlEngine eng; QQmlComponent component(&eng, testFileUrl("enumerate.qml")); @@ -602,7 +602,7 @@ void tst_qquicklistmodel::enumerate() delete item; } -void tst_qquicklistmodel::error_data() +void tst_qqmllistmodel::error_data() { QTest::addColumn<QString>("qml"); QTest::addColumn<QString>("error"); @@ -652,7 +652,7 @@ void tst_qquicklistmodel::error_data() << "Foo.ListElement - Foo is not a namespace"; } -void tst_qquicklistmodel::error() +void tst_qqmllistmodel::error() { QFETCH(QString, qml); QFETCH(QString, error); @@ -671,7 +671,7 @@ void tst_qquicklistmodel::error() } } -void tst_qquicklistmodel::syncError() +void tst_qqmllistmodel::syncError() { QString qml = "import QtQuick 2.0\nListModel { id: lm; Component.onCompleted: lm.sync() }"; QString error = "file:dummy.qml:2:1: QML ListModel: List sync() can only be called from a WorkerScript"; @@ -689,7 +689,7 @@ void tst_qquicklistmodel::syncError() /* Test model changes from set() are available to the view */ -void tst_qquicklistmodel::set_data() +void tst_qqmllistmodel::set_data() { QTest::addColumn<bool>("dynamicRoles"); @@ -697,12 +697,12 @@ void tst_qquicklistmodel::set_data() QTest::newRow("dynamicRoles") << true; } -void tst_qquicklistmodel::set() +void tst_qqmllistmodel::set() { QFETCH(bool, dynamicRoles); QQmlEngine engine; - QQuickListModel model; + QQmlListModel model; model.setDynamicRoles(dynamicRoles); QQmlEngine::setContextForObject(&model,engine.rootContext()); engine.rootContext()->setContextProperty("model", &model); @@ -727,7 +727,7 @@ void tst_qquicklistmodel::set() /* Test model changes on values returned by get() are available to the view */ -void tst_qquicklistmodel::get() +void tst_qqmllistmodel::get() { QFETCH(QString, expression); QFETCH(int, index); @@ -740,7 +740,7 @@ void tst_qquicklistmodel::get() component.setData( "import QtQuick 2.0\n" "ListModel {}\n", QUrl()); - QQuickListModel *model = qobject_cast<QQuickListModel*>(component.create()); + QQmlListModel *model = qobject_cast<QQmlListModel*>(component.create()); model->setDynamicRoles(dynamicRoles); engine.rootContext()->setContextProperty("model", model); @@ -775,7 +775,7 @@ void tst_qquicklistmodel::get() delete model; } -void tst_qquicklistmodel::get_data() +void tst_qqmllistmodel::get_data() { QTest::addColumn<QString>("expression"); QTest::addColumn<int>("index"); @@ -802,7 +802,7 @@ void tst_qquicklistmodel::get_data() /* Test that the tests run in get() also work for nested list data */ -void tst_qquicklistmodel::get_nested() +void tst_qqmllistmodel::get_nested() { QFETCH(QString, expression); QFETCH(int, index); @@ -818,10 +818,10 @@ void tst_qquicklistmodel::get_nested() component.setData( "import QtQuick 2.0\n" "ListModel {}", QUrl()); - QQuickListModel *model = qobject_cast<QQuickListModel*>(component.create()); + QQmlListModel *model = qobject_cast<QQmlListModel*>(component.create()); model->setDynamicRoles(dynamicRoles); QVERIFY(component.errorString().isEmpty()); - QQuickListModel *childModel; + QQmlListModel *childModel; engine.rootContext()->setContextProperty("model", model); RUNEXPR("model.append({ listRoleA: [\n" @@ -872,7 +872,7 @@ void tst_qquicklistmodel::get_nested() int outerListRole = roleFromName(model, outerListRoleName); QVERIFY(outerListRole >= 0); - childModel = qobject_cast<QQuickListModel*>(model->data(outerListIndex, outerListRole).value<QObject*>()); + childModel = qobject_cast<QQmlListModel*>(model->data(outerListIndex, outerListRole).value<QObject*>()); QVERIFY(childModel); QString extendedExpression = QString("get(%1).%2.%3").arg(outerListIndex).arg(outerListRoleName).arg(expression); @@ -900,20 +900,20 @@ void tst_qquicklistmodel::get_nested() delete model; } -void tst_qquicklistmodel::get_nested_data() +void tst_qqmllistmodel::get_nested_data() { get_data(); } //QTBUG-13754 -void tst_qquicklistmodel::crash_model_with_multiple_roles() +void tst_qqmllistmodel::crash_model_with_multiple_roles() { QQmlEngine eng; QQmlComponent component(&eng, testFileUrl("multipleroles.qml")); QObject *rootItem = component.create(); QVERIFY(component.errorString().isEmpty()); QVERIFY(rootItem != 0); - QQuickListModel *model = rootItem->findChild<QQuickListModel*>("listModel"); + QQmlListModel *model = rootItem->findChild<QQmlListModel*>("listModel"); QVERIFY(model != 0); // used to cause a crash @@ -923,7 +923,7 @@ void tst_qquicklistmodel::crash_model_with_multiple_roles() } //QTBUG-15190 -void tst_qquicklistmodel::set_model_cache() +void tst_qqmllistmodel::set_model_cache() { QQmlEngine eng; QQmlComponent component(&eng, testFileUrl("setmodelcachelist.qml")); @@ -935,7 +935,7 @@ void tst_qquicklistmodel::set_model_cache() delete model; } -void tst_qquicklistmodel::property_changes() +void tst_qqmllistmodel::property_changes() { QFETCH(QString, script_setup); QFETCH(QString, script_change); @@ -946,7 +946,7 @@ void tst_qquicklistmodel::property_changes() QFETCH(bool, dynamicRoles); QQmlEngine engine; - QQuickListModel model; + QQmlListModel model; model.setDynamicRoles(dynamicRoles); QQmlEngine::setContextForObject(&model, engine.rootContext()); engine.rootContext()->setContextObject(&model); @@ -993,7 +993,7 @@ void tst_qquicklistmodel::property_changes() delete connectionsObject; } -void tst_qquicklistmodel::property_changes_data() +void tst_qqmllistmodel::property_changes_data() { QTest::addColumn<QString>("script_setup"); QTest::addColumn<QString>("script_change"); @@ -1066,7 +1066,7 @@ void tst_qquicklistmodel::property_changes_data() } } -void tst_qquicklistmodel::clear_data() +void tst_qqmllistmodel::clear_data() { QTest::addColumn<bool>("dynamicRoles"); @@ -1074,12 +1074,12 @@ void tst_qquicklistmodel::clear_data() QTest::newRow("dynamicRoles") << true; } -void tst_qquicklistmodel::clear() +void tst_qqmllistmodel::clear() { QFETCH(bool, dynamicRoles); QQmlEngine engine; - QQuickListModel model; + QQmlListModel model; model.setDynamicRoles(dynamicRoles); QQmlEngine::setContextForObject(&model, engine.rootContext()); engine.rootContext()->setContextProperty("model", &model); @@ -1111,7 +1111,7 @@ void tst_qquicklistmodel::clear() QCOMPARE(roleNames[2], QByteArray("propertyC")); } -void tst_qquicklistmodel::signal_handlers_data() +void tst_qqmllistmodel::signal_handlers_data() { QTest::addColumn<bool>("dynamicRoles"); @@ -1119,14 +1119,14 @@ void tst_qquicklistmodel::signal_handlers_data() QTest::newRow("dynamicRoles") << true; } -void tst_qquicklistmodel::signal_handlers() +void tst_qqmllistmodel::signal_handlers() { QFETCH(bool, dynamicRoles); QQmlEngine eng; QQmlComponent component(&eng, testFileUrl("signalhandlers.qml")); QObject *model = component.create(); - QQuickListModel *lm = qobject_cast<QQuickListModel *>(model); + QQmlListModel *lm = qobject_cast<QQmlListModel *>(model); QVERIFY(lm != 0); lm->setDynamicRoles(dynamicRoles); QVERIFY2(component.errorString().isEmpty(), QTest::toString(component.errorString())); @@ -1136,7 +1136,7 @@ void tst_qquicklistmodel::signal_handlers() delete model; } -void tst_qquicklistmodel::role_mode_data() +void tst_qqmllistmodel::role_mode_data() { QTest::addColumn<QString>("script"); QTest::addColumn<int>("result"); @@ -1150,14 +1150,14 @@ void tst_qquicklistmodel::role_mode_data() QTest::newRow("enableDynamic2") << "{dynamicRoles=true;append({'a':1});dynamicRoles=false;dynamicRoles}" << 1 << "<Unknown File>: QML ListModel: unable to enable static roles as this model is not empty!"; } -void tst_qquicklistmodel::role_mode() +void tst_qqmllistmodel::role_mode() { QFETCH(QString, script); QFETCH(int, result); QFETCH(QString, warning); QQmlEngine engine; - QQuickListModel model; + QQmlListModel model; QQmlEngine::setContextForObject(&model,engine.rootContext()); engine.rootContext()->setContextObject(&model); QQmlExpression e(engine.rootContext(), &model, script); @@ -1171,10 +1171,10 @@ void tst_qquicklistmodel::role_mode() QCOMPARE(actual,result); } -void tst_qquicklistmodel::string_to_list_crash() +void tst_qqmllistmodel::string_to_list_crash() { QQmlEngine engine; - QQuickListModel model; + QQmlListModel model; QQmlEngine::setContextForObject(&model,engine.rootContext()); engine.rootContext()->setContextObject(&model); QString script = QLatin1String("{append({'a':'data'});get(0).a = [{'x':123}]}"); @@ -1184,7 +1184,7 @@ void tst_qquicklistmodel::string_to_list_crash() e.evaluate(); } -void tst_qquicklistmodel::empty_element_warning_data() +void tst_qqmllistmodel::empty_element_warning_data() { QTest::addColumn<QString>("qml"); QTest::addColumn<bool>("warning"); @@ -1198,7 +1198,7 @@ void tst_qquicklistmodel::empty_element_warning_data() QTest::newRow("role3") << "import QtQuick 2.0\nListModel { ListElement {} ListElement {a:1} ListElement {b:2} }" << false; } -void tst_qquicklistmodel::empty_element_warning() +void tst_qqmllistmodel::empty_element_warning() { QFETCH(QString, qml); QFETCH(bool, warning); @@ -1219,7 +1219,7 @@ void tst_qquicklistmodel::empty_element_warning() delete obj; } -void tst_qquicklistmodel::datetime_data() +void tst_qqmllistmodel::datetime_data() { QTest::addColumn<QString>("qml"); QTest::addColumn<QDateTime>("expected"); @@ -1234,13 +1234,13 @@ void tst_qquicklistmodel::datetime_data() QTest::newRow("dt3") << "{append({'date':dt0});get(0).date=undefined;get(0).date}" << dt; } -void tst_qquicklistmodel::datetime() +void tst_qqmllistmodel::datetime() { QFETCH(QString, qml); QFETCH(QDateTime, expected); QQmlEngine engine; - QQuickListModel model; + QQmlListModel model; QQmlEngine::setContextForObject(&model,engine.rootContext()); QDateTime dt0(QDate(1900, 1, 2), QTime( 8, 14)); QDateTime dt1(QDate(2000, 11, 22), QTime(10, 45)); @@ -1253,6 +1253,6 @@ void tst_qquicklistmodel::datetime() QVERIFY(expected == dtResult); } -QTEST_MAIN(tst_qquicklistmodel) +QTEST_MAIN(tst_qqmllistmodel) -#include "tst_qquicklistmodel.moc" +#include "tst_qqmllistmodel.moc" diff --git a/tests/auto/qml/qquicklistmodelworkerscript/data/model.qml b/tests/auto/qml/qqmllistmodelworkerscript/data/model.qml index 5973ea8adf..5973ea8adf 100644 --- a/tests/auto/qml/qquicklistmodelworkerscript/data/model.qml +++ b/tests/auto/qml/qqmllistmodelworkerscript/data/model.qml diff --git a/tests/auto/qml/qquicklistmodelworkerscript/data/script.js b/tests/auto/qml/qqmllistmodelworkerscript/data/script.js index 66a4acb8a8..66a4acb8a8 100644 --- a/tests/auto/qml/qquicklistmodelworkerscript/data/script.js +++ b/tests/auto/qml/qqmllistmodelworkerscript/data/script.js diff --git a/tests/auto/qml/qquicklistmodelworkerscript/data/workerremoveelement.js b/tests/auto/qml/qqmllistmodelworkerscript/data/workerremoveelement.js index cb9dfa66aa..cb9dfa66aa 100644 --- a/tests/auto/qml/qquicklistmodelworkerscript/data/workerremoveelement.js +++ b/tests/auto/qml/qqmllistmodelworkerscript/data/workerremoveelement.js diff --git a/tests/auto/qml/qquicklistmodelworkerscript/data/workerremoveelement.qml b/tests/auto/qml/qqmllistmodelworkerscript/data/workerremoveelement.qml index e2361acf6b..e2361acf6b 100644 --- a/tests/auto/qml/qquicklistmodelworkerscript/data/workerremoveelement.qml +++ b/tests/auto/qml/qqmllistmodelworkerscript/data/workerremoveelement.qml diff --git a/tests/auto/qml/qquicklistmodelworkerscript/data/workerremovelist.js b/tests/auto/qml/qqmllistmodelworkerscript/data/workerremovelist.js index f63dd68839..f63dd68839 100644 --- a/tests/auto/qml/qquicklistmodelworkerscript/data/workerremovelist.js +++ b/tests/auto/qml/qqmllistmodelworkerscript/data/workerremovelist.js diff --git a/tests/auto/qml/qquicklistmodelworkerscript/data/workerremovelist.qml b/tests/auto/qml/qqmllistmodelworkerscript/data/workerremovelist.qml index bdb5e024d8..bdb5e024d8 100644 --- a/tests/auto/qml/qquicklistmodelworkerscript/data/workerremovelist.qml +++ b/tests/auto/qml/qqmllistmodelworkerscript/data/workerremovelist.qml diff --git a/tests/auto/qml/qquicklistmodelworkerscript/data/workersync.js b/tests/auto/qml/qqmllistmodelworkerscript/data/workersync.js index 9b8d8fa7f3..9b8d8fa7f3 100644 --- a/tests/auto/qml/qquicklistmodelworkerscript/data/workersync.js +++ b/tests/auto/qml/qqmllistmodelworkerscript/data/workersync.js diff --git a/tests/auto/qml/qquicklistmodelworkerscript/data/workersync.qml b/tests/auto/qml/qqmllistmodelworkerscript/data/workersync.qml index c21cd43e7e..c21cd43e7e 100644 --- a/tests/auto/qml/qquicklistmodelworkerscript/data/workersync.qml +++ b/tests/auto/qml/qqmllistmodelworkerscript/data/workersync.qml diff --git a/tests/auto/qml/qquicklistmodelworkerscript/qquicklistmodelworkerscript.pro b/tests/auto/qml/qqmllistmodelworkerscript/qqmllistmodelworkerscript.pro index 07875722f1..14f0604a9b 100644 --- a/tests/auto/qml/qquicklistmodelworkerscript/qquicklistmodelworkerscript.pro +++ b/tests/auto/qml/qqmllistmodelworkerscript/qqmllistmodelworkerscript.pro @@ -1,8 +1,8 @@ CONFIG += testcase -TARGET = tst_qquicklistmodelworkerscript +TARGET = tst_qqmllistmodelworkerscript macx:CONFIG -= app_bundle -SOURCES += tst_qquicklistmodelworkerscript.cpp +SOURCES += tst_qqmllistmodelworkerscript.cpp include (../../shared/util.pri) diff --git a/tests/auto/qml/qquicklistmodelworkerscript/tst_qquicklistmodelworkerscript.cpp b/tests/auto/qml/qqmllistmodelworkerscript/tst_qqmllistmodelworkerscript.cpp index 8d5f34c010..a0edfb6891 100644 --- a/tests/auto/qml/qquicklistmodelworkerscript/tst_qquicklistmodelworkerscript.cpp +++ b/tests/auto/qml/qqmllistmodelworkerscript/tst_qqmllistmodelworkerscript.cpp @@ -42,7 +42,7 @@ #include <QtQuick/private/qquickitem_p.h> #include <QtQuick/private/qquicktext_p.h> #include <QtQml/private/qqmlengine_p.h> -#include <QtQml/private/qquicklistmodel_p.h> +#include <QtQml/private/qqmllistmodel_p.h> #include <QtQml/private/qqmlexpression_p.h> #include <QQmlComponent> @@ -81,18 +81,18 @@ static bool isValidErrorMessage(const QString &msg, bool dynamicRoleTest) return valid; } -class tst_qquicklistmodelworkerscript : public QQmlDataTest +class tst_qqmllistmodelworkerscript : public QQmlDataTest { Q_OBJECT public: - tst_qquicklistmodelworkerscript() + tst_qqmllistmodelworkerscript() { qRegisterMetaType<QVector<int> >(); } private: - int roleFromName(const QQuickListModel *model, const QString &roleName); - QQuickItem *createWorkerTest(QQmlEngine *eng, QQmlComponent *component, QQuickListModel *model); + int roleFromName(const QQmlListModel *model, const QString &roleName); + QQuickItem *createWorkerTest(QQmlEngine *eng, QQmlComponent *component, QQmlListModel *model); void waitForWorker(QQuickItem *item); static bool compareVariantList(const QVariantList &testList, QVariant object); @@ -119,11 +119,11 @@ private slots: void dynamic_role(); }; -bool tst_qquicklistmodelworkerscript::compareVariantList(const QVariantList &testList, QVariant object) +bool tst_qqmllistmodelworkerscript::compareVariantList(const QVariantList &testList, QVariant object) { bool allOk = true; - QQuickListModel *model = qobject_cast<QQuickListModel *>(object.value<QObject *>()); + QQmlListModel *model = qobject_cast<QQmlListModel *>(object.value<QObject *>()); if (model == 0) return false; @@ -165,12 +165,12 @@ bool tst_qquicklistmodelworkerscript::compareVariantList(const QVariantList &tes return allOk; } -int tst_qquicklistmodelworkerscript::roleFromName(const QQuickListModel *model, const QString &roleName) +int tst_qqmllistmodelworkerscript::roleFromName(const QQmlListModel *model, const QString &roleName) { return model->roleNames().key(roleName.toUtf8(), -1); } -QQuickItem *tst_qquicklistmodelworkerscript::createWorkerTest(QQmlEngine *eng, QQmlComponent *component, QQuickListModel *model) +QQuickItem *tst_qqmllistmodelworkerscript::createWorkerTest(QQmlEngine *eng, QQmlComponent *component, QQmlListModel *model) { QQuickItem *item = qobject_cast<QQuickItem*>(component->create()); QQmlEngine::setContextForObject(model, eng->rootContext()); @@ -179,7 +179,7 @@ QQuickItem *tst_qquicklistmodelworkerscript::createWorkerTest(QQmlEngine *eng, Q return item; } -void tst_qquicklistmodelworkerscript::waitForWorker(QQuickItem *item) +void tst_qqmllistmodelworkerscript::waitForWorker(QQuickItem *item) { QQmlProperty prop(item, "done"); QVERIFY(prop.isValid()); @@ -198,7 +198,7 @@ void tst_qquicklistmodelworkerscript::waitForWorker(QQuickItem *item) QVERIFY(prop.read().toBool()); } -void tst_qquicklistmodelworkerscript::dynamic_data() +void tst_qqmllistmodelworkerscript::dynamic_data() { QTest::addColumn<QString>("script"); QTest::addColumn<int>("result"); @@ -339,12 +339,12 @@ void tst_qquicklistmodelworkerscript::dynamic_data() } } -void tst_qquicklistmodelworkerscript::dynamic_worker_data() +void tst_qqmllistmodelworkerscript::dynamic_worker_data() { dynamic_data(); } -void tst_qquicklistmodelworkerscript::dynamic_worker() +void tst_qqmllistmodelworkerscript::dynamic_worker() { QFETCH(QString, script); QFETCH(int, result); @@ -357,7 +357,7 @@ void tst_qquicklistmodelworkerscript::dynamic_worker() // This is same as dynamic() except it applies the test to a ListModel called // from a WorkerScript. - QQuickListModel model; + QQmlListModel model; model.setDynamicRoles(dynamicRoles); QQmlEngine eng; QQmlComponent component(&eng, testFileUrl("model.qml")); @@ -389,12 +389,12 @@ void tst_qquicklistmodelworkerscript::dynamic_worker() qApp->processEvents(); } -void tst_qquicklistmodelworkerscript::dynamic_worker_sync_data() +void tst_qqmllistmodelworkerscript::dynamic_worker_sync_data() { dynamic_data(); } -void tst_qquicklistmodelworkerscript::dynamic_worker_sync() +void tst_qqmllistmodelworkerscript::dynamic_worker_sync() { QFETCH(QString, script); QFETCH(int, result); @@ -408,7 +408,7 @@ void tst_qquicklistmodelworkerscript::dynamic_worker_sync() // from the worker script, calls sync(), and tests the changes are reflected in the // list in the main thread - QQuickListModel model; + QQmlListModel model; model.setDynamicRoles(dynamicRoles); QQmlEngine eng; QQmlComponent component(&eng, testFileUrl("model.qml")); @@ -439,7 +439,7 @@ void tst_qquicklistmodelworkerscript::dynamic_worker_sync() qApp->processEvents(); } -void tst_qquicklistmodelworkerscript::get_data() +void tst_qqmllistmodelworkerscript::get_data() { QTest::addColumn<QString>("expression"); QTest::addColumn<int>("index"); @@ -463,7 +463,7 @@ void tst_qquicklistmodelworkerscript::get_data() } } -void tst_qquicklistmodelworkerscript::get_worker() +void tst_qqmllistmodelworkerscript::get_worker() { QFETCH(QString, expression); QFETCH(int, index); @@ -471,7 +471,7 @@ void tst_qquicklistmodelworkerscript::get_worker() QFETCH(QVariant, roleValue); QFETCH(bool, dynamicRoles); - QQuickListModel model; + QQmlListModel model; model.setDynamicRoles(dynamicRoles); QQmlEngine eng; QQmlComponent component(&eng, testFileUrl("model.qml")); @@ -513,12 +513,12 @@ void tst_qquicklistmodelworkerscript::get_worker() delete item; } -void tst_qquicklistmodelworkerscript::get_worker_data() +void tst_qqmllistmodelworkerscript::get_worker_data() { get_data(); } -void tst_qquicklistmodelworkerscript::property_changes_data() +void tst_qqmllistmodelworkerscript::property_changes_data() { QTest::addColumn<QString>("script_setup"); QTest::addColumn<QString>("script_change"); @@ -591,7 +591,7 @@ void tst_qquicklistmodelworkerscript::property_changes_data() } } -void tst_qquicklistmodelworkerscript::property_changes_worker() +void tst_qqmllistmodelworkerscript::property_changes_worker() { QFETCH(QString, script_setup); QFETCH(QString, script_change); @@ -600,7 +600,7 @@ void tst_qquicklistmodelworkerscript::property_changes_worker() QFETCH(bool, itemsChanged); QFETCH(bool, dynamicRoles); - QQuickListModel model; + QQmlListModel model; model.setDynamicRoles(dynamicRoles); QQmlEngine engine; QQmlComponent component(&engine, testFileUrl("model.qml")); @@ -631,12 +631,12 @@ void tst_qquicklistmodelworkerscript::property_changes_worker() qApp->processEvents(); } -void tst_qquicklistmodelworkerscript::property_changes_worker_data() +void tst_qqmllistmodelworkerscript::property_changes_worker_data() { property_changes_data(); } -void tst_qquicklistmodelworkerscript::worker_sync_data() +void tst_qqmllistmodelworkerscript::worker_sync_data() { QTest::addColumn<bool>("dynamicRoles"); @@ -644,11 +644,11 @@ void tst_qquicklistmodelworkerscript::worker_sync_data() QTest::newRow("dynamicRoles") << true; } -void tst_qquicklistmodelworkerscript::worker_sync() +void tst_qqmllistmodelworkerscript::worker_sync() { QFETCH(bool, dynamicRoles); - QQuickListModel model; + QQmlListModel model; model.setDynamicRoles(dynamicRoles); QQmlEngine eng; QQmlComponent component(&eng, testFileUrl("workersync.qml")); @@ -661,7 +661,7 @@ void tst_qquicklistmodelworkerscript::worker_sync() QVERIFY(model.count() == 2); QVariant childData = model.data(0, 0); - QQuickListModel *childModel = qobject_cast<QQuickListModel *>(childData.value<QObject *>()); + QQmlListModel *childModel = qobject_cast<QQmlListModel *>(childData.value<QObject *>()); QVERIFY(childModel); QVERIFY(childModel->count() == 1); @@ -704,16 +704,16 @@ void tst_qquicklistmodelworkerscript::worker_sync() qApp->processEvents(); } -void tst_qquicklistmodelworkerscript::worker_remove_element_data() +void tst_qqmllistmodelworkerscript::worker_remove_element_data() { worker_sync_data(); } -void tst_qquicklistmodelworkerscript::worker_remove_element() +void tst_qqmllistmodelworkerscript::worker_remove_element() { QFETCH(bool, dynamicRoles); - QQuickListModel model; + QQmlListModel model; model.setDynamicRoles(dynamicRoles); QQmlEngine eng; QQmlComponent component(&eng, testFileUrl("workerremoveelement.qml")); @@ -746,7 +746,7 @@ void tst_qquicklistmodelworkerscript::worker_remove_element() { //don't crash if model was deleted earlier - QQuickListModel* model = new QQuickListModel; + QQmlListModel* model = new QQmlListModel; model->setDynamicRoles(dynamicRoles); QQmlEngine eng; QQmlComponent component(&eng, testFileUrl("workerremoveelement.qml")); @@ -767,16 +767,16 @@ void tst_qquicklistmodelworkerscript::worker_remove_element() } } -void tst_qquicklistmodelworkerscript::worker_remove_list_data() +void tst_qqmllistmodelworkerscript::worker_remove_list_data() { worker_sync_data(); } -void tst_qquicklistmodelworkerscript::worker_remove_list() +void tst_qqmllistmodelworkerscript::worker_remove_list() { QFETCH(bool, dynamicRoles); - QQuickListModel model; + QQmlListModel model; model.setDynamicRoles(dynamicRoles); QQmlEngine eng; QQmlComponent component(&eng, testFileUrl("workerremovelist.qml")); @@ -808,7 +808,7 @@ void tst_qquicklistmodelworkerscript::worker_remove_list() qApp->processEvents(); } -void tst_qquicklistmodelworkerscript::dynamic_role_data() +void tst_qqmllistmodelworkerscript::dynamic_role_data() { QTest::addColumn<QString>("preamble"); QTest::addColumn<QString>("script"); @@ -817,13 +817,13 @@ void tst_qquicklistmodelworkerscript::dynamic_role_data() QTest::newRow("sync1") << "{append({'a':[{'b':1},{'b':2}]})}" << "{get(0).a = 'string';count}" << 1; } -void tst_qquicklistmodelworkerscript::dynamic_role() +void tst_qqmllistmodelworkerscript::dynamic_role() { QFETCH(QString, preamble); QFETCH(QString, script); QFETCH(int, result); - QQuickListModel model; + QQmlListModel model; model.setDynamicRoles(true); QQmlEngine engine; QQmlComponent component(&engine, testFileUrl("model.qml")); @@ -854,6 +854,6 @@ void tst_qquicklistmodelworkerscript::dynamic_role() qApp->processEvents(); } -QTEST_MAIN(tst_qquicklistmodelworkerscript) +QTEST_MAIN(tst_qqmllistmodelworkerscript) -#include "tst_qquicklistmodelworkerscript.moc" +#include "tst_qqmllistmodelworkerscript.moc" diff --git a/tests/auto/qml/qqmlmoduleplugin/imports/com/nokia/AutoTestQmlPluginType/qmldir b/tests/auto/qml/qqmlmoduleplugin/imports/com/nokia/AutoTestQmlPluginType/qmldir deleted file mode 100644 index 0a8b5d46eb..0000000000 --- a/tests/auto/qml/qqmlmoduleplugin/imports/com/nokia/AutoTestQmlPluginType/qmldir +++ /dev/null @@ -1 +0,0 @@ -plugin plugin diff --git a/tests/auto/qml/qquickworkerscript/tst_qquickworkerscript.cpp b/tests/auto/qml/qquickworkerscript/tst_qquickworkerscript.cpp index 46e0c9e436..a2bf06c2ba 100644 --- a/tests/auto/qml/qquickworkerscript/tst_qquickworkerscript.cpp +++ b/tests/auto/qml/qquickworkerscript/tst_qquickworkerscript.cpp @@ -145,7 +145,7 @@ void tst_QQuickWorkerScript::messaging_data() void tst_QQuickWorkerScript::messaging_sendQObjectList() { - // Not allowed to send QObjects other than QQuickListModelWorkerAgent + // Not allowed to send QObjects other than QQmlListModelWorkerAgent // instances. If objects are sent in a list, they will be sent as 'undefined' // js values. diff --git a/tests/auto/quick/qquickgridview/tst_qquickgridview.cpp b/tests/auto/quick/qquickgridview/tst_qquickgridview.cpp index 93ffbca3e5..aee4e0d119 100644 --- a/tests/auto/quick/qquickgridview/tst_qquickgridview.cpp +++ b/tests/auto/quick/qquickgridview/tst_qquickgridview.cpp @@ -52,7 +52,7 @@ #include <QtQuick/private/qquickgridview_p.h> #include <QtQuick/private/qquicktext_p.h> #include <QtQuick/private/qquickvisualitemmodel_p.h> -#include <QtQml/private/qquicklistmodel_p.h> +#include <QtQml/private/qqmllistmodel_p.h> #include "../../shared/util.h" #include "../shared/viewtestutil.h" #include "../shared/visualtestutil.h" @@ -2435,7 +2435,7 @@ void tst_QQuickGridView::modelChanges() QQuickGridView *gridView = window->rootObject()->findChild<QQuickGridView*>("gridView"); QTRY_VERIFY(gridView); - QQuickListModel *alternateModel = window->rootObject()->findChild<QQuickListModel*>("alternateModel"); + QQmlListModel *alternateModel = window->rootObject()->findChild<QQmlListModel*>("alternateModel"); QTRY_VERIFY(alternateModel); QVariant modelVariant = QVariant::fromValue<QObject *>(alternateModel); QSignalSpy modelSpy(gridView, SIGNAL(modelChanged())); diff --git a/tests/auto/quick/qquicklistview/tst_qquicklistview.cpp b/tests/auto/quick/qquicklistview/tst_qquicklistview.cpp index 9fad01ef40..a1b2536b0b 100644 --- a/tests/auto/quick/qquicklistview/tst_qquicklistview.cpp +++ b/tests/auto/quick/qquicklistview/tst_qquicklistview.cpp @@ -49,7 +49,7 @@ #include <QtQuick/private/qquicklistview_p.h> #include <QtQuick/private/qquicktext_p.h> #include <QtQuick/private/qquickvisualitemmodel_p.h> -#include <QtQml/private/qquicklistmodel_p.h> +#include <QtQml/private/qqmllistmodel_p.h> #include "../../shared/util.h" #include "../shared/viewtestutil.h" #include "../shared/visualtestutil.h" @@ -3257,7 +3257,7 @@ void tst_QQuickListView::modelChanges() QQuickListView *listView = window->rootObject()->findChild<QQuickListView*>("listView"); QTRY_VERIFY(listView); - QQuickListModel *alternateModel = window->rootObject()->findChild<QQuickListModel*>("alternateModel"); + QQmlListModel *alternateModel = window->rootObject()->findChild<QQmlListModel*>("alternateModel"); QTRY_VERIFY(alternateModel); QVariant modelVariant = QVariant::fromValue<QObject *>(alternateModel); QSignalSpy modelSpy(listView, SIGNAL(modelChanged())); diff --git a/tests/auto/quick/qquickpathview/tst_qquickpathview.cpp b/tests/auto/quick/qquickpathview/tst_qquickpathview.cpp index 65fef9abe5..f52939e628 100644 --- a/tests/auto/quick/qquickpathview/tst_qquickpathview.cpp +++ b/tests/auto/quick/qquickpathview/tst_qquickpathview.cpp @@ -50,7 +50,7 @@ #include <QtQuick/private/qquickpath_p.h> #include <QtQuick/private/qquicktext_p.h> #include <QtQuick/private/qquickrectangle_p.h> -#include <QtQml/private/qquicklistmodel_p.h> +#include <QtQml/private/qqmllistmodel_p.h> #include <QtQml/private/qqmlvaluetype_p.h> #include <QtGui/qstandarditemmodel.h> #include <QStringListModel> @@ -1269,7 +1269,7 @@ void tst_QQuickPathView::modelChanges() pathView->setCurrentIndex(3); QTRY_COMPARE(pathView->offset(), 6.0); - QQuickListModel *alternateModel = window->rootObject()->findChild<QQuickListModel*>("alternateModel"); + QQmlListModel *alternateModel = window->rootObject()->findChild<QQmlListModel*>("alternateModel"); QVERIFY(alternateModel); QVariant modelVariant = QVariant::fromValue<QObject *>(alternateModel); QSignalSpy modelSpy(pathView, SIGNAL(modelChanged())); |