aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@digia.com>2014-08-12 10:03:53 +0200
committerSimon Hausmann <simon.hausmann@digia.com>2014-08-12 10:04:33 +0200
commit61f72d32b4fddc6e87f21d0243d9f0a32ca61987 (patch)
treeb166541b885e33666bc3dffbde937b5dc0e93bc5 /tests/auto/qml
parent430853836f9c17154ef3ee4cac6b03b90ee493a9 (diff)
parent01c6af3fc940378e8eee41a9fb8273420ef5a7e1 (diff)
Merge remote-tracking branch 'origin/5.3' into 5.4
Conflicts: src/qml/jsruntime/qv4include.cpp src/quick/items/qquickrendercontrol.cpp src/quick/items/qquickrendercontrol_p.h src/quickwidgets/qquickwidget.cpp Change-Id: Ib2dc0051a38cd283a37a7665eb4a76f6f7ec8b15
Diffstat (limited to 'tests/auto/qml')
-rw-r--r--tests/auto/qml/qqmlecmascript/qqmlecmascript.pro2
-rw-r--r--tests/auto/qml/qqmlecmascript/qqmlecmascript.qrc8
-rw-r--r--tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp17
-rw-r--r--tests/auto/qml/qqmlincubator/tst_qqmlincubator.cpp4
-rw-r--r--tests/auto/qml/qqmllanguage/data/nonexistantProperty.8.errors.txt1
-rw-r--r--tests/auto/qml/qqmllanguage/data/nonexistantProperty.8.qml5
-rw-r--r--tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp1
7 files changed, 34 insertions, 4 deletions
diff --git a/tests/auto/qml/qqmlecmascript/qqmlecmascript.pro b/tests/auto/qml/qqmlecmascript/qqmlecmascript.pro
index 6193ee7c88..6f3f765aba 100644
--- a/tests/auto/qml/qqmlecmascript/qqmlecmascript.pro
+++ b/tests/auto/qml/qqmlecmascript/qqmlecmascript.pro
@@ -9,6 +9,8 @@ HEADERS += testtypes.h \
../../shared/testhttpserver.h
INCLUDEPATH += ../../shared
+RESOURCES += qqmlecmascript.qrc
+
include (../../shared/util.pri)
# QMAKE_CXXFLAGS = -fprofile-arcs -ftest-coverage
diff --git a/tests/auto/qml/qqmlecmascript/qqmlecmascript.qrc b/tests/auto/qml/qqmlecmascript/qqmlecmascript.qrc
new file mode 100644
index 0000000000..e0e29ad4a5
--- /dev/null
+++ b/tests/auto/qml/qqmlecmascript/qqmlecmascript.qrc
@@ -0,0 +1,8 @@
+<!DOCTYPE RCC><RCC version="1.0">
+<qresource>
+<file>data/include.qml</file>
+<file>data/include.js</file>
+<file>data/js/include2.js</file>
+<file>data/js/include3.js</file>
+</qresource>
+</RCC>
diff --git a/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp b/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp
index c68f1190dd..2550dd5473 100644
--- a/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp
+++ b/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp
@@ -6051,6 +6051,23 @@ void tst_qqmlecmascript::include()
delete o;
}
+
+ // include from resources
+ {
+ QQmlComponent component(&engine, QUrl("qrc:///data/include.qml"));
+ QObject *o = component.create();
+ QVERIFY(o != 0);
+
+ QCOMPARE(o->property("test0").toInt(), 99);
+ QCOMPARE(o->property("test1").toBool(), true);
+ QCOMPARE(o->property("test2").toBool(), true);
+ QCOMPARE(o->property("test2_1").toBool(), true);
+ QCOMPARE(o->property("test3").toBool(), true);
+ QCOMPARE(o->property("test3_1").toBool(), true);
+
+ delete o;
+ }
+
}
void tst_qqmlecmascript::includeRemoteSuccess()
diff --git a/tests/auto/qml/qqmlincubator/tst_qqmlincubator.cpp b/tests/auto/qml/qqmlincubator/tst_qqmlincubator.cpp
index 0b9872f94c..75b10ed804 100644
--- a/tests/auto/qml/qqmlincubator/tst_qqmlincubator.cpp
+++ b/tests/auto/qml/qqmlincubator/tst_qqmlincubator.cpp
@@ -171,10 +171,6 @@ void tst_qqmlincubator::objectDeleted()
controller.incubateWhile(&b);
}
- // We have to cheat and manually remove it from the creator->allCreatedObjects
- // otherwise we will do a double delete
- QQmlIncubatorPrivate *incubatorPriv = QQmlIncubatorPrivate::get(&incubator);
- incubatorPriv->creator->allCreatedObjects().pop();
delete SelfRegisteringType::me();
{
diff --git a/tests/auto/qml/qqmllanguage/data/nonexistantProperty.8.errors.txt b/tests/auto/qml/qqmllanguage/data/nonexistantProperty.8.errors.txt
new file mode 100644
index 0000000000..b60b59b111
--- /dev/null
+++ b/tests/auto/qml/qqmllanguage/data/nonexistantProperty.8.errors.txt
@@ -0,0 +1 @@
+4:24:Cannot assign to non-existent property "root"
diff --git a/tests/auto/qml/qqmllanguage/data/nonexistantProperty.8.qml b/tests/auto/qml/qqmllanguage/data/nonexistantProperty.8.qml
new file mode 100644
index 0000000000..86c5f3bd7d
--- /dev/null
+++ b/tests/auto/qml/qqmllanguage/data/nonexistantProperty.8.qml
@@ -0,0 +1,5 @@
+import QtQuick 2.0
+Item {
+ id: root
+ NumberAnimation on root.opacity { duration: 1000 }
+}
diff --git a/tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp b/tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp
index 6364a8ebdd..8bc937d2bc 100644
--- a/tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp
+++ b/tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp
@@ -348,6 +348,7 @@ void tst_qqmllanguage::errors_data()
QTest::newRow("nonexistantProperty.5") << "nonexistantProperty.5.qml" << "nonexistantProperty.5.errors.txt" << false;
QTest::newRow("nonexistantProperty.6") << "nonexistantProperty.6.qml" << "nonexistantProperty.6.errors.txt" << false;
QTest::newRow("nonexistantProperty.7") << "nonexistantProperty.7.qml" << "nonexistantProperty.7.errors.txt" << false;
+ QTest::newRow("nonexistantProperty.8") << "nonexistantProperty.8.qml" << "nonexistantProperty.8.errors.txt" << false;
QTest::newRow("wrongType (string for int)") << "wrongType.1.qml" << "wrongType.1.errors.txt" << false;
QTest::newRow("wrongType (int for bool)") << "wrongType.2.qml" << "wrongType.2.errors.txt" << false;