diff options
author | Frederik Gladhorn <frederik.gladhorn@theqtcompany.com> | 2015-02-20 15:53:39 +0100 |
---|---|---|
committer | Frederik Gladhorn <frederik.gladhorn@theqtcompany.com> | 2015-02-20 15:53:39 +0100 |
commit | bfbcec26eb6f9423ee27d75ae5abcd70cd255390 (patch) | |
tree | 5845eda8e07adef5dbf27d56107e5330ea5d3fbf /tests/auto/declarative | |
parent | 4b4c6a984b2bcdfcb5a77a024e48072a7aa854ec (diff) | |
parent | 41119e843f099ce7d80f966cc754324bfe0f063f (diff) |
Merge remote-tracking branch 'origin/5.4' into 5.5
Conflicts:
.qmake.conf
Change-Id: I85eac7ffdbd673aeba4e7437fa5a9dc50759a736
Diffstat (limited to 'tests/auto/declarative')
5 files changed, 17 insertions, 3 deletions
diff --git a/tests/auto/declarative/qdeclarativecomponent/data/data.qrc b/tests/auto/declarative/qdeclarativecomponent/data/data.qrc new file mode 100644 index 00000000..f0405f9b --- /dev/null +++ b/tests/auto/declarative/qdeclarativecomponent/data/data.qrc @@ -0,0 +1,6 @@ +<RCC> + <qresource prefix="/"> + <file>createObject.qml</file> + <file>createObjectWithScript.qml</file> + </qresource> +</RCC> diff --git a/tests/auto/declarative/qdeclarativecomponent/qdeclarativecomponent.pro b/tests/auto/declarative/qdeclarativecomponent/qdeclarativecomponent.pro index da7352e5..270eef36 100644 --- a/tests/auto/declarative/qdeclarativecomponent/qdeclarativecomponent.pro +++ b/tests/auto/declarative/qdeclarativecomponent/qdeclarativecomponent.pro @@ -7,7 +7,7 @@ macx:CONFIG -= app_bundle SOURCES += tst_qdeclarativecomponent.cpp -DEFINES += SRCDIR=\\\"$$PWD\\\" +RESOURCES += data/data.qrc CONFIG += parallel_test diff --git a/tests/auto/declarative/qdeclarativecomponent/tst_qdeclarativecomponent.cpp b/tests/auto/declarative/qdeclarativecomponent/tst_qdeclarativecomponent.cpp index e1cd68d5..27e9634e 100644 --- a/tests/auto/declarative/qdeclarativecomponent/tst_qdeclarativecomponent.cpp +++ b/tests/auto/declarative/qdeclarativecomponent/tst_qdeclarativecomponent.cpp @@ -87,7 +87,7 @@ void tst_qdeclarativecomponent::loadEmptyUrl() void tst_qdeclarativecomponent::qmlCreateObject() { QDeclarativeEngine engine; - QDeclarativeComponent component(&engine, QUrl::fromLocalFile(SRCDIR "/data/createObject.qml")); + QDeclarativeComponent component(&engine, QUrl("qrc:/createObject.qml")); QObject *object = component.create(); QVERIFY(object != 0); @@ -112,7 +112,7 @@ void tst_qdeclarativecomponent::qmlCreateObject() void tst_qdeclarativecomponent::qmlCreateObjectWithProperties() { QDeclarativeEngine engine; - QDeclarativeComponent component(&engine, QUrl::fromLocalFile(SRCDIR "/data/createObjectWithScript.qml")); + QDeclarativeComponent component(&engine, QUrl("qrc:/createObjectWithScript.qml")); QVERIFY2(component.errorString().isEmpty(), component.errorString().toUtf8()); QObject *object = component.create(); QVERIFY(object != 0); diff --git a/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp b/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp index 549726f4..e8bfd694 100644 --- a/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp +++ b/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp @@ -438,6 +438,12 @@ void tst_qdeclarativeecmascript::arrayExpressions() QCOMPARE(list2.at(1), QVariant(2)); QCOMPARE(list2.at(2), QVariant(QString("foo"))); QCOMPARE(list2.at(3), QVariant(QString("bar"))); + + MyExpression expr3(&context, "[]"); + result = expr3.evaluate(); + QCOMPARE(result.userType(), qMetaTypeId<QList<QObject *> >()); + QList<QObject *> list3 = qvariant_cast<QList<QObject *> >(result); + QCOMPARE(list3.count(), 0); } // Tests that modifying a context property will reevaluate expressions diff --git a/tests/auto/declarative/qdeclarativegridview/BLACKLIST b/tests/auto/declarative/qdeclarativegridview/BLACKLIST new file mode 100644 index 00000000..2fe0dd96 --- /dev/null +++ b/tests/auto/declarative/qdeclarativegridview/BLACKLIST @@ -0,0 +1,2 @@ +[currentIndex] +* |