summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorMorten Johan Sørvig <morten.sorvig@nokia.com>2010-03-25 07:42:21 (GMT)
committerMorten Johan Sørvig <morten.sorvig@nokia.com>2010-03-25 07:42:21 (GMT)
commit20779098f4eb73f8789d704e1a2818ddbbf5b4d2 (patch)
treeb1c4e3edb447ee47f9bc724f106d1bbefcff5456 /tests
parent8cc346604ed1e1504964772613ed9fe531361f69 (diff)
parent194013d9db1b3e4ba6f56a864f3b64f523202948 (diff)
downloadQt-20779098f4eb73f8789d704e1a2818ddbbf5b4d2.zip
Qt-20779098f4eb73f8789d704e1a2818ddbbf5b4d2.tar.gz
Qt-20779098f4eb73f8789d704e1a2818ddbbf5b4d2.tar.bz2
Merge remote branch 'main/4.7' into 4.7
Conflicts: demos/declarative/minehunt/minehunt.cpp src/declarative/qml/qdeclarativecompiler.cpp
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/declarative/qdeclarativeanimations/data/dontAutoStart.qml2
-rw-r--r--tests/auto/declarative/qdeclarativeanimations/tst_qdeclarativeanimations.cpp8
-rw-r--r--tests/auto/declarative/qdeclarativebinding/tst_qdeclarativebinding.cpp2
-rw-r--r--tests/auto/declarative/qdeclarativedebug/tst_qdeclarativedebug.cpp2
-rw-r--r--tests/auto/declarative/qdeclarativedom/data/import/Bar.qml (renamed from tests/auto/declarative/qdeclarativedom/data/importdir/Bar.qml)0
-rw-r--r--tests/auto/declarative/qdeclarativedom/data/importlib/sublib/qmldir1
-rw-r--r--tests/auto/declarative/qdeclarativedom/tst_qdeclarativedom.cpp3
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/dynamicCreation.qml6
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp14
-rw-r--r--tests/auto/declarative/qdeclarativeflipable/data/crash.qml9
-rw-r--r--tests/auto/declarative/qdeclarativeflipable/tst_qdeclarativeflipable.cpp21
-rw-r--r--tests/auto/declarative/qdeclarativegridview/data/propertychangestest.qml2
-rw-r--r--tests/auto/declarative/qdeclarativegridview/data/setindex.qml10
-rw-r--r--tests/auto/declarative/qdeclarativeinstruction/tst_qdeclarativeinstruction.cpp13
-rw-r--r--tests/auto/declarative/qdeclarativeitem/data/propertychanges.qml2
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/dynamicObject.1.qml2
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/emptySignal.2.errors.txt1
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/emptySignal.2.qml7
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/failingComponent.errors.txt2
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/importNewerVersion.errors.txt1
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/importNewerVersion.qml3
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/importNonExist.errors.txt1
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/importNonExist.qml5
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/unregisteredObject.errors.txt2
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/qtest/declarative/qmllanguage/UndeclaredLocal.qml3
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/qtest/declarative/qmllanguage/WrongTestLocal.qml1
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/qtest/declarative/qmllanguage/qmldir1
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/testtypes.cpp3
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/testtypes.h16
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp17
-rw-r--r--tests/auto/declarative/qdeclarativelistmodel/tst_qdeclarativelistmodel.cpp7
-rw-r--r--tests/auto/declarative/qdeclarativelistview/data/propertychangestest.qml2
-rw-r--r--tests/auto/declarative/qdeclarativeloader/data/BlueRect.qml8
-rw-r--r--tests/auto/declarative/qdeclarativeloader/data/GreenRect.qml7
-rw-r--r--tests/auto/declarative/qdeclarativeloader/data/VmeError.qml7
-rw-r--r--tests/auto/declarative/qdeclarativeloader/data/crash.qml14
-rw-r--r--tests/auto/declarative/qdeclarativeloader/data/differentorigin.qml3
-rw-r--r--tests/auto/declarative/qdeclarativeloader/data/nonItem.qml5
-rw-r--r--tests/auto/declarative/qdeclarativeloader/data/sameorigin-load.qml3
-rw-r--r--tests/auto/declarative/qdeclarativeloader/data/sameorigin.qml3
-rw-r--r--tests/auto/declarative/qdeclarativeloader/data/vmeErrors.qml6
-rw-r--r--tests/auto/declarative/qdeclarativeloader/tst_qdeclarativeloader.cpp54
-rw-r--r--tests/auto/declarative/qdeclarativemoduleplugin/data/works.qml (renamed from tests/auto/declarative/qdeclarativemoduleplugin/plugin.qml)0
-rw-r--r--tests/auto/declarative/qdeclarativemoduleplugin/imports/com/nokia/AutoTestQmlPluginType/qmldir (renamed from tests/auto/declarative/qdeclarativemoduleplugin/com/nokia/AutoTestQmlPluginType/qmldir)0
-rw-r--r--tests/auto/declarative/qdeclarativemoduleplugin/plugin/plugin.pro2
-rw-r--r--tests/auto/declarative/qdeclarativemoduleplugin/tst_qdeclarativemoduleplugin.cpp7
-rw-r--r--tests/auto/declarative/qdeclarativeproperty/tst_qdeclarativeproperty.cpp18
-rw-r--r--tests/auto/declarative/qdeclarativeqt/data/createQmlObject.qml4
-rw-r--r--tests/auto/declarative/qdeclarativeqt/tst_qdeclarativeqt.cpp10
-rw-r--r--tests/auto/declarative/qdeclarativerepeater/data/properties.qml2
-rw-r--r--tests/auto/declarative/qdeclarativestates/data/illegalObj.qml12
-rw-r--r--tests/auto/declarative/qdeclarativestates/tst_qdeclarativestates.cpp22
-rw-r--r--tests/auto/declarative/qdeclarativetextedit/data/http/cursorHttpTestPass.qml1
-rw-r--r--tests/auto/declarative/qdeclarativetextedit/data/http/qmldir4
-rw-r--r--tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp33
-rw-r--r--tests/auto/declarative/qdeclarativexmllistmodel/tst_qdeclarativexmllistmodel.cpp66
-rw-r--r--tests/auto/declarative/qmetaobjectbuilder/tst_qmetaobjectbuilder.cpp8
-rw-r--r--tests/auto/declarative/visual/animation/loop/loop.qml2
-rw-r--r--tests/auto/declarative/visual/animation/parentAction/data/parentAction.0.pngbin1652 -> 0 bytes
-rw-r--r--tests/auto/declarative/visual/animation/parentAction/data/parentAction.1.pngbin1492 -> 0 bytes
-rw-r--r--tests/auto/declarative/visual/animation/parentAction/data/parentAction.2.pngbin1424 -> 0 bytes
-rw-r--r--tests/auto/declarative/visual/animation/parentAction/data/parentAction.3.pngbin1583 -> 0 bytes
-rw-r--r--tests/auto/declarative/visual/animation/parentAction/data/parentAction.4.pngbin1640 -> 0 bytes
-rw-r--r--tests/auto/declarative/visual/animation/parentAction/data/parentAction.5.pngbin1640 -> 0 bytes
-rw-r--r--tests/auto/declarative/visual/animation/parentAction/data/parentAction.qml1207
-rw-r--r--tests/auto/declarative/visual/animation/parentAction/parentAction.qml55
-rw-r--r--tests/auto/declarative/visual/animation/pauseAnimation/pauseAnimation.qml2
-rw-r--r--tests/auto/declarative/visual/animation/scriptAction/scriptAction.qml2
-rw-r--r--tests/auto/declarative/visual/qdeclarativeborderimage/content/MyBorderImage.qml4
-rw-r--r--tests/auto/declarative/visual/qdeclarativeeasefollow/easefollow.qml2
-rw-r--r--tests/auto/declarative/visual/qdeclarativespringfollow/follow.qml2
-rw-r--r--tests/auto/declarative/visual/qdeclarativetext/elide/elide2.qml2
-rw-r--r--tests/auto/declarative/visual/qdeclarativetext/elide/multilength.qml2
-rw-r--r--tests/auto/declarative/visual/qdeclarativetextedit/cursorDelegate.qml2
-rw-r--r--tests/auto/declarative/visual/qdeclarativetextinput/cursorDelegate.qml2
-rw-r--r--tests/auto/declarative/visual/webview/zooming/renderControl.qml2
-rw-r--r--tests/auto/declarative/visual/webview/zooming/resolution.qml2
-rw-r--r--tests/auto/declarative/visual/webview/zooming/zoomTextOnly.qml2
-rw-r--r--tests/auto/qdirmodel/tst_qdirmodel.cpp28
-rw-r--r--tests/auto/qfilesystemmodel/tst_qfilesystemmodel.cpp29
-rw-r--r--tests/auto/qsoundeffect/tst_qsoundeffect.cpp8
-rw-r--r--tests/benchmarks/declarative/qdeclarativetime/tests/animation/large.qml41
-rw-r--r--tests/benchmarks/declarative/qdeclarativetime/tests/animation/largeNoProps.qml41
-rw-r--r--tests/benchmarks/declarative/qdeclarativetime/tests/loader/Loaded.qml7
-rw-r--r--tests/benchmarks/declarative/qdeclarativetime/tests/loader/component_loader.qml16
-rw-r--r--tests/benchmarks/declarative/qdeclarativetime/tests/loader/empty_loader.qml15
-rw-r--r--tests/benchmarks/declarative/qdeclarativetime/tests/loader/no_loader.qml14
-rw-r--r--tests/benchmarks/declarative/qdeclarativetime/tests/loader/source_loader.qml16
88 files changed, 630 insertions, 1343 deletions
diff --git a/tests/auto/declarative/qdeclarativeanimations/data/dontAutoStart.qml b/tests/auto/declarative/qdeclarativeanimations/data/dontAutoStart.qml
index 408ad87..d6bfe45 100644
--- a/tests/auto/declarative/qdeclarativeanimations/data/dontAutoStart.qml
+++ b/tests/auto/declarative/qdeclarativeanimations/data/dontAutoStart.qml
@@ -10,7 +10,7 @@ Rectangle {
width: 100; height: 100
color: Qt.rgba(1,0,0)
Behavior on x {
- NumberAnimation { id: myAnim; objectName: "MyAnim"; target: redRect; property: "y"; to: 300; repeat: true}
+ NumberAnimation { id: myAnim; objectName: "MyAnim"; target: redRect; property: "y"; to: 300; loops: Animation.Infinite}
}
}
diff --git a/tests/auto/declarative/qdeclarativeanimations/tst_qdeclarativeanimations.cpp b/tests/auto/declarative/qdeclarativeanimations/tst_qdeclarativeanimations.cpp
index 076afea..f018ce1 100644
--- a/tests/auto/declarative/qdeclarativeanimations/tst_qdeclarativeanimations.cpp
+++ b/tests/auto/declarative/qdeclarativeanimations/tst_qdeclarativeanimations.cpp
@@ -180,7 +180,7 @@ void tst_qdeclarativeanimations::simpleRotation()
QVERIFY(animation.target() == &rect);
QVERIFY(animation.property() == "rotation");
QVERIFY(animation.to() == 270);
- QVERIFY(animation.direction() == QDeclarativeRotationAnimation::Shortest);
+ QVERIFY(animation.direction() == QDeclarativeRotationAnimation::Numerical);
animation.start();
QVERIFY(animation.isRunning());
QTest::qWait(animation.duration());
@@ -193,7 +193,7 @@ void tst_qdeclarativeanimations::simpleRotation()
QVERIFY(animation.isPaused());
animation.setCurrentTime(125);
QVERIFY(animation.currentTime() == 125);
- QCOMPARE(rect.rotation(), qreal(-45));
+ QCOMPARE(rect.rotation(), qreal(135));
}
void tst_qdeclarativeanimations::alwaysRunToEnd()
@@ -204,9 +204,9 @@ void tst_qdeclarativeanimations::alwaysRunToEnd()
animation.setProperty("x");
animation.setTo(200);
animation.setDuration(1000);
- animation.setRepeat(true);
+ animation.setLoops(-1);
animation.setAlwaysRunToEnd(true);
- QVERIFY(animation.repeat() == true);
+ QVERIFY(animation.loops() == -1);
QVERIFY(animation.alwaysRunToEnd() == true);
animation.start();
QTest::qWait(1500);
diff --git a/tests/auto/declarative/qdeclarativebinding/tst_qdeclarativebinding.cpp b/tests/auto/declarative/qdeclarativebinding/tst_qdeclarativebinding.cpp
index 826df4f..483d588 100644
--- a/tests/auto/declarative/qdeclarativebinding/tst_qdeclarativebinding.cpp
+++ b/tests/auto/declarative/qdeclarativebinding/tst_qdeclarativebinding.cpp
@@ -79,7 +79,7 @@ void tst_qdeclarativebinding::binding()
QDeclarativeBind *binding = qobject_cast<QDeclarativeBind*>(rect->findChild<QDeclarativeBind*>("binding1"));
QVERIFY(binding != 0);
- QCOMPARE(binding->object(), rect);
+ QCOMPARE(binding->object(), qobject_cast<QObject*>(rect));
QCOMPARE(binding->property(), QLatin1String("text"));
QCOMPARE(binding->value().toString(), QLatin1String("Hello"));
diff --git a/tests/auto/declarative/qdeclarativedebug/tst_qdeclarativedebug.cpp b/tests/auto/declarative/qdeclarativedebug/tst_qdeclarativedebug.cpp
index 0c3ca76..d0eb90e 100644
--- a/tests/auto/declarative/qdeclarativedebug/tst_qdeclarativedebug.cpp
+++ b/tests/auto/declarative/qdeclarativedebug/tst_qdeclarativedebug.cpp
@@ -153,7 +153,7 @@ QDeclarativeDebugPropertyReference tst_QDeclarativeDebug::findProperty(const QLi
void tst_QDeclarativeDebug::waitForQuery(QDeclarativeDebugQuery *query)
{
QVERIFY(query);
- QCOMPARE(query->parent(), this);
+ QCOMPARE(query->parent(), qobject_cast<QObject*>(this));
QVERIFY(query->state() == QDeclarativeDebugQuery::Waiting);
if (!QDeclarativeDebugTest::waitForSignal(query, SIGNAL(stateChanged(QDeclarativeDebugQuery::State))))
QFAIL("query timed out");
diff --git a/tests/auto/declarative/qdeclarativedom/data/importdir/Bar.qml b/tests/auto/declarative/qdeclarativedom/data/import/Bar.qml
index 2d1a4a3..2d1a4a3 100644
--- a/tests/auto/declarative/qdeclarativedom/data/importdir/Bar.qml
+++ b/tests/auto/declarative/qdeclarativedom/data/import/Bar.qml
diff --git a/tests/auto/declarative/qdeclarativedom/data/importlib/sublib/qmldir b/tests/auto/declarative/qdeclarativedom/data/importlib/sublib/qmldir
new file mode 100644
index 0000000..5bdd17b
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativedom/data/importlib/sublib/qmldir
@@ -0,0 +1 @@
+Foo Foo.qml
diff --git a/tests/auto/declarative/qdeclarativedom/tst_qdeclarativedom.cpp b/tests/auto/declarative/qdeclarativedom/tst_qdeclarativedom.cpp
index 6cd0bdb..adea384 100644
--- a/tests/auto/declarative/qdeclarativedom/tst_qdeclarativedom.cpp
+++ b/tests/auto/declarative/qdeclarativedom/tst_qdeclarativedom.cpp
@@ -340,9 +340,8 @@ void tst_qdeclarativedom::loadImports()
"Item {}";
QDeclarativeEngine engine;
- engine.addImportPath(SRCDIR "/data");
QDeclarativeDomDocument document;
- QVERIFY(document.load(&engine, qml));
+ QVERIFY(document.load(&engine, qml, QUrl::fromLocalFile(SRCDIR "/data/dummy.qml")));
QCOMPARE(document.imports().size(), 5);
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/dynamicCreation.qml b/tests/auto/declarative/qdeclarativeecmascript/data/dynamicCreation.qml
index ed5e571..2fef03a 100644
--- a/tests/auto/declarative/qdeclarativeecmascript/data/dynamicCreation.qml
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/dynamicCreation.qml
@@ -18,4 +18,10 @@ MyQmlObject{
{
obj.objectProperty = createQmlObject('TypeForDynamicCreation{}', obj);
}
+
+ function dontCrash()
+ {
+ var component = createComponent('file-doesnt-exist.qml');
+ obj.objectProperty = component.createObject();
+ }
}
diff --git a/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp b/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp
index caefdbf..87d73a0 100644
--- a/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp
+++ b/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp
@@ -130,6 +130,7 @@ private slots:
void qlistqobjectMethods();
void bug1();
+ void dynamicCreationCrash();
void callQtInvokables();
private:
@@ -1227,6 +1228,19 @@ void tst_qdeclarativeecmascript::bug1()
delete object;
}
+// Don't crash in createObject when the component has errors.
+void tst_qdeclarativeecmascript::dynamicCreationCrash()
+{
+ QDeclarativeComponent component(&engine, TEST_FILE("dynamicCreation.qml"));
+ MyQmlObject *object = qobject_cast<MyQmlObject*>(component.create());
+ QVERIFY(object != 0);
+
+ QTest::ignoreMessage(QtWarningMsg, "QDeclarativeComponent: Component is not ready");
+ QMetaObject::invokeMethod(object, "dontCrash");
+ QObject *created = object->objectProperty();
+ QVERIFY(created == 0);
+}
+
void tst_qdeclarativeecmascript::callQtInvokables()
{
MyInvokableObject o;
diff --git a/tests/auto/declarative/qdeclarativeflipable/data/crash.qml b/tests/auto/declarative/qdeclarativeflipable/data/crash.qml
new file mode 100644
index 0000000..ad40bf0
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeflipable/data/crash.qml
@@ -0,0 +1,9 @@
+import Qt 4.6
+
+Flipable {
+ transform: Rotation {
+ axis.y: 1
+ axis.z: 0
+ angle: 180
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativeflipable/tst_qdeclarativeflipable.cpp b/tests/auto/declarative/qdeclarativeflipable/tst_qdeclarativeflipable.cpp
index ed37c43..4beee9a 100644
--- a/tests/auto/declarative/qdeclarativeflipable/tst_qdeclarativeflipable.cpp
+++ b/tests/auto/declarative/qdeclarativeflipable/tst_qdeclarativeflipable.cpp
@@ -41,6 +41,7 @@
#include <qtest.h>
#include <QtDeclarative/qdeclarativeengine.h>
#include <QtDeclarative/qdeclarativecomponent.h>
+#include <QtDeclarative/qdeclarativeview.h>
#include <private/qdeclarativeflipable_p.h>
#include <private/qdeclarativevaluetype_p.h>
#include <QFontMetrics>
@@ -58,6 +59,10 @@ private slots:
void checkFrontAndBack();
void setFrontAndBack();
+ // below here task issues
+ void QTBUG_9161_crash();
+ void QTBUG_8474_qgv_abort();
+
private:
QDeclarativeEngine engine;
};
@@ -108,6 +113,22 @@ void tst_qdeclarativeflipable::setFrontAndBack()
delete obj;
}
+void tst_qdeclarativeflipable::QTBUG_9161_crash()
+{
+ QDeclarativeView *canvas = new QDeclarativeView;
+ canvas->setSource(QUrl(SRCDIR "/data/crash.qml"));
+ canvas->show();
+ delete canvas;
+}
+
+void tst_qdeclarativeflipable::QTBUG_8474_qgv_abort()
+{
+ QDeclarativeView *canvas = new QDeclarativeView;
+ canvas->setSource(QUrl(SRCDIR "/data/flipable-abort.qml"));
+ canvas->show();
+ delete canvas;
+}
+
QTEST_MAIN(tst_qdeclarativeflipable)
#include "tst_qdeclarativeflipable.moc"
diff --git a/tests/auto/declarative/qdeclarativegridview/data/propertychangestest.qml b/tests/auto/declarative/qdeclarativegridview/data/propertychangestest.qml
index da2e8d0..5ce758d 100644
--- a/tests/auto/declarative/qdeclarativegridview/data/propertychangestest.qml
+++ b/tests/auto/declarative/qdeclarativegridview/data/propertychangestest.qml
@@ -66,4 +66,4 @@ Rectangle {
]
}
- \ No newline at end of file
+
diff --git a/tests/auto/declarative/qdeclarativegridview/data/setindex.qml b/tests/auto/declarative/qdeclarativegridview/data/setindex.qml
index 908b365..b272d58 100644
--- a/tests/auto/declarative/qdeclarativegridview/data/setindex.qml
+++ b/tests/auto/declarative/qdeclarativegridview/data/setindex.qml
@@ -8,13 +8,9 @@ Rectangle {
Item {
id : wrapper
- Script {
- function startupFunction()
- {
- if (index == 5) view.currentIndex = index;
-
- }
- }
+ function startupFunction() {
+ if (index == 5) view.currentIndex = index;
+ }
Component.onCompleted: startupFunction();
width: 30; height: 30
Text { text: index }
diff --git a/tests/auto/declarative/qdeclarativeinstruction/tst_qdeclarativeinstruction.cpp b/tests/auto/declarative/qdeclarativeinstruction/tst_qdeclarativeinstruction.cpp
index 5f6d9a4..c747bfc 100644
--- a/tests/auto/declarative/qdeclarativeinstruction/tst_qdeclarativeinstruction.cpp
+++ b/tests/auto/declarative/qdeclarativeinstruction/tst_qdeclarativeinstruction.cpp
@@ -507,8 +507,16 @@ void tst_qdeclarativeinstruction::dump()
{
QDeclarativeInstruction i;
+ i.line = 48;
+ i.type = QDeclarativeInstruction::StoreImportedScript;
+ i.storeScript.value = 2;
+ data->bytecode << i;
+ }
+
+ {
+ QDeclarativeInstruction i;
i.line = 50;
- i.type = (QDeclarativeInstruction::Type)(QDeclarativeInstruction::Defer + 1); // Non-existant
+ i.type = (QDeclarativeInstruction::Type)(1234); // Non-existant
data->bytecode << i;
}
@@ -564,7 +572,8 @@ void tst_qdeclarativeinstruction::dump()
<< "45\t\t47\tPOP_VALUE\t\t35\t8"
<< "46\t\t48\tDEFER\t\t\t7"
<< "47\t\tNA\tDEFER\t\t\t7"
- << "48\t\t50\tXXX UNKOWN INSTRUCTION\t47"
+ << "48\t\t48\tSTORE_IMPORTED_SCRIPT\t2"
+ << "49\t\t50\tXXX UNKOWN INSTRUCTION\t1234"
<< "-------------------------------------------------------------------------------";
messages = QStringList();
diff --git a/tests/auto/declarative/qdeclarativeitem/data/propertychanges.qml b/tests/auto/declarative/qdeclarativeitem/data/propertychanges.qml
index bf4dd85..5f97408 100644
--- a/tests/auto/declarative/qdeclarativeitem/data/propertychanges.qml
+++ b/tests/auto/declarative/qdeclarativeitem/data/propertychanges.qml
@@ -7,4 +7,4 @@ Item {
Item {
objectName: "parentItem"
}
-} \ No newline at end of file
+}
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/dynamicObject.1.qml b/tests/auto/declarative/qdeclarativelanguage/data/dynamicObject.1.qml
index 85d1052..930bf2c 100644
--- a/tests/auto/declarative/qdeclarativelanguage/data/dynamicObject.1.qml
+++ b/tests/auto/declarative/qdeclarativelanguage/data/dynamicObject.1.qml
@@ -1,6 +1,6 @@
import Test 1.0
import Qt 4.6
-PropertyChanges {
+MyCustomParserType {
propa: a + 10
propb: Math.min(a, 10)
propc: MyPropertyValueSource {}
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/emptySignal.2.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/emptySignal.2.errors.txt
new file mode 100644
index 0000000..8b20434
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/emptySignal.2.errors.txt
@@ -0,0 +1 @@
+4:5:Incorrectly specified signal assignment
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/emptySignal.2.qml b/tests/auto/declarative/qdeclarativelanguage/data/emptySignal.2.qml
new file mode 100644
index 0000000..c84fea3
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/emptySignal.2.qml
@@ -0,0 +1,7 @@
+import Test 1.0
+
+MyQmlObject {
+ onBasicSignal {
+ }
+}
+
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/failingComponent.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/failingComponent.errors.txt
index 0cf0ef3..364ca67 100644
--- a/tests/auto/declarative/qdeclarativelanguage/data/failingComponent.errors.txt
+++ b/tests/auto/declarative/qdeclarativelanguage/data/failingComponent.errors.txt
@@ -1 +1 @@
-3:5:Type FailingComponent unavailable
+3:5:FailingComponent is not a type
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/importNewerVersion.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/importNewerVersion.errors.txt
new file mode 100644
index 0000000..413f096
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/importNewerVersion.errors.txt
@@ -0,0 +1 @@
+1:1:module "Test" version 2.0 is not installed
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/importNewerVersion.qml b/tests/auto/declarative/qdeclarativelanguage/data/importNewerVersion.qml
new file mode 100644
index 0000000..c4a0d38
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/importNewerVersion.qml
@@ -0,0 +1,3 @@
+import Test 2.0
+
+MyTypeObject { }
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/importNonExist.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/importNonExist.errors.txt
new file mode 100644
index 0000000..1baf05c
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/importNonExist.errors.txt
@@ -0,0 +1 @@
+2:1:"will-not-be-found": no such directory
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/importNonExist.qml b/tests/auto/declarative/qdeclarativelanguage/data/importNonExist.qml
new file mode 100644
index 0000000..ec6aa2b
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/importNonExist.qml
@@ -0,0 +1,5 @@
+// imports...
+import "will-not-be-found"
+import Qt 4.6
+
+Rectangle { }
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/unregisteredObject.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/unregisteredObject.errors.txt
index 347db05..10e5fb2 100644
--- a/tests/auto/declarative/qdeclarativelanguage/data/unregisteredObject.errors.txt
+++ b/tests/auto/declarative/qdeclarativelanguage/data/unregisteredObject.errors.txt
@@ -1 +1 @@
-2:1:Type UnregisteredObjectType unavailable
+2:1:UnregisteredObjectType is not a type
diff --git a/tests/auto/declarative/qdeclarativelanguage/qtest/declarative/qmllanguage/UndeclaredLocal.qml b/tests/auto/declarative/qdeclarativelanguage/qtest/declarative/qmllanguage/UndeclaredLocal.qml
new file mode 100644
index 0000000..836c20a
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/qtest/declarative/qmllanguage/UndeclaredLocal.qml
@@ -0,0 +1,3 @@
+import Qt 4.6
+
+Image { source: "pics/blue.png" }
diff --git a/tests/auto/declarative/qdeclarativelanguage/qtest/declarative/qmllanguage/WrongTestLocal.qml b/tests/auto/declarative/qdeclarativelanguage/qtest/declarative/qmllanguage/WrongTestLocal.qml
new file mode 100644
index 0000000..8dcb7be
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/qtest/declarative/qmllanguage/WrongTestLocal.qml
@@ -0,0 +1 @@
+UndeclaredInternal {}
diff --git a/tests/auto/declarative/qdeclarativelanguage/qtest/declarative/qmllanguage/qmldir b/tests/auto/declarative/qdeclarativelanguage/qtest/declarative/qmllanguage/qmldir
index 303c5c8..da10ba9 100644
--- a/tests/auto/declarative/qdeclarativelanguage/qtest/declarative/qmllanguage/qmldir
+++ b/tests/auto/declarative/qdeclarativelanguage/qtest/declarative/qmllanguage/qmldir
@@ -1,3 +1,4 @@
Test Test.qml
TestSubDir TestSubDir.qml
TestLocal TestLocal.qml
+internal LocalInternal LocalInternal.qml
diff --git a/tests/auto/declarative/qdeclarativelanguage/testtypes.cpp b/tests/auto/declarative/qdeclarativelanguage/testtypes.cpp
index 6efe755..623775a 100644
--- a/tests/auto/declarative/qdeclarativelanguage/testtypes.cpp
+++ b/tests/auto/declarative/qdeclarativelanguage/testtypes.cpp
@@ -51,6 +51,9 @@ void registerTypes()
qmlRegisterType<MyNamespace::MyNamespacedType>("Test",1,0,"MyNamespacedType");
qmlRegisterType<MyNamespace::MySecondNamespacedType>("Test",1,0,"MySecondNamespacedType");
qmlRegisterType<MyGroupedObject>();
+
+ qmlRegisterCustomType<MyCustomParserType>("Test", 1, 0, "MyCustomParserType", "MyCustomParserType",
+ new MyCustomParserTypeParser);
}
QVariant myCustomVariantTypeConverter(const QString &data)
diff --git a/tests/auto/declarative/qdeclarativelanguage/testtypes.h b/tests/auto/declarative/qdeclarativelanguage/testtypes.h
index 4963e2e..8c163a5 100644
--- a/tests/auto/declarative/qdeclarativelanguage/testtypes.h
+++ b/tests/auto/declarative/qdeclarativelanguage/testtypes.h
@@ -54,6 +54,8 @@
#include <QtDeclarative/qdeclarativescriptstring.h>
#include <QtDeclarative/qdeclarativeproperty.h>
+#include <private/qdeclarativecustomparser_p.h>
+
QVariant myCustomVariantTypeConverter(const QString &data);
class MyInterface
@@ -560,6 +562,20 @@ namespace MyNamespace {
QML_DECLARE_TYPE(MyNamespace::MyNamespacedType);
QML_DECLARE_TYPE(MyNamespace::MySecondNamespacedType);
+class MyCustomParserType : public QObject
+{
+ Q_OBJECT
+};
+
+class MyCustomParserTypeParser : public QDeclarativeCustomParser
+{
+public:
+ QByteArray compile(const QList<QDeclarativeCustomParserProperty> &) { return QByteArray(); }
+ void setCustomData(QObject *, const QByteArray &) {}
+};
+
+QML_DECLARE_TYPE(MyCustomParserType);
+
void registerTypes();
#endif // TESTTYPES_H
diff --git a/tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp b/tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp
index 6b564d4..eae78c4 100644
--- a/tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp
+++ b/tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp
@@ -264,6 +264,8 @@ void tst_qdeclarativelanguage::errors_data()
QTest::newRow("importNamespaceConflict") << "importNamespaceConflict.qml" << "importNamespaceConflict.errors.txt" << false;
QTest::newRow("importVersionMissing (builtin)") << "importVersionMissingBuiltIn.qml" << "importVersionMissingBuiltIn.errors.txt" << false;
QTest::newRow("importVersionMissing (installed)") << "importVersionMissingInstalled.qml" << "importVersionMissingInstalled.errors.txt" << false;
+ QTest::newRow("importNonExist (installed)") << "importNonExist.qml" << "importNonExist.errors.txt" << false;
+ QTest::newRow("importNewerVersion (installed)") << "importNewerVersion.qml" << "importNewerVersion.errors.txt" << false;
QTest::newRow("invalidImportID") << "invalidImportID.qml" << "invalidImportID.errors.txt" << false;
QTest::newRow("signal.1") << "signal.1.qml" << "signal.1.errors.txt" << false;
@@ -324,9 +326,11 @@ void tst_qdeclarativelanguage::errors_data()
QTest::newRow("invalidAttachedProperty.10") << "invalidAttachedProperty.10.qml" << "invalidAttachedProperty.10.errors.txt" << false;
QTest::newRow("invalidAttachedProperty.11") << "invalidAttachedProperty.11.qml" << "invalidAttachedProperty.11.errors.txt" << false;
+ QTest::newRow("emptySignal") << "emptySignal.qml" << "emptySignal.errors.txt" << false;
+ QTest::newRow("emptySignal.2") << "emptySignal.2.qml" << "emptySignal.2.errors.txt" << false;
+
QTest::newRow("nestedErrors") << "nestedErrors.qml" << "nestedErrors.errors.txt" << false;
QTest::newRow("defaultGrouped") << "defaultGrouped.qml" << "defaultGrouped.errors.txt" << false;
- QTest::newRow("emptySignal") << "emptySignal.qml" << "emptySignal.errors.txt" << false;
QTest::newRow("doubleSignal") << "doubleSignal.qml" << "doubleSignal.errors.txt" << false;
QTest::newRow("invalidRoot") << "invalidRoot.qml" << "invalidRoot.errors.txt" << false;
QTest::newRow("missingValueTypeProperty") << "missingValueTypeProperty.qml" << "missingValueTypeProperty.errors.txt" << false;
@@ -688,7 +692,7 @@ void tst_qdeclarativelanguage::propertyValueSource()
MyPropertyValueSource *valueSource =
qobject_cast<MyPropertyValueSource *>(valueSources.at(0));
QVERIFY(valueSource != 0);
- QCOMPARE(valueSource->prop.object(), object);
+ QCOMPARE(valueSource->prop.object(), qobject_cast<QObject*>(object));
QCOMPARE(valueSource->prop.name(), QString(QLatin1String("intProperty")));
}
@@ -709,7 +713,7 @@ void tst_qdeclarativelanguage::propertyValueSource()
MyPropertyValueSource *valueSource =
qobject_cast<MyPropertyValueSource *>(valueSources.at(0));
QVERIFY(valueSource != 0);
- QCOMPARE(valueSource->prop.object(), object);
+ QCOMPARE(valueSource->prop.object(), qobject_cast<QObject*>(object));
QCOMPARE(valueSource->prop.name(), QString(QLatin1String("intProperty")));
}
}
@@ -1031,12 +1035,12 @@ void tst_qdeclarativelanguage::scriptString()
MyTypeObject *object = qobject_cast<MyTypeObject*>(component.create());
QVERIFY(object != 0);
QCOMPARE(object->scriptProperty().script(), QString("foo + bar"));
- QCOMPARE(object->scriptProperty().scopeObject(), object);
+ QCOMPARE(object->scriptProperty().scopeObject(), qobject_cast<QObject*>(object));
QCOMPARE(object->scriptProperty().context(), qmlContext(object));
QVERIFY(object->grouped() != 0);
QCOMPARE(object->grouped()->script().script(), QString("console.log(1921)"));
- QCOMPARE(object->grouped()->script().scopeObject(), object);
+ QCOMPARE(object->grouped()->script().scopeObject(), qobject_cast<QObject*>(object));
QCOMPARE(object->grouped()->script().context(), qmlContext(object));
}
@@ -1242,6 +1246,9 @@ void tst_qdeclarativelanguage::importsRemote_data()
QTest::newRow("remote import") << "import \""+serverdir+"\"\nTest {}" << "QDeclarativeRectangle";
QTest::newRow("remote import with subdir") << "import \""+serverdir+"\"\nTestSubDir {}" << "QDeclarativeText";
QTest::newRow("remote import with local") << "import \""+serverdir+"\"\nTestLocal {}" << "QDeclarativeImage";
+ QTest::newRow("wrong remote import with undeclared local") << "import \""+serverdir+"\"\nWrongTestLocal {}" << "";
+ QTest::newRow("wrong remote import of internal local") << "import \""+serverdir+"\"\nLocalInternal {}" << "";
+ QTest::newRow("wrong remote import of undeclared local") << "import \""+serverdir+"\"\nUndeclaredLocal {}" << "";
}
#include "testhttpserver.h"
diff --git a/tests/auto/declarative/qdeclarativelistmodel/tst_qdeclarativelistmodel.cpp b/tests/auto/declarative/qdeclarativelistmodel/tst_qdeclarativelistmodel.cpp
index 7a10ad0..fcb453c 100644
--- a/tests/auto/declarative/qdeclarativelistmodel/tst_qdeclarativelistmodel.cpp
+++ b/tests/auto/declarative/qdeclarativelistmodel/tst_qdeclarativelistmodel.cpp
@@ -290,7 +290,7 @@ void tst_QDeclarativeListModel::dynamic_worker_data()
void tst_QDeclarativeListModel::dynamic_worker()
{
- QSKIP("Skip, awaiting imminent fixes", SkipAll);
+ QSKIP("", SkipAll);
QFETCH(QString, script);
QFETCH(int, result);
@@ -342,7 +342,7 @@ void tst_QDeclarativeListModel::dynamic_worker()
void tst_QDeclarativeListModel::convertNestedToFlat_fail()
{
- QSKIP("Skip, awaiting imminent fixes", SkipAll);
+ QSKIP("", SkipAll);
// If a model has nested data, it cannot be used at all from a worker script
QFETCH(QString, script);
@@ -387,11 +387,10 @@ void tst_QDeclarativeListModel::convertNestedToFlat_fail_data()
void tst_QDeclarativeListModel::convertNestedToFlat_ok()
{
+ QSKIP("", SkipAll);
// If a model only has plain data, it can be modified from a worker script. However,
// once the model is used from a worker script, it no longer accepts nested data
- QSKIP("Skip, awaiting imminent fixes", SkipAll);
-
QFETCH(QString, script);
QDeclarativeListModel model;
diff --git a/tests/auto/declarative/qdeclarativelistview/data/propertychangestest.qml b/tests/auto/declarative/qdeclarativelistview/data/propertychangestest.qml
index a41f003..09877ac 100644
--- a/tests/auto/declarative/qdeclarativelistview/data/propertychangestest.qml
+++ b/tests/auto/declarative/qdeclarativelistview/data/propertychangestest.qml
@@ -68,4 +68,4 @@ Rectangle {
]
}
- \ No newline at end of file
+
diff --git a/tests/auto/declarative/qdeclarativeloader/data/BlueRect.qml b/tests/auto/declarative/qdeclarativeloader/data/BlueRect.qml
new file mode 100644
index 0000000..3b49f6a
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeloader/data/BlueRect.qml
@@ -0,0 +1,8 @@
+import Qt 4.6
+
+Rectangle {
+ objectName: "blue"
+ width: 100
+ height: 100
+ color: "blue"
+}
diff --git a/tests/auto/declarative/qdeclarativeloader/data/GreenRect.qml b/tests/auto/declarative/qdeclarativeloader/data/GreenRect.qml
new file mode 100644
index 0000000..7ee3513
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeloader/data/GreenRect.qml
@@ -0,0 +1,7 @@
+import Qt 4.6
+
+Rectangle {
+ width: 100; height: 100
+ color: "green"
+ Component.onCompleted: myLoader.source = "BlueRect.qml"
+}
diff --git a/tests/auto/declarative/qdeclarativeloader/data/VmeError.qml b/tests/auto/declarative/qdeclarativeloader/data/VmeError.qml
new file mode 100644
index 0000000..da4f6cb
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeloader/data/VmeError.qml
@@ -0,0 +1,7 @@
+import Qt 4.6
+
+Rectangle {
+ width: 100; height: 100; color: "red"
+ signal somethingHappened
+ onSomethingHappened: QtObject {}
+}
diff --git a/tests/auto/declarative/qdeclarativeloader/data/crash.qml b/tests/auto/declarative/qdeclarativeloader/data/crash.qml
new file mode 100644
index 0000000..8474e78
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeloader/data/crash.qml
@@ -0,0 +1,14 @@
+import Qt 4.6
+
+Rectangle {
+ width: 400
+ height: 400
+
+ function setLoaderSource() {
+ myLoader.source = "GreenRect.qml"
+ }
+
+ Loader {
+ id: myLoader
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativeloader/data/differentorigin.qml b/tests/auto/declarative/qdeclarativeloader/data/differentorigin.qml
new file mode 100644
index 0000000..e682d1c
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeloader/data/differentorigin.qml
@@ -0,0 +1,3 @@
+import Qt 4.6
+
+Loader { source: "http://evil.place/evil.qml" }
diff --git a/tests/auto/declarative/qdeclarativeloader/data/nonItem.qml b/tests/auto/declarative/qdeclarativeloader/data/nonItem.qml
new file mode 100644
index 0000000..f42c1d5
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeloader/data/nonItem.qml
@@ -0,0 +1,5 @@
+import Qt 4.6
+
+Loader {
+ sourceComponent: QtObject {}
+}
diff --git a/tests/auto/declarative/qdeclarativeloader/data/sameorigin-load.qml b/tests/auto/declarative/qdeclarativeloader/data/sameorigin-load.qml
new file mode 100644
index 0000000..e281246
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeloader/data/sameorigin-load.qml
@@ -0,0 +1,3 @@
+import Qt 4.6
+
+Item { }
diff --git a/tests/auto/declarative/qdeclarativeloader/data/sameorigin.qml b/tests/auto/declarative/qdeclarativeloader/data/sameorigin.qml
new file mode 100644
index 0000000..e7f5a14
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeloader/data/sameorigin.qml
@@ -0,0 +1,3 @@
+import Qt 4.6
+
+Loader { source: "sameorigin-load.qml" }
diff --git a/tests/auto/declarative/qdeclarativeloader/data/vmeErrors.qml b/tests/auto/declarative/qdeclarativeloader/data/vmeErrors.qml
new file mode 100644
index 0000000..782562b
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeloader/data/vmeErrors.qml
@@ -0,0 +1,6 @@
+import Qt 4.6
+
+Loader {
+ source: "VmeError.qml"
+}
+
diff --git a/tests/auto/declarative/qdeclarativeloader/tst_qdeclarativeloader.cpp b/tests/auto/declarative/qdeclarativeloader/tst_qdeclarativeloader.cpp
index 61b2800..a745a24 100644
--- a/tests/auto/declarative/qdeclarativeloader/tst_qdeclarativeloader.cpp
+++ b/tests/auto/declarative/qdeclarativeloader/tst_qdeclarativeloader.cpp
@@ -88,6 +88,10 @@ private slots:
void failNetworkRequest();
// void networkComponent();
+ void deleteComponentCrash();
+ void nonItem();
+ void vmeErrors();
+
private:
QDeclarativeEngine engine;
};
@@ -392,7 +396,7 @@ void tst_QDeclarativeLoader::networkRequestUrl()
server.serveDirectory(SRCDIR "/data");
QDeclarativeComponent component(&engine);
- component.setData(QByteArray("import Qt 4.6\nLoader { source: \"http://127.0.0.1:14445/Rect120x60.qml\" }"), TEST_FILE(""));
+ component.setData(QByteArray("import Qt 4.6\nLoader { source: \"http://127.0.0.1:14445/Rect120x60.qml\" }"), QUrl("http://127.0.0.1:14445/dummy.qml"));
QDeclarativeLoader *loader = qobject_cast<QDeclarativeLoader*>(component.create());
QVERIFY(loader != 0);
@@ -446,7 +450,7 @@ void tst_QDeclarativeLoader::failNetworkRequest()
QTest::ignoreMessage(QtWarningMsg, "(:-1: Network error for URL http://127.0.0.1:14445/IDontExist.qml) ");
QDeclarativeComponent component(&engine);
- component.setData(QByteArray("import Qt 4.6\nLoader { source: \"http://127.0.0.1:14445/IDontExist.qml\" }"), TEST_FILE(""));
+ component.setData(QByteArray("import Qt 4.6\nLoader { source: \"http://127.0.0.1:14445/IDontExist.qml\" }"), QUrl("http://127.0.0.1:14445/dummy.qml"));
QDeclarativeLoader *loader = qobject_cast<QDeclarativeLoader*>(component.create());
QVERIFY(loader != 0);
@@ -459,6 +463,52 @@ void tst_QDeclarativeLoader::failNetworkRequest()
delete loader;
}
+// QTBUG-9241
+void tst_QDeclarativeLoader::deleteComponentCrash()
+{
+ QDeclarativeComponent component(&engine, TEST_FILE("crash.qml"));
+ QDeclarativeItem *item = qobject_cast<QDeclarativeItem*>(component.create());
+ QVERIFY(item);
+
+ item->metaObject()->invokeMethod(item, "setLoaderSource");
+
+ QDeclarativeLoader *loader = qobject_cast<QDeclarativeLoader*>(item->QGraphicsObject::children().at(0));
+ QVERIFY(loader);
+ QVERIFY(loader->item());
+ QCOMPARE(loader->item()->objectName(), QLatin1String("blue"));
+ QCOMPARE(loader->progress(), 1.0);
+ QCOMPARE(loader->status(), QDeclarativeLoader::Ready);
+ QCOMPARE(static_cast<QGraphicsItem*>(loader)->children().count(), 1);
+ QVERIFY(loader->source() == QUrl::fromLocalFile(SRCDIR "/data/BlueRect.qml"));
+
+ delete item;
+}
+
+void tst_QDeclarativeLoader::nonItem()
+{
+ QDeclarativeComponent component(&engine, TEST_FILE("nonItem.qml"));
+ QString err = QString("QML Loader (") + QUrl::fromLocalFile(SRCDIR).toString() + QString("/data/nonItem.qml:3:1) Loader does not support loading non-visual elements.");
+
+ QTest::ignoreMessage(QtWarningMsg, err.toLatin1().constData());
+ QDeclarativeLoader *loader = qobject_cast<QDeclarativeLoader*>(component.create());
+ QVERIFY(loader);
+ QVERIFY(loader->item() == 0);
+
+ delete loader;
+}
+
+void tst_QDeclarativeLoader::vmeErrors()
+{
+ QDeclarativeComponent component(&engine, TEST_FILE("vmeErrors.qml"));
+ QString err = QString("(") + QUrl::fromLocalFile(SRCDIR).toString() + QString("/data/VmeError.qml:6: Cannot assign object type QObject with no default method\n onSomethingHappened: QtObject {}) ");
+ QTest::ignoreMessage(QtWarningMsg, err.toLatin1().constData());
+ QDeclarativeLoader *loader = qobject_cast<QDeclarativeLoader*>(component.create());
+ QVERIFY(loader);
+ QVERIFY(loader->item() == 0);
+
+ delete loader;
+}
+
QTEST_MAIN(tst_QDeclarativeLoader)
#include "tst_qdeclarativeloader.moc"
diff --git a/tests/auto/declarative/qdeclarativemoduleplugin/plugin.qml b/tests/auto/declarative/qdeclarativemoduleplugin/data/works.qml
index f29ae24..f29ae24 100644
--- a/tests/auto/declarative/qdeclarativemoduleplugin/plugin.qml
+++ b/tests/auto/declarative/qdeclarativemoduleplugin/data/works.qml
diff --git a/tests/auto/declarative/qdeclarativemoduleplugin/com/nokia/AutoTestQmlPluginType/qmldir b/tests/auto/declarative/qdeclarativemoduleplugin/imports/com/nokia/AutoTestQmlPluginType/qmldir
index 0a8b5d4..0a8b5d4 100644
--- a/tests/auto/declarative/qdeclarativemoduleplugin/com/nokia/AutoTestQmlPluginType/qmldir
+++ b/tests/auto/declarative/qdeclarativemoduleplugin/imports/com/nokia/AutoTestQmlPluginType/qmldir
diff --git a/tests/auto/declarative/qdeclarativemoduleplugin/plugin/plugin.pro b/tests/auto/declarative/qdeclarativemoduleplugin/plugin/plugin.pro
index 035cb7d..fc77225 100644
--- a/tests/auto/declarative/qdeclarativemoduleplugin/plugin/plugin.pro
+++ b/tests/auto/declarative/qdeclarativemoduleplugin/plugin/plugin.pro
@@ -2,5 +2,5 @@ TEMPLATE = lib
CONFIG += plugin
SOURCES = plugin.cpp
QT = core declarative
-DESTDIR = ../com/nokia/AutoTestQmlPluginType
+DESTDIR = ../imports/com/nokia/AutoTestQmlPluginType
diff --git a/tests/auto/declarative/qdeclarativemoduleplugin/tst_qdeclarativemoduleplugin.cpp b/tests/auto/declarative/qdeclarativemoduleplugin/tst_qdeclarativemoduleplugin.cpp
index 1335c7c..26199d3 100644
--- a/tests/auto/declarative/qdeclarativemoduleplugin/tst_qdeclarativemoduleplugin.cpp
+++ b/tests/auto/declarative/qdeclarativemoduleplugin/tst_qdeclarativemoduleplugin.cpp
@@ -48,8 +48,8 @@ class tst_qdeclarativemoduleplugin : public QObject
{
Q_OBJECT
public:
- tst_qdeclarativemoduleplugin() {
- QCoreApplication::addLibraryPath(QLatin1String(SRCDIR) + QDir::separator() + QLatin1String("plugin"));
+ tst_qdeclarativemoduleplugin()
+ {
}
private slots:
@@ -103,9 +103,10 @@ void tst_qdeclarativemoduleplugin::importsPlugin()
{
QSKIP("Fix me", SkipAll);
QDeclarativeEngine engine;
+ engine.addImportPath(QLatin1String(SRCDIR) + QDir::separator() + QLatin1String("imports"));
QTest::ignoreMessage(QtWarningMsg, "plugin created");
QTest::ignoreMessage(QtWarningMsg, "import worked");
- QDeclarativeComponent component(&engine, TEST_FILE("plugin.qml"));
+ QDeclarativeComponent component(&engine, TEST_FILE("data/works.qml"));
foreach (QDeclarativeError err, component.errors())
qWarning() << err;
VERIFY_ERRORS(0);
diff --git a/tests/auto/declarative/qdeclarativeproperty/tst_qdeclarativeproperty.cpp b/tests/auto/declarative/qdeclarativeproperty/tst_qdeclarativeproperty.cpp
index eed12ea..56166f2 100644
--- a/tests/auto/declarative/qdeclarativeproperty/tst_qdeclarativeproperty.cpp
+++ b/tests/auto/declarative/qdeclarativeproperty/tst_qdeclarativeproperty.cpp
@@ -305,7 +305,7 @@ void tst_qdeclarativeproperty::qmlmetaproperty_object()
QCOMPARE(prop.isDesignable(), true);
QCOMPARE(prop.isResettable(), false);
QCOMPARE(prop.isValid(), true);
- QCOMPARE(prop.object(), &dobject);
+ QCOMPARE(prop.object(), qobject_cast<QObject*>(&dobject));
QCOMPARE(prop.propertyTypeCategory(), QDeclarativeProperty::Normal);
QCOMPARE(prop.propertyType(), (int)QVariant::Int);
QCOMPARE(prop.propertyTypeName(), "int");
@@ -404,7 +404,7 @@ void tst_qdeclarativeproperty::qmlmetaproperty_object_string()
QCOMPARE(prop.isDesignable(), true);
QCOMPARE(prop.isResettable(), false);
QCOMPARE(prop.isValid(), true);
- QCOMPARE(prop.object(), &dobject);
+ QCOMPARE(prop.object(), qobject_cast<QObject*>(&dobject));
QCOMPARE(prop.propertyTypeCategory(), QDeclarativeProperty::Normal);
QCOMPARE(prop.propertyType(), (int)QVariant::Int);
QCOMPARE(prop.propertyTypeName(), "int");
@@ -452,7 +452,7 @@ void tst_qdeclarativeproperty::qmlmetaproperty_object_string()
QCOMPARE(prop.isDesignable(), false);
QCOMPARE(prop.isResettable(), false);
QCOMPARE(prop.isValid(), true);
- QCOMPARE(prop.object(), &dobject);
+ QCOMPARE(prop.object(), qobject_cast<QObject*>(&dobject));
QCOMPARE(prop.propertyTypeCategory(), QDeclarativeProperty::InvalidCategory);
QCOMPARE(prop.propertyType(), 0);
QCOMPARE(prop.propertyTypeName(), (const char *)0);
@@ -499,7 +499,7 @@ void tst_qdeclarativeproperty::qmlmetaproperty_object_string()
QCOMPARE(prop.isDesignable(), false);
QCOMPARE(prop.isResettable(), false);
QCOMPARE(prop.isValid(), true);
- QCOMPARE(prop.object(), &dobject);
+ QCOMPARE(prop.object(), qobject_cast<QObject*>(&dobject));
QCOMPARE(prop.propertyTypeCategory(), QDeclarativeProperty::InvalidCategory);
QCOMPARE(prop.propertyType(), 0);
QCOMPARE(prop.propertyTypeName(), (const char *)0);
@@ -597,7 +597,7 @@ void tst_qdeclarativeproperty::qmlmetaproperty_object_context()
QCOMPARE(prop.isDesignable(), true);
QCOMPARE(prop.isResettable(), false);
QCOMPARE(prop.isValid(), true);
- QCOMPARE(prop.object(), &dobject);
+ QCOMPARE(prop.object(), qobject_cast<QObject*>(&dobject));
QCOMPARE(prop.propertyTypeCategory(), QDeclarativeProperty::Normal);
QCOMPARE(prop.propertyType(), (int)QVariant::Int);
QCOMPARE(prop.propertyTypeName(), "int");
@@ -696,7 +696,7 @@ void tst_qdeclarativeproperty::qmlmetaproperty_object_string_context()
QCOMPARE(prop.isDesignable(), true);
QCOMPARE(prop.isResettable(), false);
QCOMPARE(prop.isValid(), true);
- QCOMPARE(prop.object(), &dobject);
+ QCOMPARE(prop.object(), qobject_cast<QObject*>(&dobject));
QCOMPARE(prop.propertyTypeCategory(), QDeclarativeProperty::Normal);
QCOMPARE(prop.propertyType(), (int)QVariant::Int);
QCOMPARE(prop.propertyTypeName(), "int");
@@ -744,7 +744,7 @@ void tst_qdeclarativeproperty::qmlmetaproperty_object_string_context()
QCOMPARE(prop.isDesignable(), false);
QCOMPARE(prop.isResettable(), false);
QCOMPARE(prop.isValid(), true);
- QCOMPARE(prop.object(), &dobject);
+ QCOMPARE(prop.object(), qobject_cast<QObject*>(&dobject));
QCOMPARE(prop.propertyTypeCategory(), QDeclarativeProperty::InvalidCategory);
QCOMPARE(prop.propertyType(), 0);
QCOMPARE(prop.propertyTypeName(), (const char *)0);
@@ -791,7 +791,7 @@ void tst_qdeclarativeproperty::qmlmetaproperty_object_string_context()
QCOMPARE(prop.isDesignable(), false);
QCOMPARE(prop.isResettable(), false);
QCOMPARE(prop.isValid(), true);
- QCOMPARE(prop.object(), &dobject);
+ QCOMPARE(prop.object(), qobject_cast<QObject*>(&dobject));
QCOMPARE(prop.propertyTypeCategory(), QDeclarativeProperty::InvalidCategory);
QCOMPARE(prop.propertyType(), 0);
QCOMPARE(prop.propertyTypeName(), (const char *)0);
@@ -1254,7 +1254,7 @@ void tst_qdeclarativeproperty::writeObjectToList()
QDeclarativeProperty prop(container, "children");
prop.write(qVariantFromValue(object));
QCOMPARE(list.count(), 1);
- QCOMPARE(list.at(0), object);
+ QCOMPARE(list.at(0), qobject_cast<QObject*>(object));
}
Q_DECLARE_METATYPE(QList<QObject *>);
diff --git a/tests/auto/declarative/qdeclarativeqt/data/createQmlObject.qml b/tests/auto/declarative/qdeclarativeqt/data/createQmlObject.qml
index 9150782..54a3e7d 100644
--- a/tests/auto/declarative/qdeclarativeqt/data/createQmlObject.qml
+++ b/tests/auto/declarative/qdeclarativeqt/data/createQmlObject.qml
@@ -7,7 +7,7 @@ Item {
property bool incorrectArgCount2: false
property bool emptyArg: false
property bool noParent: false
- property bool notReady: false
+ property bool notAvailable: false
property bool runtimeError: false
property bool errors: false
@@ -20,7 +20,7 @@ Item {
emptyArg = (createQmlObject("", root) == null);
errors = (createQmlObject("import Qt 4.6\nQtObject{\nproperty int test: 13\nproperty int test: 13\n}", root, "main.qml") == null);
noParent = (createQmlObject("import Qt 4.6\nQtObject{\nproperty int test: 13}", 0) == null);
- notReady = (createQmlObject("import Qt 4.6\nQtObject{\nBlah{}\n}", root, "http://www.example.com/main.qml") == null);
+ notAvailable = (createQmlObject("import Qt 4.6\nQtObject{Blah{}}", root) == null);
runtimeError = (createQmlObject("import Qt 4.6\nQtObject{property int test\nonTestChanged: QtObject{}\n}", root) == null);
var o = createQmlObject("import Qt 4.6\nQtObject{\nproperty int test: 13\n}", root);
diff --git a/tests/auto/declarative/qdeclarativeqt/tst_qdeclarativeqt.cpp b/tests/auto/declarative/qdeclarativeqt/tst_qdeclarativeqt.cpp
index debec02..4987557 100644
--- a/tests/auto/declarative/qdeclarativeqt/tst_qdeclarativeqt.cpp
+++ b/tests/auto/declarative/qdeclarativeqt/tst_qdeclarativeqt.cpp
@@ -301,15 +301,17 @@ void tst_qdeclarativeqt::createQmlObject()
QString warning1 = "QDeclarativeEngine::createQmlObject():";
QString warning2 = " " + TEST_FILE("main.qml").toString() + ":4:1: Duplicate property name";
- QString warning3 = "QDeclarativeEngine::createQmlObject(): Component is not ready";
- QString warning4 = "QDeclarativeEngine::createQmlObject():";
- QString warning5 = " " + TEST_FILE("inline").toString() + ":3: Cannot assign object type QObject with no default method";
+ QString warning3 = "QDeclarativeEngine::createQmlObject():";
+ QString warning4 = " " + TEST_FILE("inline").toString() + ":2:10: Blah is not a type";
+ QString warning5 = "QDeclarativeEngine::createQmlObject():";
+ QString warning6 = " " + TEST_FILE("inline").toString() + ":3: Cannot assign object type QObject with no default method";
QTest::ignoreMessage(QtWarningMsg, qPrintable(warning1));
QTest::ignoreMessage(QtWarningMsg, qPrintable(warning2));
QTest::ignoreMessage(QtWarningMsg, qPrintable(warning3));
QTest::ignoreMessage(QtWarningMsg, qPrintable(warning4));
QTest::ignoreMessage(QtWarningMsg, qPrintable(warning5));
+ QTest::ignoreMessage(QtWarningMsg, qPrintable(warning6));
QObject *object = component.create();
QVERIFY(object != 0);
@@ -319,7 +321,7 @@ void tst_qdeclarativeqt::createQmlObject()
QCOMPARE(object->property("emptyArg").toBool(), true);
QCOMPARE(object->property("errors").toBool(), true);
QCOMPARE(object->property("noParent").toBool(), true);
- QCOMPARE(object->property("notReady").toBool(), true);
+ QCOMPARE(object->property("notAvailable").toBool(), true);
QCOMPARE(object->property("runtimeError").toBool(), true);
QCOMPARE(object->property("success").toBool(), true);
diff --git a/tests/auto/declarative/qdeclarativerepeater/data/properties.qml b/tests/auto/declarative/qdeclarativerepeater/data/properties.qml
index 550ce8d..8c9f88e 100644
--- a/tests/auto/declarative/qdeclarativerepeater/data/properties.qml
+++ b/tests/auto/declarative/qdeclarativerepeater/data/properties.qml
@@ -8,4 +8,4 @@ Row {
text: "I'm item " + index
}
}
-} \ No newline at end of file
+}
diff --git a/tests/auto/declarative/qdeclarativestates/data/illegalObj.qml b/tests/auto/declarative/qdeclarativestates/data/illegalObj.qml
new file mode 100644
index 0000000..480764e
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativestates/data/illegalObj.qml
@@ -0,0 +1,12 @@
+import Qt 4.6
+
+Rectangle {
+ id: myItem
+
+ states : State {
+ PropertyChanges {
+ target: myItem
+ children: Item { id: newItem }
+ }
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativestates/tst_qdeclarativestates.cpp b/tests/auto/declarative/qdeclarativestates/tst_qdeclarativestates.cpp
index fe7ec15..91883c9 100644
--- a/tests/auto/declarative/qdeclarativestates/tst_qdeclarativestates.cpp
+++ b/tests/auto/declarative/qdeclarativestates/tst_qdeclarativestates.cpp
@@ -106,6 +106,7 @@ private slots:
void illegalTempState();
void nonExistantProperty();
void reset();
+ void illegalObjectCreation();
};
void tst_qdeclarativestates::initTestCase()
@@ -564,7 +565,7 @@ void tst_qdeclarativestates::anchorChanges()
rect->setState("right");
QCOMPARE(innerRect->x(), qreal(150));
QCOMPARE(aChanges->reset(), QString("left"));
- QCOMPARE(aChanges->object(), innerRect);
+ QCOMPARE(aChanges->object(), qobject_cast<QDeclarativeItem*>(innerRect));
QCOMPARE(aChanges->right().item, rect->right().item);
QCOMPARE(aChanges->right().anchorLine, rect->right().anchorLine);
@@ -621,7 +622,7 @@ void tst_qdeclarativestates::anchorChanges3()
QVERIFY(aChanges != 0);
rect->setState("reanchored");
- QCOMPARE(aChanges->object(), innerRect);
+ QCOMPARE(aChanges->object(), qobject_cast<QDeclarativeItem*>(innerRect));
QCOMPARE(aChanges->left().item, leftGuideline->left().item);
QCOMPARE(aChanges->left().anchorLine, leftGuideline->left().anchorLine);
QCOMPARE(aChanges->right().item, rect->right().item);
@@ -671,7 +672,7 @@ void tst_qdeclarativestates::anchorChanges4()
QVERIFY(aChanges != 0);
rect->setState("reanchored");
- QCOMPARE(aChanges->object(), innerRect);
+ QCOMPARE(aChanges->object(), qobject_cast<QDeclarativeItem*>(innerRect));
QCOMPARE(aChanges->horizontalCenter().item, bottomGuideline->horizontalCenter().item);
QCOMPARE(aChanges->horizontalCenter().anchorLine, bottomGuideline->horizontalCenter().anchorLine);
QCOMPARE(aChanges->verticalCenter().item, leftGuideline->verticalCenter().item);
@@ -706,7 +707,7 @@ void tst_qdeclarativestates::anchorChanges5()
QVERIFY(aChanges != 0);
rect->setState("reanchored");
- QCOMPARE(aChanges->object(), innerRect);
+ QCOMPARE(aChanges->object(), qobject_cast<QDeclarativeItem*>(innerRect));
QCOMPARE(aChanges->horizontalCenter().item, bottomGuideline->horizontalCenter().item);
QCOMPARE(aChanges->horizontalCenter().anchorLine, bottomGuideline->horizontalCenter().anchorLine);
QCOMPARE(aChanges->baseline().item, leftGuideline->baseline().item);
@@ -964,6 +965,19 @@ void tst_qdeclarativestates::reset()
QVERIFY(text->width() > text->height());
}
+void tst_qdeclarativestates::illegalObjectCreation()
+{
+ QDeclarativeEngine engine;
+
+ QDeclarativeComponent component(&engine, SRCDIR "/data/illegalObj.qml");
+ QList<QDeclarativeError> errors = component.errors();
+ QVERIFY(errors.count() == 1);
+ const QDeclarativeError &error = errors.at(0);
+ QCOMPARE(error.line(), 9);
+ QCOMPARE(error.column(), 23);
+ QCOMPARE(error.description().toUtf8().constData(), "PropertyChanges does not support creating state-specific objects.");
+}
+
QTEST_MAIN(tst_qdeclarativestates)
#include "tst_qdeclarativestates.moc"
diff --git a/tests/auto/declarative/qdeclarativetextedit/data/http/cursorHttpTestPass.qml b/tests/auto/declarative/qdeclarativetextedit/data/http/cursorHttpTestPass.qml
index a44e867..de4de00 100644
--- a/tests/auto/declarative/qdeclarativetextedit/data/http/cursorHttpTestPass.qml
+++ b/tests/auto/declarative/qdeclarativetextedit/data/http/cursorHttpTestPass.qml
@@ -1,4 +1,5 @@
import Qt 4.6
+import "http://localhost:42332"
Rectangle { width: 300; height: 300; color: "white"
resources: [
diff --git a/tests/auto/declarative/qdeclarativetextedit/data/http/qmldir b/tests/auto/declarative/qdeclarativetextedit/data/http/qmldir
new file mode 100644
index 0000000..886e6ff
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativetextedit/data/http/qmldir
@@ -0,0 +1,4 @@
+ErrItem ErrItem.qml
+NormItem NormItem.qml
+FailItem FailItem.qml
+WaitItem WaitItem.qml
diff --git a/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp b/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp
index 8b513e8..e623df6 100644
--- a/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp
+++ b/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp
@@ -72,6 +72,7 @@ private slots:
void readOnly();
void sendRequestSoftwareInputPanelEvent();
+ void setHAlignClearCache();
private:
void simulateKey(QDeclarativeView *, int key);
@@ -651,6 +652,38 @@ void tst_qdeclarativetextinput::sendRequestSoftwareInputPanelEvent()
QCOMPARE(ic.softwareInputPanelEventReceived, true);
}
+class MyTextInput : public QDeclarativeTextInput
+{
+public:
+ MyTextInput(QDeclarativeItem *parent = 0) : QDeclarativeTextInput(parent)
+ {
+ nbPaint = 0;
+ }
+ void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
+ {
+ nbPaint++;
+ QDeclarativeTextInput::paint(painter, option, widget);
+ }
+ int nbPaint;
+};
+
+void tst_qdeclarativetextinput::setHAlignClearCache()
+{
+ QGraphicsScene scene;
+ QGraphicsView view(&scene);
+ MyTextInput input;
+ input.setText("Hello world");
+ scene.addItem(&input);
+ view.show();
+ QApplication::setActiveWindow(&view);
+ QTest::qWaitForWindowShown(&view);
+ QCOMPARE(input.nbPaint, 1);
+ input.setHAlign(QDeclarativeTextInput::AlignRight);
+ QApplication::processEvents();
+ //Changing the alignment should trigger a repaint
+ QCOMPARE(input.nbPaint, 2);
+}
+
QTEST_MAIN(tst_qdeclarativetextinput)
#include "tst_qdeclarativetextinput.moc"
diff --git a/tests/auto/declarative/qdeclarativexmllistmodel/tst_qdeclarativexmllistmodel.cpp b/tests/auto/declarative/qdeclarativexmllistmodel/tst_qdeclarativexmllistmodel.cpp
index 0e5e1b0..81cc922 100644
--- a/tests/auto/declarative/qdeclarativexmllistmodel/tst_qdeclarativexmllistmodel.cpp
+++ b/tests/auto/declarative/qdeclarativexmllistmodel/tst_qdeclarativexmllistmodel.cpp
@@ -74,6 +74,8 @@ private slots:
void useKeys_data();
void noKeysValueChanges();
void keysChanged();
+ void threading();
+ void threading_data();
void propertyChanges();
private:
@@ -86,6 +88,8 @@ private:
if (!data.isEmpty()) {
QStringList items = data.split(";");
foreach(const QString &item, items) {
+ if (item.isEmpty())
+ continue;
QVariantList variants;
xml += QLatin1String("<item>");
QStringList fields = item.split(",");
@@ -505,6 +509,63 @@ void tst_qdeclarativexmllistmodel::keysChanged()
delete model;
}
+void tst_qdeclarativexmllistmodel::threading()
+{
+ QFETCH(int, xmlDataCount);
+
+ QDeclarativeComponent component(&engine, QUrl::fromLocalFile(SRCDIR "/data/roleKeys.qml"));
+
+ QDeclarativeXmlListModel *m1 = qobject_cast<QDeclarativeXmlListModel*>(component.create());
+ QVERIFY(m1 != 0);
+ QDeclarativeXmlListModel *m2 = qobject_cast<QDeclarativeXmlListModel*>(component.create());
+ QVERIFY(m2 != 0);
+ QDeclarativeXmlListModel *m3 = qobject_cast<QDeclarativeXmlListModel*>(component.create());
+ QVERIFY(m3 != 0);
+
+ for (int dataCount=0; dataCount<xmlDataCount; dataCount++) {
+
+ QString data1, data2, data3;
+ for (int i=0; i<dataCount; i++) {
+ data1 += "name=A" + QString::number(i) + ",age=1" + QString::number(i) + ",sport=Football;";
+ data2 += "name=B" + QString::number(i) + ",age=2" + QString::number(i) + ",sport=Athletics;";
+ data3 += "name=C" + QString::number(i) + ",age=3" + QString::number(i) + ",sport=Curling;";
+ }
+
+ m1->setXml(makeItemXmlAndData(data1));
+ m2->setXml(makeItemXmlAndData(data2));
+ m3->setXml(makeItemXmlAndData(data3));
+
+ QTRY_VERIFY(m1->count() == dataCount && m2->count() == dataCount && m3->count() == dataCount);
+
+ for (int i=0; i<dataCount; i++) {
+ QCOMPARE(m1->data(i, m1->roles()[0]).toString(), QString("A" + QString::number(i)));
+ QCOMPARE(m1->data(i, m1->roles()[1]).toString(), QString("1" + QString::number(i)));
+ QCOMPARE(m1->data(i, m1->roles()[2]).toString(), QString("Football"));
+
+ QCOMPARE(m2->data(i, m2->roles()[0]).toString(), QString("B" + QString::number(i)));
+ QCOMPARE(m2->data(i, m2->roles()[1]).toString(), QString("2" + QString::number(i)));
+ QCOMPARE(m2->data(i, m2->roles()[2]).toString(), QString("Athletics"));
+
+ QCOMPARE(m3->data(i, m3->roles()[0]).toString(), QString("C" + QString::number(i)));
+ QCOMPARE(m3->data(i, m3->roles()[1]).toString(), QString("3" + QString::number(i)));
+ QCOMPARE(m3->data(i, m3->roles()[2]).toString(), QString("Curling"));
+ }
+ }
+
+ delete m1;
+ delete m2;
+ delete m3;
+}
+
+void tst_qdeclarativexmllistmodel::threading_data()
+{
+ QTest::addColumn<int>("xmlDataCount");
+
+ QTest::newRow("1") << 1;
+ QTest::newRow("2") << 2;
+ QTest::newRow("10") << 10;
+}
+
void tst_qdeclarativexmllistmodel::propertyChanges()
{
QDeclarativeComponent component(&engine, QUrl::fromLocalFile(SRCDIR "/data/propertychanges.qml"));
@@ -554,6 +615,8 @@ void tst_qdeclarativexmllistmodel::propertyChanges()
QCOMPARE(model->query(), QString("/Pets"));
QCOMPARE(model->namespaceDeclarations(), QString("declare namespace media=\"http://search.yahoo.com/mrss/\";"));
+ QTRY_VERIFY(model->count() == 1);
+
QCOMPARE(sourceSpy.count(),1);
QCOMPARE(xmlSpy.count(),1);
QCOMPARE(modelQuerySpy.count(),1);
@@ -568,6 +631,9 @@ void tst_qdeclarativexmllistmodel::propertyChanges()
QCOMPARE(xmlSpy.count(),1);
QCOMPARE(modelQuerySpy.count(),1);
QCOMPARE(namespaceDeclarationsSpy.count(),1);
+
+ QTRY_VERIFY(model->count() == 1);
+ delete model;
}
QTEST_MAIN(tst_qdeclarativexmllistmodel)
diff --git a/tests/auto/declarative/qmetaobjectbuilder/tst_qmetaobjectbuilder.cpp b/tests/auto/declarative/qmetaobjectbuilder/tst_qmetaobjectbuilder.cpp
index c1dc924..8ba9d45 100644
--- a/tests/auto/declarative/qmetaobjectbuilder/tst_qmetaobjectbuilder.cpp
+++ b/tests/auto/declarative/qmetaobjectbuilder/tst_qmetaobjectbuilder.cpp
@@ -139,10 +139,10 @@ void tst_QMetaObjectBuilder::mocVersionCheck()
// It is intended as a reminder to also update QMetaObjectBuilder
// whenenver moc changes. Once QMetaObjectBuilder has been
// updated, this test can be changed to check for the next version.
- QEXPECT_FAIL("", "QT-2918", Continue);
- QCOMPARE(int(QObject::staticMetaObject.d.data[0]), 4);
- QEXPECT_FAIL("", "QT-2918", Continue);
- QCOMPARE(int(staticMetaObject.d.data[0]), 4);
+ int version = int(QObject::staticMetaObject.d.data[0]);
+ QVERIFY(version == 4 || version == 5);
+ version = int(staticMetaObject.d.data[0]);
+ QVERIFY(version == 4 || version == 5);
}
void tst_QMetaObjectBuilder::create()
diff --git a/tests/auto/declarative/visual/animation/loop/loop.qml b/tests/auto/declarative/visual/animation/loop/loop.qml
index f6049ae..927e103 100644
--- a/tests/auto/declarative/visual/animation/loop/loop.qml
+++ b/tests/auto/declarative/visual/animation/loop/loop.qml
@@ -14,7 +14,7 @@ Rectangle {
back to 100, jumps to 200, and so on.
*/
x: SequentialAnimation {
- repeat: true
+ loops: Animation.Infinite
NumberAnimation { to: 100; duration: 1000 }
NumberAnimation { from: 200; to: 400; duration: 1000 }
}
diff --git a/tests/auto/declarative/visual/animation/parentAction/data/parentAction.0.png b/tests/auto/declarative/visual/animation/parentAction/data/parentAction.0.png
deleted file mode 100644
index a0032f8..0000000
--- a/tests/auto/declarative/visual/animation/parentAction/data/parentAction.0.png
+++ /dev/null
Binary files differ
diff --git a/tests/auto/declarative/visual/animation/parentAction/data/parentAction.1.png b/tests/auto/declarative/visual/animation/parentAction/data/parentAction.1.png
deleted file mode 100644
index 958b6af..0000000
--- a/tests/auto/declarative/visual/animation/parentAction/data/parentAction.1.png
+++ /dev/null
Binary files differ
diff --git a/tests/auto/declarative/visual/animation/parentAction/data/parentAction.2.png b/tests/auto/declarative/visual/animation/parentAction/data/parentAction.2.png
deleted file mode 100644
index 3a1811f..0000000
--- a/tests/auto/declarative/visual/animation/parentAction/data/parentAction.2.png
+++ /dev/null
Binary files differ
diff --git a/tests/auto/declarative/visual/animation/parentAction/data/parentAction.3.png b/tests/auto/declarative/visual/animation/parentAction/data/parentAction.3.png
deleted file mode 100644
index 36064c2..0000000
--- a/tests/auto/declarative/visual/animation/parentAction/data/parentAction.3.png
+++ /dev/null
Binary files differ
diff --git a/tests/auto/declarative/visual/animation/parentAction/data/parentAction.4.png b/tests/auto/declarative/visual/animation/parentAction/data/parentAction.4.png
deleted file mode 100644
index c493a1d..0000000
--- a/tests/auto/declarative/visual/animation/parentAction/data/parentAction.4.png
+++ /dev/null
Binary files differ
diff --git a/tests/auto/declarative/visual/animation/parentAction/data/parentAction.5.png b/tests/auto/declarative/visual/animation/parentAction/data/parentAction.5.png
deleted file mode 100644
index c493a1d..0000000
--- a/tests/auto/declarative/visual/animation/parentAction/data/parentAction.5.png
+++ /dev/null
Binary files differ
diff --git a/tests/auto/declarative/visual/animation/parentAction/data/parentAction.qml b/tests/auto/declarative/visual/animation/parentAction/data/parentAction.qml
deleted file mode 100644
index de27af7..0000000
--- a/tests/auto/declarative/visual/animation/parentAction/data/parentAction.qml
+++ /dev/null
@@ -1,1207 +0,0 @@
-import Qt.VisualTest 4.6
-
-VisualTest {
- Frame {
- msec: 0
- }
- Frame {
- msec: 16
- hash: "23ce049cd7e715c28f5845fd1a1fc195"
- }
- Frame {
- msec: 32
- hash: "23ce049cd7e715c28f5845fd1a1fc195"
- }
- Frame {
- msec: 48
- hash: "23ce049cd7e715c28f5845fd1a1fc195"
- }
- Frame {
- msec: 64
- hash: "23ce049cd7e715c28f5845fd1a1fc195"
- }
- Frame {
- msec: 80
- hash: "23ce049cd7e715c28f5845fd1a1fc195"
- }
- Frame {
- msec: 96
- hash: "23ce049cd7e715c28f5845fd1a1fc195"
- }
- Frame {
- msec: 112
- hash: "23ce049cd7e715c28f5845fd1a1fc195"
- }
- Frame {
- msec: 128
- hash: "23ce049cd7e715c28f5845fd1a1fc195"
- }
- Frame {
- msec: 144
- hash: "23ce049cd7e715c28f5845fd1a1fc195"
- }
- Frame {
- msec: 160
- hash: "23ce049cd7e715c28f5845fd1a1fc195"
- }
- Frame {
- msec: 176
- hash: "23ce049cd7e715c28f5845fd1a1fc195"
- }
- Frame {
- msec: 192
- hash: "23ce049cd7e715c28f5845fd1a1fc195"
- }
- Frame {
- msec: 208
- hash: "23ce049cd7e715c28f5845fd1a1fc195"
- }
- Frame {
- msec: 224
- hash: "23ce049cd7e715c28f5845fd1a1fc195"
- }
- Frame {
- msec: 240
- hash: "23ce049cd7e715c28f5845fd1a1fc195"
- }
- Frame {
- msec: 256
- hash: "23ce049cd7e715c28f5845fd1a1fc195"
- }
- Frame {
- msec: 272
- hash: "23ce049cd7e715c28f5845fd1a1fc195"
- }
- Frame {
- msec: 288
- hash: "23ce049cd7e715c28f5845fd1a1fc195"
- }
- Frame {
- msec: 304
- hash: "23ce049cd7e715c28f5845fd1a1fc195"
- }
- Frame {
- msec: 320
- hash: "23ce049cd7e715c28f5845fd1a1fc195"
- }
- Frame {
- msec: 336
- hash: "23ce049cd7e715c28f5845fd1a1fc195"
- }
- Frame {
- msec: 352
- hash: "23ce049cd7e715c28f5845fd1a1fc195"
- }
- Frame {
- msec: 368
- hash: "23ce049cd7e715c28f5845fd1a1fc195"
- }
- Frame {
- msec: 384
- hash: "23ce049cd7e715c28f5845fd1a1fc195"
- }
- Frame {
- msec: 400
- hash: "23ce049cd7e715c28f5845fd1a1fc195"
- }
- Frame {
- msec: 416
- hash: "23ce049cd7e715c28f5845fd1a1fc195"
- }
- Frame {
- msec: 432
- hash: "23ce049cd7e715c28f5845fd1a1fc195"
- }
- Frame {
- msec: 448
- hash: "23ce049cd7e715c28f5845fd1a1fc195"
- }
- Frame {
- msec: 464
- hash: "23ce049cd7e715c28f5845fd1a1fc195"
- }
- Frame {
- msec: 480
- hash: "23ce049cd7e715c28f5845fd1a1fc195"
- }
- Frame {
- msec: 496
- hash: "23ce049cd7e715c28f5845fd1a1fc195"
- }
- Frame {
- msec: 512
- hash: "23ce049cd7e715c28f5845fd1a1fc195"
- }
- Frame {
- msec: 528
- hash: "23ce049cd7e715c28f5845fd1a1fc195"
- }
- Frame {
- msec: 544
- hash: "23ce049cd7e715c28f5845fd1a1fc195"
- }
- Frame {
- msec: 560
- hash: "23ce049cd7e715c28f5845fd1a1fc195"
- }
- Frame {
- msec: 576
- hash: "23ce049cd7e715c28f5845fd1a1fc195"
- }
- Mouse {
- type: 2
- button: 1
- buttons: 1
- x: 150; y: 274
- modifiers: 0
- sendToViewport: true
- }
- Frame {
- msec: 592
- hash: "23ce049cd7e715c28f5845fd1a1fc195"
- }
- Frame {
- msec: 608
- hash: "a7bb3d44c8bcf403906afa86f5bc3062"
- }
- Frame {
- msec: 624
- hash: "2b366e6009e70fa0227a1fee662fe1bf"
- }
- Frame {
- msec: 640
- hash: "c12869fb8002aa36c3bfad7fd0979240"
- }
- Frame {
- msec: 656
- hash: "56c583e77b5e0a8707e977dc937c2acf"
- }
- Frame {
- msec: 672
- hash: "6b191d57a45a3f2d010a7f44064e409a"
- }
- Frame {
- msec: 688
- hash: "9457ee33c999a63fa4bd4db5c3ceac8b"
- }
- Frame {
- msec: 704
- hash: "446b23b662640ad6ad8c456f956fe73a"
- }
- Frame {
- msec: 720
- hash: "23c59708069406486e4979c7d59f3f4a"
- }
- Frame {
- msec: 736
- hash: "c9ce43ddca79b5b6f26af2c2259dc071"
- }
- Frame {
- msec: 752
- hash: "e838229ba70c30112918f19bb471fa34"
- }
- Frame {
- msec: 768
- hash: "0cbaeddb2ff6408a37a68fc685e2bca0"
- }
- Frame {
- msec: 784
- hash: "616b4ec719586b151ba3d709e51038bf"
- }
- Frame {
- msec: 800
- hash: "89b2c709f5c3083c204a9450e605c1d4"
- }
- Frame {
- msec: 816
- hash: "427a5c2d13631d899ff2d673e762f114"
- }
- Frame {
- msec: 832
- hash: "958aa9ca5a6b91aa6dfbc2a1ae3e2deb"
- }
- Frame {
- msec: 848
- hash: "09a3ac0010ed8f3df2cfa7ed9d0a92e4"
- }
- Frame {
- msec: 864
- hash: "5607ea54f9990f3232d6f56080e1ef15"
- }
- Frame {
- msec: 880
- hash: "600682467c55288b9d5e65299637dd72"
- }
- Frame {
- msec: 896
- hash: "bc7a238611574a13650f854ceac35032"
- }
- Frame {
- msec: 912
- hash: "e5f6b19b3685a96d4d0c3b8384513643"
- }
- Frame {
- msec: 928
- hash: "d5d23b0fc09136fd1ae121e311866cc3"
- }
- Frame {
- msec: 944
- hash: "5099e5edd1a6bd37f5f6c836a6ca7644"
- }
- Frame {
- msec: 960
- image: "parentAction.0.png"
- }
- Frame {
- msec: 976
- hash: "97dd20f7774cfd8379e1d1b44f8ddc7b"
- }
- Frame {
- msec: 992
- hash: "ab2deea9e4f8c43ed58b5a355800ecda"
- }
- Frame {
- msec: 1008
- hash: "88ec383ce368259d3cc18612b6f5b941"
- }
- Frame {
- msec: 1024
- hash: "f84b20b849a77e50717f99b9d844240e"
- }
- Frame {
- msec: 1040
- hash: "6c042360c2d24ad56cec32d01ce82d6b"
- }
- Frame {
- msec: 1056
- hash: "c86b464720192f3e039fa5d8ab5f09bb"
- }
- Frame {
- msec: 1072
- hash: "35ec432fdf91fcd1dfcd945cfe785b09"
- }
- Frame {
- msec: 1088
- hash: "27a2ec28e4fef006622e8211fd709853"
- }
- Frame {
- msec: 1104
- hash: "8454d1f5ed89551e2a403c869885116a"
- }
- Frame {
- msec: 1120
- hash: "7e33aed53dc4338c168274d972c8e711"
- }
- Frame {
- msec: 1136
- hash: "e0192ea2049d6bae6012f00406630a92"
- }
- Frame {
- msec: 1152
- hash: "a2ea5489a373084169024035a0f69e71"
- }
- Frame {
- msec: 1168
- hash: "6947a72c4d959b90dafdaddcac815b3e"
- }
- Frame {
- msec: 1184
- hash: "0e22cc3c96d0934095b7254f0f28b18b"
- }
- Frame {
- msec: 1200
- hash: "72529ddc6f2678a783aedf445d7038a4"
- }
- Frame {
- msec: 1216
- hash: "38f03c0ee50488ffd23a2fb3d3445461"
- }
- Frame {
- msec: 1232
- hash: "b441721ed30c787874a2a71a94e1ba44"
- }
- Frame {
- msec: 1248
- hash: "1e37f26d78590414b2ef01c72ad136a9"
- }
- Frame {
- msec: 1264
- hash: "88e4af80d068485ebd8c3d51f9bbfe8d"
- }
- Frame {
- msec: 1280
- hash: "107707216c16c629d8409cf006f9f2dc"
- }
- Frame {
- msec: 1296
- hash: "f56f3f4f140ac072f7df47eddfc76844"
- }
- Frame {
- msec: 1312
- hash: "41239a9d8ed793c24967875aabeae8a5"
- }
- Frame {
- msec: 1328
- hash: "30035e37320dae4f9ead01a30895eb38"
- }
- Frame {
- msec: 1344
- hash: "fb2f535b42b862b65f8adb3ad1a46779"
- }
- Frame {
- msec: 1360
- hash: "e10ba7f74d52fc963e20a4647ff0d620"
- }
- Frame {
- msec: 1376
- hash: "5abf5388566bed2fdb71afc8cd7cfe9b"
- }
- Frame {
- msec: 1392
- hash: "91990471563e3c8292e8e8325a1d17a2"
- }
- Frame {
- msec: 1408
- hash: "59a6293a48f83a9197adcffed3f32f15"
- }
- Frame {
- msec: 1424
- hash: "db3e75df318e9f0d239ce9b76e92eff3"
- }
- Frame {
- msec: 1440
- hash: "3b5c64bc64a701edb5c2e40b23443bc3"
- }
- Frame {
- msec: 1456
- hash: "9db08c0375148b2317427591b5f43608"
- }
- Frame {
- msec: 1472
- hash: "2d761f1530846eff87a7625a120e0afd"
- }
- Frame {
- msec: 1488
- hash: "c5460f8c58b83c2ac15842ddb023ad4f"
- }
- Frame {
- msec: 1504
- hash: "0efb51810a2dc359c7964268c98ea8eb"
- }
- Frame {
- msec: 1520
- hash: "b92a42012df57eb261badf1f518b8e67"
- }
- Frame {
- msec: 1536
- hash: "8d348bae62af2d35bdfee806a1c39910"
- }
- Frame {
- msec: 1552
- hash: "762d9bb4ed11d249bfd902a541129d60"
- }
- Frame {
- msec: 1568
- hash: "bddbd9f64a9f7156984feccd5fa94093"
- }
- Frame {
- msec: 1584
- hash: "353a98e1573b0518941ff22bf2776244"
- }
- Frame {
- msec: 1600
- hash: "1765aed97e29f25dee93a77a06557b82"
- }
- Frame {
- msec: 1616
- hash: "73b5c2bdb7f268f7a33e129c8ba44013"
- }
- Frame {
- msec: 1632
- hash: "46ac1976fb9932d0ef6e0b5927386ad9"
- }
- Frame {
- msec: 1648
- hash: "90b5b5b46c9c352e8be41cc74f96133a"
- }
- Frame {
- msec: 1664
- hash: "0efe0036577c890fd45cd7dd53014616"
- }
- Frame {
- msec: 1680
- hash: "7f32df17481abf40ccb33afe6d17085d"
- }
- Frame {
- msec: 1696
- hash: "1fa8544c48a476764f4f8278c14b651d"
- }
- Frame {
- msec: 1712
- hash: "f8f06ece30f690deeba5999ce63bf40b"
- }
- Frame {
- msec: 1728
- hash: "885b230f4b2fe380c7cf68955940d206"
- }
- Frame {
- msec: 1744
- hash: "d0fc5aa4df46099bb46a1d7db30baa09"
- }
- Frame {
- msec: 1760
- hash: "8fa7fe5197cbe1ff67f8a2c47f1f0740"
- }
- Frame {
- msec: 1776
- hash: "aa3b3b03460daf54f085551e1a46c08b"
- }
- Frame {
- msec: 1792
- hash: "35a1728a2430027a9474fb7d61090643"
- }
- Frame {
- msec: 1808
- hash: "2b1cff3986b8b03f1061176a4722b0f9"
- }
- Frame {
- msec: 1824
- hash: "8047be1b35ee3d5078a68c6cdc35eeb7"
- }
- Frame {
- msec: 1840
- hash: "7f7afa48bb7d612b354c8488e72c8339"
- }
- Frame {
- msec: 1856
- hash: "691a876caefce9aa0f5140c17059b8f4"
- }
- Frame {
- msec: 1872
- hash: "903bec66e47db766dc431f060726988c"
- }
- Frame {
- msec: 1888
- hash: "f13593fc891f0b050c01b61963019da1"
- }
- Frame {
- msec: 1904
- hash: "aa00de965bdb370a5974b195c3fb38af"
- }
- Frame {
- msec: 1920
- image: "parentAction.1.png"
- }
- Frame {
- msec: 1936
- hash: "168d3e27261c0943e6262b6be27adfb0"
- }
- Frame {
- msec: 1952
- hash: "6fafebd0b396e7c0a78c767c6af936ba"
- }
- Frame {
- msec: 1968
- hash: "827e3a3fcd6fd8588e9fcc043769b3a8"
- }
- Frame {
- msec: 1984
- hash: "155329bf1c1a6f6c37bf7e6e8a92c59b"
- }
- Frame {
- msec: 2000
- hash: "d3008d1e7cee5170171699ef6fb9aa81"
- }
- Frame {
- msec: 2016
- hash: "5c1244e7806e131a6063f22a66e4eb12"
- }
- Frame {
- msec: 2032
- hash: "fcd6b372229a6cf14face81e9d614456"
- }
- Frame {
- msec: 2048
- hash: "bf1a375a81bf43c5671cccc62e9a0462"
- }
- Frame {
- msec: 2064
- hash: "0e22404508470baaa6621f37361951fa"
- }
- Frame {
- msec: 2080
- hash: "45046f28c103caa161e41861f71731c4"
- }
- Frame {
- msec: 2096
- hash: "7a92731c713470a2b2c91fd6b83447de"
- }
- Frame {
- msec: 2112
- hash: "7a92731c713470a2b2c91fd6b83447de"
- }
- Frame {
- msec: 2128
- hash: "7a92731c713470a2b2c91fd6b83447de"
- }
- Frame {
- msec: 2144
- hash: "7a92731c713470a2b2c91fd6b83447de"
- }
- Frame {
- msec: 2160
- hash: "7a92731c713470a2b2c91fd6b83447de"
- }
- Frame {
- msec: 2176
- hash: "7a92731c713470a2b2c91fd6b83447de"
- }
- Frame {
- msec: 2192
- hash: "7a92731c713470a2b2c91fd6b83447de"
- }
- Frame {
- msec: 2208
- hash: "7a92731c713470a2b2c91fd6b83447de"
- }
- Frame {
- msec: 2224
- hash: "7a92731c713470a2b2c91fd6b83447de"
- }
- Frame {
- msec: 2240
- hash: "7a92731c713470a2b2c91fd6b83447de"
- }
- Frame {
- msec: 2256
- hash: "7a92731c713470a2b2c91fd6b83447de"
- }
- Frame {
- msec: 2272
- hash: "7a92731c713470a2b2c91fd6b83447de"
- }
- Frame {
- msec: 2288
- hash: "7a92731c713470a2b2c91fd6b83447de"
- }
- Frame {
- msec: 2304
- hash: "7a92731c713470a2b2c91fd6b83447de"
- }
- Frame {
- msec: 2320
- hash: "7a92731c713470a2b2c91fd6b83447de"
- }
- Frame {
- msec: 2336
- hash: "7a92731c713470a2b2c91fd6b83447de"
- }
- Frame {
- msec: 2352
- hash: "7a92731c713470a2b2c91fd6b83447de"
- }
- Frame {
- msec: 2368
- hash: "7a92731c713470a2b2c91fd6b83447de"
- }
- Frame {
- msec: 2384
- hash: "7a92731c713470a2b2c91fd6b83447de"
- }
- Frame {
- msec: 2400
- hash: "7a92731c713470a2b2c91fd6b83447de"
- }
- Frame {
- msec: 2416
- hash: "7a92731c713470a2b2c91fd6b83447de"
- }
- Frame {
- msec: 2432
- hash: "7a92731c713470a2b2c91fd6b83447de"
- }
- Frame {
- msec: 2448
- hash: "7a92731c713470a2b2c91fd6b83447de"
- }
- Frame {
- msec: 2464
- hash: "7a92731c713470a2b2c91fd6b83447de"
- }
- Frame {
- msec: 2480
- hash: "7a92731c713470a2b2c91fd6b83447de"
- }
- Frame {
- msec: 2496
- hash: "7a92731c713470a2b2c91fd6b83447de"
- }
- Frame {
- msec: 2512
- hash: "7a92731c713470a2b2c91fd6b83447de"
- }
- Frame {
- msec: 2528
- hash: "7a92731c713470a2b2c91fd6b83447de"
- }
- Frame {
- msec: 2544
- hash: "7a92731c713470a2b2c91fd6b83447de"
- }
- Frame {
- msec: 2560
- hash: "7a92731c713470a2b2c91fd6b83447de"
- }
- Frame {
- msec: 2576
- hash: "7a92731c713470a2b2c91fd6b83447de"
- }
- Frame {
- msec: 2592
- hash: "7a92731c713470a2b2c91fd6b83447de"
- }
- Frame {
- msec: 2608
- hash: "7a92731c713470a2b2c91fd6b83447de"
- }
- Frame {
- msec: 2624
- hash: "7a92731c713470a2b2c91fd6b83447de"
- }
- Frame {
- msec: 2640
- hash: "7a92731c713470a2b2c91fd6b83447de"
- }
- Frame {
- msec: 2656
- hash: "7a92731c713470a2b2c91fd6b83447de"
- }
- Frame {
- msec: 2672
- hash: "7a92731c713470a2b2c91fd6b83447de"
- }
- Frame {
- msec: 2688
- hash: "7a92731c713470a2b2c91fd6b83447de"
- }
- Frame {
- msec: 2704
- hash: "7a92731c713470a2b2c91fd6b83447de"
- }
- Frame {
- msec: 2720
- hash: "7a92731c713470a2b2c91fd6b83447de"
- }
- Frame {
- msec: 2736
- hash: "7a92731c713470a2b2c91fd6b83447de"
- }
- Frame {
- msec: 2752
- hash: "7a92731c713470a2b2c91fd6b83447de"
- }
- Mouse {
- type: 3
- button: 1
- buttons: 0
- x: 150; y: 274
- modifiers: 0
- sendToViewport: true
- }
- Frame {
- msec: 2768
- hash: "7a92731c713470a2b2c91fd6b83447de"
- }
- Frame {
- msec: 2784
- hash: "44a0b46c21bd4c76d44883ba146e3614"
- }
- Frame {
- msec: 2800
- hash: "2224abc3333a2bc5fa1cf3c4e8d6a6f9"
- }
- Frame {
- msec: 2816
- hash: "ea9c05c0295a300e21aacbdfd5b4968e"
- }
- Frame {
- msec: 2832
- hash: "e630e2893f89a6ae536bcbd1a084af07"
- }
- Frame {
- msec: 2848
- hash: "af56f1e79eb3746efb9e4bcbc3fbced8"
- }
- Frame {
- msec: 2864
- hash: "96be8c3ba0d7a85c6f6df877b869b563"
- }
- Frame {
- msec: 2880
- image: "parentAction.2.png"
- }
- Frame {
- msec: 2896
- hash: "603d8684cb6f097e3ab2a2e5ef053112"
- }
- Frame {
- msec: 2912
- hash: "0433d242d1dd40a3792f55f807ebbff4"
- }
- Frame {
- msec: 2928
- hash: "1190067cacc7361f6cfe09f153c7a07e"
- }
- Frame {
- msec: 2944
- hash: "98e917880471511122847ad8a406e3a3"
- }
- Frame {
- msec: 2960
- hash: "fff06869074a3a6c5823ed3fb6fa7a43"
- }
- Frame {
- msec: 2976
- hash: "602d95daee8f160a0fd784931d0a06bd"
- }
- Frame {
- msec: 2992
- hash: "f7e466bbd52f40e88ff567758f4db835"
- }
- Frame {
- msec: 3008
- hash: "54417a4c4fb71d458439ad2e2126f8e1"
- }
- Frame {
- msec: 3024
- hash: "fe150dd5056b9dbf1cd0b196e9a7a47b"
- }
- Frame {
- msec: 3040
- hash: "1384c871bead85916f7bfcdebc370697"
- }
- Frame {
- msec: 3056
- hash: "5f13339cc0e604b75a9d1d85342fa717"
- }
- Frame {
- msec: 3072
- hash: "655069d61b7a44e729a2cbb33d683c3e"
- }
- Frame {
- msec: 3088
- hash: "2324e9e4a02e41855b066983dbf0e61d"
- }
- Frame {
- msec: 3104
- hash: "0217baf091325b95c033ba073bd68ce5"
- }
- Frame {
- msec: 3120
- hash: "c27854c3af5b58db85846a1762ab18ba"
- }
- Frame {
- msec: 3136
- hash: "45246ee6383ceb6260f84571a885ba90"
- }
- Frame {
- msec: 3152
- hash: "d82ded86f093d1a376994cacf43d0343"
- }
- Frame {
- msec: 3168
- hash: "c9179d30f80c6101bca2bed40d6a859f"
- }
- Frame {
- msec: 3184
- hash: "a63e032d20a9d985c6c345434d98a364"
- }
- Frame {
- msec: 3200
- hash: "fc7d6797ce15edf7fadb9dae691ecd5c"
- }
- Frame {
- msec: 3216
- hash: "76cf37ad8c50fed8b1900784b647819c"
- }
- Frame {
- msec: 3232
- hash: "256aab3690c9ba928bb4d4dd3bbfc756"
- }
- Frame {
- msec: 3248
- hash: "90cab52fdefbae4e7d0f0f93b46ebeb0"
- }
- Frame {
- msec: 3264
- hash: "badb5103bf826dc467f6e620cc2b47be"
- }
- Frame {
- msec: 3280
- hash: "e7d0e437de5ebc0fa07b2a4ef11159cb"
- }
- Frame {
- msec: 3296
- hash: "5931b1c3932ab91446324165d7e2603a"
- }
- Frame {
- msec: 3312
- hash: "ce1808db90ba955ab3cb845500f4c013"
- }
- Frame {
- msec: 3328
- hash: "142f8a440d1fe2d868f47ba3006de9d7"
- }
- Frame {
- msec: 3344
- hash: "10d32a6cc90319ea66d7f2c1241590ce"
- }
- Frame {
- msec: 3360
- hash: "7f633559d715396e6de451b3dd2fadbd"
- }
- Frame {
- msec: 3376
- hash: "d44590ae51ceef5e082747c44bc41be9"
- }
- Frame {
- msec: 3392
- hash: "2b498181668fb1fbf65294d575654929"
- }
- Frame {
- msec: 3408
- hash: "7efeeffd08e4de440da83511313de729"
- }
- Frame {
- msec: 3424
- hash: "8de2331393d1e712192d11ed096836d3"
- }
- Frame {
- msec: 3440
- hash: "fa9381ef2e295865a9b8cb9b36a0eacf"
- }
- Frame {
- msec: 3456
- hash: "97debc4432c5ecb7f606a81e5411b02c"
- }
- Frame {
- msec: 3472
- hash: "eb4c1bb1f4398e3c18182c28a015be76"
- }
- Frame {
- msec: 3488
- hash: "a976aa509f4c6f309d9a6011eeae02aa"
- }
- Frame {
- msec: 3504
- hash: "457de7ee05e0ef0ef120a3d4e371c02e"
- }
- Frame {
- msec: 3520
- hash: "0c01f9f150fe33155fa20703735a6d27"
- }
- Frame {
- msec: 3536
- hash: "5af4f80624082a264010247ea8630a1a"
- }
- Frame {
- msec: 3552
- hash: "b23a1191d149549fa29a61b6dc70f037"
- }
- Frame {
- msec: 3568
- hash: "e00fb32cb13b1347e4b7b9fdbcca68e5"
- }
- Frame {
- msec: 3584
- hash: "fef0503c82f253f8bc3fb3e705a98aa7"
- }
- Frame {
- msec: 3600
- hash: "7a9beca28340d2aa89da5e05f5ac2a55"
- }
- Frame {
- msec: 3616
- hash: "f3c57ea07ab486ffa1f46da60de0b8f1"
- }
- Frame {
- msec: 3632
- hash: "ef0a4ad9ac339fd6ea50dbe6baa9387f"
- }
- Frame {
- msec: 3648
- hash: "1b317a9eb4ce022f005d551546c688a4"
- }
- Frame {
- msec: 3664
- hash: "628e912a4a26800b9b7b5e60e60e3a7d"
- }
- Frame {
- msec: 3680
- hash: "3587b75e4d834a88729754d2c2a4b193"
- }
- Frame {
- msec: 3696
- hash: "084bc1360a38123589baec5aae15b4ff"
- }
- Frame {
- msec: 3712
- hash: "47f0f6c3cdf456826a6fd6846e58dcc8"
- }
- Frame {
- msec: 3728
- hash: "ed982c4c3ebd132baaaf43efad40a3f7"
- }
- Frame {
- msec: 3744
- hash: "d7ddce47c23fada4c69d53d934582d71"
- }
- Frame {
- msec: 3760
- hash: "74f2f911bee26c4c551f4c70596753ae"
- }
- Frame {
- msec: 3776
- hash: "3ed7cbf10dfce3a485d7878766cf9da6"
- }
- Frame {
- msec: 3792
- hash: "87a74257551ab6c7fcfe05e815482ae9"
- }
- Frame {
- msec: 3808
- hash: "4f63e4904e97d4ce832b20b7317a9958"
- }
- Frame {
- msec: 3824
- hash: "f912da8781e547c6e28890655c1b8884"
- }
- Frame {
- msec: 3840
- image: "parentAction.3.png"
- }
- Frame {
- msec: 3856
- hash: "faa640ccf993324400254ffb862ac279"
- }
- Frame {
- msec: 3872
- hash: "b67f342424d1b9a364b09da8994fcd6b"
- }
- Frame {
- msec: 3888
- hash: "b2407732194c1e0c2a9bfb379b94b562"
- }
- Frame {
- msec: 3904
- hash: "55733608d0302ef90c124322ac6d8dc6"
- }
- Frame {
- msec: 3920
- hash: "734f5b628a26d3d7c91ee84fb26d5b5f"
- }
- Frame {
- msec: 3936
- hash: "27839fefa4a218cd77843358392bb874"
- }
- Frame {
- msec: 3952
- hash: "8cac19559d37bd2b581cef0a4c707753"
- }
- Frame {
- msec: 3968
- hash: "91422870aa1471571e7dd8ff5103f76c"
- }
- Frame {
- msec: 3984
- hash: "7156166d5f8d13483467ef515627c95d"
- }
- Frame {
- msec: 4000
- hash: "6028e8374c2ce42a9a9e85b4a8b53027"
- }
- Frame {
- msec: 4016
- hash: "17c99592be58d2e03f9f173c47c0649b"
- }
- Frame {
- msec: 4032
- hash: "6084b53186c6a7eda38ac7fa34bf45ce"
- }
- Frame {
- msec: 4048
- hash: "e82131a8a5a06519f49308bbc25738cf"
- }
- Frame {
- msec: 4064
- hash: "77bdb69cbe55d9c503c6aa1c0f974d87"
- }
- Frame {
- msec: 4080
- hash: "b2346ec5d376651347281d5fb00fc4d7"
- }
- Frame {
- msec: 4096
- hash: "36a3b72c9d7f09795c546855a269801d"
- }
- Frame {
- msec: 4112
- hash: "4e5478b33baca797f3f8f72c2c6c51ad"
- }
- Frame {
- msec: 4128
- hash: "e59d12be3ed1f58de010d385ddfe78e5"
- }
- Frame {
- msec: 4144
- hash: "9674106a146effd47c2724a2dd82ae84"
- }
- Frame {
- msec: 4160
- hash: "862cec781f169f713032e6d52d3616ce"
- }
- Frame {
- msec: 4176
- hash: "c8d47bdfb6518ef4827677023313d559"
- }
- Frame {
- msec: 4192
- hash: "19413931b3e788067dfaef39b47d30ff"
- }
- Frame {
- msec: 4208
- hash: "600e426532c0348cd622257b0773efd5"
- }
- Frame {
- msec: 4224
- hash: "6d975e259d4efa108375d271451531c1"
- }
- Frame {
- msec: 4240
- hash: "50b0da4848564c063694202ce16ea808"
- }
- Frame {
- msec: 4256
- hash: "0a9450739031f680735b5210e6a30c3f"
- }
- Frame {
- msec: 4272
- hash: "23ce049cd7e715c28f5845fd1a1fc195"
- }
- Frame {
- msec: 4288
- hash: "23ce049cd7e715c28f5845fd1a1fc195"
- }
- Frame {
- msec: 4304
- hash: "23ce049cd7e715c28f5845fd1a1fc195"
- }
- Frame {
- msec: 4320
- hash: "23ce049cd7e715c28f5845fd1a1fc195"
- }
- Frame {
- msec: 4336
- hash: "23ce049cd7e715c28f5845fd1a1fc195"
- }
- Frame {
- msec: 4352
- hash: "23ce049cd7e715c28f5845fd1a1fc195"
- }
- Frame {
- msec: 4368
- hash: "23ce049cd7e715c28f5845fd1a1fc195"
- }
- Frame {
- msec: 4384
- hash: "23ce049cd7e715c28f5845fd1a1fc195"
- }
- Frame {
- msec: 4400
- hash: "23ce049cd7e715c28f5845fd1a1fc195"
- }
- Frame {
- msec: 4416
- hash: "23ce049cd7e715c28f5845fd1a1fc195"
- }
- Frame {
- msec: 4432
- hash: "23ce049cd7e715c28f5845fd1a1fc195"
- }
- Frame {
- msec: 4448
- hash: "23ce049cd7e715c28f5845fd1a1fc195"
- }
- Frame {
- msec: 4464
- hash: "23ce049cd7e715c28f5845fd1a1fc195"
- }
- Frame {
- msec: 4480
- hash: "23ce049cd7e715c28f5845fd1a1fc195"
- }
- Frame {
- msec: 4496
- hash: "23ce049cd7e715c28f5845fd1a1fc195"
- }
- Frame {
- msec: 4512
- hash: "23ce049cd7e715c28f5845fd1a1fc195"
- }
- Frame {
- msec: 4528
- hash: "23ce049cd7e715c28f5845fd1a1fc195"
- }
- Frame {
- msec: 4544
- hash: "23ce049cd7e715c28f5845fd1a1fc195"
- }
- Key {
- type: 6
- key: 16777249
- modifiers: 67108864
- text: ""
- autorep: false
- count: 1
- }
- Frame {
- msec: 4560
- hash: "23ce049cd7e715c28f5845fd1a1fc195"
- }
- Frame {
- msec: 4576
- hash: "23ce049cd7e715c28f5845fd1a1fc195"
- }
- Frame {
- msec: 4592
- hash: "23ce049cd7e715c28f5845fd1a1fc195"
- }
- Frame {
- msec: 4608
- hash: "23ce049cd7e715c28f5845fd1a1fc195"
- }
- Frame {
- msec: 4624
- hash: "23ce049cd7e715c28f5845fd1a1fc195"
- }
- Frame {
- msec: 4640
- hash: "23ce049cd7e715c28f5845fd1a1fc195"
- }
- Frame {
- msec: 4656
- hash: "23ce049cd7e715c28f5845fd1a1fc195"
- }
- Frame {
- msec: 4672
- hash: "23ce049cd7e715c28f5845fd1a1fc195"
- }
- Frame {
- msec: 4688
- hash: "23ce049cd7e715c28f5845fd1a1fc195"
- }
- Frame {
- msec: 4704
- hash: "23ce049cd7e715c28f5845fd1a1fc195"
- }
-}
diff --git a/tests/auto/declarative/visual/animation/parentAction/parentAction.qml b/tests/auto/declarative/visual/animation/parentAction/parentAction.qml
deleted file mode 100644
index eb3103e..0000000
--- a/tests/auto/declarative/visual/animation/parentAction/parentAction.qml
+++ /dev/null
@@ -1,55 +0,0 @@
-import Qt 4.6
-
-Rectangle {
- width: 400; height: 400
- Item {
- scale: .5
- rotation: 15
- transformOrigin: "Center"
- x: 10; y: 10
- Rectangle {
- id: myRect
- x: 5
- width: 100; height: 100
- transformOrigin: "BottomLeft"
- color: "red"
- }
- }
- MouseArea {
- id: clickable
- anchors.fill: parent
- }
-
- Item {
- x: 200; y: 200
- rotation: 52;
- scale: 2
- Item {
- id: newParent
- x: 100; y: 100
- }
- }
-
- states: State {
- name: "moved"
- when: clickable.pressed
- ParentChange {
- target: myRect
- parent: newParent
- }
- PropertyChanges {
- target: myRect
- rotation: -52
- scale: 1
- color: "blue"
- }
- }
-
- transitions: Transition {
- SequentialAnimation {
- ColorAnimation { duration: 500}
- ParentAction {}
- NumberAnimation { properties: "rotation, scale"; duration: 1000 }
- }
- }
-}
diff --git a/tests/auto/declarative/visual/animation/pauseAnimation/pauseAnimation.qml b/tests/auto/declarative/visual/animation/pauseAnimation/pauseAnimation.qml
index 24ca76b..4562aa7 100644
--- a/tests/auto/declarative/visual/animation/pauseAnimation/pauseAnimation.qml
+++ b/tests/auto/declarative/visual/animation/pauseAnimation/pauseAnimation.qml
@@ -11,7 +11,7 @@ Rectangle {
x: 60-width/2
y: 200-height
y: SequentialAnimation {
- repeat: true
+ loops: Animation.Infinite
NumberAnimation {
to: 0; duration: 500
easing.type: "InOutQuad"
diff --git a/tests/auto/declarative/visual/animation/scriptAction/scriptAction.qml b/tests/auto/declarative/visual/animation/scriptAction/scriptAction.qml
index ef4ed76..fc9ccc8 100644
--- a/tests/auto/declarative/visual/animation/scriptAction/scriptAction.qml
+++ b/tests/auto/declarative/visual/animation/scriptAction/scriptAction.qml
@@ -28,7 +28,7 @@ Rectangle {
transitions: Transition {
SequentialAnimation {
NumberAnimation { properties: "x"; easing.type: "InOutQuad" }
- ScriptAction { stateChangeScriptName: "setColor" }
+ ScriptAction { scriptName: "setColor" }
NumberAnimation { properties: "y"; easing.type: "InOutQuad" }
}
}
diff --git a/tests/auto/declarative/visual/qdeclarativeborderimage/content/MyBorderImage.qml b/tests/auto/declarative/visual/qdeclarativeborderimage/content/MyBorderImage.qml
index e268ce7..c3006d5 100644
--- a/tests/auto/declarative/visual/qdeclarativeborderimage/content/MyBorderImage.qml
+++ b/tests/auto/declarative/visual/qdeclarativeborderimage/content/MyBorderImage.qml
@@ -19,13 +19,13 @@ Item {
id: image; x: container.width / 2 - width / 2; y: container.height / 2 - height / 2
width: SequentialAnimation {
- repeat: true
+ loops: Animation.Infinite
NumberAnimation { from: container.minWidth; to: container.maxWidth; duration: 2000; easing.type: "InOutQuad"}
NumberAnimation { from: container.maxWidth; to: container.minWidth; duration: 2000; easing.type: "InOutQuad" }
}
height: SequentialAnimation {
- repeat: true
+ loops: Animation.Infinite
NumberAnimation { from: container.minHeight; to: container.maxHeight; duration: 2000; easing.type: "InOutQuad"}
NumberAnimation { from: container.maxHeight; to: container.minHeight; duration: 2000; easing.type: "InOutQuad" }
}
diff --git a/tests/auto/declarative/visual/qdeclarativeeasefollow/easefollow.qml b/tests/auto/declarative/visual/qdeclarativeeasefollow/easefollow.qml
index bd3270f..99a9973 100644
--- a/tests/auto/declarative/visual/qdeclarativeeasefollow/easefollow.qml
+++ b/tests/auto/declarative/visual/qdeclarativeeasefollow/easefollow.qml
@@ -7,7 +7,7 @@ Rectangle {
id: rect
width: 50; height: 20; y: 30; color: "black"
x: SequentialAnimation {
- repeat: true
+ loops: Animation.Infinite
NumberAnimation { from: 50; to: 700; duration: 2000 }
NumberAnimation { from: 700; to: 50; duration: 2000 }
}
diff --git a/tests/auto/declarative/visual/qdeclarativespringfollow/follow.qml b/tests/auto/declarative/visual/qdeclarativespringfollow/follow.qml
index 62503e4..e9c94c7 100644
--- a/tests/auto/declarative/visual/qdeclarativespringfollow/follow.qml
+++ b/tests/auto/declarative/visual/qdeclarativespringfollow/follow.qml
@@ -8,7 +8,7 @@ Rectangle {
color: "#00ff00"
y: 200; width: 60; height: 20
y: SequentialAnimation {
- repeat: true
+ loops: Animation.Infinite
NumberAnimation {
to: 20; duration: 500
easing.type: "InOutQuad"
diff --git a/tests/auto/declarative/visual/qdeclarativetext/elide/elide2.qml b/tests/auto/declarative/visual/qdeclarativetext/elide/elide2.qml
index c163e05..ecd9470 100644
--- a/tests/auto/declarative/visual/qdeclarativetext/elide/elide2.qml
+++ b/tests/auto/declarative/visual/qdeclarativetext/elide/elide2.qml
@@ -5,7 +5,7 @@ Rectangle {
height: 100
Text {
- width: NumberAnimation { from: 500; to: 0; repeat: true; duration: 5000 }
+ width: NumberAnimation { from: 500; to: 0; loops: Animation.Infinite; duration: 5000 }
elide: Text.ElideRight
text: 'Here is some very long text that we should truncate when sizing window'
}
diff --git a/tests/auto/declarative/visual/qdeclarativetext/elide/multilength.qml b/tests/auto/declarative/visual/qdeclarativetext/elide/multilength.qml
index ca41eab..ab6e1533 100644
--- a/tests/auto/declarative/visual/qdeclarativetext/elide/multilength.qml
+++ b/tests/auto/declarative/visual/qdeclarativetext/elide/multilength.qml
@@ -11,7 +11,7 @@ Rectangle {
anchors.centerIn: parent
Text {
id: myText
- width: NumberAnimation { from: 500; to: 0; repeat: true; duration: 1000 }
+ width: NumberAnimation { from: 500; to: 0; loops: Animation.Infinite; duration: 1000 }
elide: "ElideRight"
text: "Brevity is the soul of wit, and tediousness the limbs and outward flourishes.\x9CBrevity is a great charm of eloquence.\x9CBe concise!\x9CSHHHHHHHHHHHHHHHHHHHHHHHHHHHH"
}
diff --git a/tests/auto/declarative/visual/qdeclarativetextedit/cursorDelegate.qml b/tests/auto/declarative/visual/qdeclarativetextedit/cursorDelegate.qml
index 176a5b8..5516fc9 100644
--- a/tests/auto/declarative/visual/qdeclarativetextedit/cursorDelegate.qml
+++ b/tests/auto/declarative/visual/qdeclarativetextedit/cursorDelegate.qml
@@ -10,7 +10,7 @@ import Qt 4.6
Rectangle { id:top; color: "black"; width: 3; height: 1; x: -1; y:0}
Rectangle { id:bottom; color: "black"; width: 3; height: 1; x: -1; anchors.bottom: parent.bottom;}
opacity: 1
- opacity: SequentialAnimation { running: cPage.parent.focus == true; repeat: true;
+ opacity: SequentialAnimation { running: cPage.parent.focus == true; loops: Animation.Infinite;
NumberAnimation { properties: "opacity"; to: 1; duration: 500; easing.type: "InQuad"}
NumberAnimation { properties: "opacity"; to: 0; duration: 500; easing.type: "OutQuad"}
}
diff --git a/tests/auto/declarative/visual/qdeclarativetextinput/cursorDelegate.qml b/tests/auto/declarative/visual/qdeclarativetextinput/cursorDelegate.qml
index 6a4e7fa..199f71f 100644
--- a/tests/auto/declarative/visual/qdeclarativetextinput/cursorDelegate.qml
+++ b/tests/auto/declarative/visual/qdeclarativetextinput/cursorDelegate.qml
@@ -10,7 +10,7 @@ import Qt 4.6
Rectangle { id:top; color: "black"; width: 3; height: 1; x: -1; y:0}
Rectangle { id:bottom; color: "black"; width: 3; height: 1; x: -1; anchors.bottom: parent.bottom;}
opacity: 1
- opacity: SequentialAnimation { running: cPage.parent.focus == true; repeat: true;
+ opacity: SequentialAnimation { running: cPage.parent.focus == true; loops: Animation.Infinite;
NumberAnimation { properties: "opacity"; to: 1; duration: 500; easing.type: "InQuad"}
NumberAnimation { properties: "opacity"; to: 0; duration: 500; easing.type: "OutQuad"}
}
diff --git a/tests/auto/declarative/visual/webview/zooming/renderControl.qml b/tests/auto/declarative/visual/webview/zooming/renderControl.qml
index 49eb91b..bcbcf5c 100644
--- a/tests/auto/declarative/visual/webview/zooming/renderControl.qml
+++ b/tests/auto/declarative/visual/webview/zooming/renderControl.qml
@@ -10,7 +10,7 @@ Rectangle {
width: 400
url: "renderControl.html"
x: SequentialAnimation {
- repeat: true
+ loops: Animation.Infinite
NumberAnimation { from: 100; to: 0; duration: 200 }
PropertyAction { target: webview; property: "renderingEnabled"; value: false }
NumberAnimation { from: 0; to: -100; duration: 200 }
diff --git a/tests/auto/declarative/visual/webview/zooming/resolution.qml b/tests/auto/declarative/visual/webview/zooming/resolution.qml
index 8542768..bce6744 100644
--- a/tests/auto/declarative/visual/webview/zooming/resolution.qml
+++ b/tests/auto/declarative/visual/webview/zooming/resolution.qml
@@ -8,7 +8,7 @@ WebView {
url: "resolution.html"
zoomFactor:
SequentialAnimation {
- repeat: true
+ loops: Animation.Infinite
NumberAnimation { from: 1; to: 0.25; duration: 2000 }
NumberAnimation { from: 0.25; to: 1; duration: 2000 }
NumberAnimation { from: 1; to: 5; duration: 2000 }
diff --git a/tests/auto/declarative/visual/webview/zooming/zoomTextOnly.qml b/tests/auto/declarative/visual/webview/zooming/zoomTextOnly.qml
index c2e9348..6d51c8a 100644
--- a/tests/auto/declarative/visual/webview/zooming/zoomTextOnly.qml
+++ b/tests/auto/declarative/visual/webview/zooming/zoomTextOnly.qml
@@ -8,7 +8,7 @@ WebView {
settings.zoomTextOnly: true
zoomFactor:
SequentialAnimation {
- repeat: true
+ loops: Animation.Infinite
NumberAnimation { from: 2; to: 0.25; duration: 1000 }
NumberAnimation { from: 0.25; to: 2; duration: 1000 }
}
diff --git a/tests/auto/qdirmodel/tst_qdirmodel.cpp b/tests/auto/qdirmodel/tst_qdirmodel.cpp
index d7f0112..1bc5b7f 100644
--- a/tests/auto/qdirmodel/tst_qdirmodel.cpp
+++ b/tests/auto/qdirmodel/tst_qdirmodel.cpp
@@ -106,6 +106,9 @@ private slots:
void filter();
void task244669_remove();
+
+ void roleNames_data();
+ void roleNames();
};
// Testing get/set functions
@@ -681,5 +684,30 @@ void tst_QDirModel::task244669_remove()
QCOMPARE(parent.data() , model.index(SRCDIR "dirtest").data());
}
+void tst_QDirModel::roleNames_data()
+{
+ QTest::addColumn<int>("role");
+ QTest::addColumn<QByteArray>("roleName");
+ QTest::newRow("decoration") << int(Qt::DecorationRole) << QByteArray("decoration");
+ QTest::newRow("display") << int(Qt::DisplayRole) << QByteArray("display");
+ QTest::newRow("fileIcon") << int(QDirModel::FileIconRole) << QByteArray("fileIcon");
+ QTest::newRow("filePath") << int(QDirModel::FilePathRole) << QByteArray("filePath");
+ QTest::newRow("fileName") << int(QDirModel::FileNameRole) << QByteArray("fileName");
+}
+
+void tst_QDirModel::roleNames()
+{
+ QDirModel model;
+ QHash<int, QByteArray> roles = model.roleNames();
+
+ QFETCH(int, role);
+ QVERIFY(roles.contains(role));
+
+ QFETCH(QByteArray, roleName);
+ QList<QByteArray> values = roles.values(role);
+ QVERIFY(values.contains(roleName));
+}
+
+
QTEST_MAIN(tst_QDirModel)
#include "tst_qdirmodel.moc"
diff --git a/tests/auto/qfilesystemmodel/tst_qfilesystemmodel.cpp b/tests/auto/qfilesystemmodel/tst_qfilesystemmodel.cpp
index 9f67a5e..c234c96 100644
--- a/tests/auto/qfilesystemmodel/tst_qfilesystemmodel.cpp
+++ b/tests/auto/qfilesystemmodel/tst_qfilesystemmodel.cpp
@@ -137,6 +137,10 @@ private slots:
void drives_data();
void drives();
void dirsBeforeFiles();
+
+ void roleNames_data();
+ void roleNames();
+
protected:
bool createFiles(const QString &test_path, const QStringList &initial_files, int existingFileCount = 0, const QStringList &intial_dirs = QStringList(), const QString &baseDir = QDir::temp().absolutePath());
@@ -1016,6 +1020,31 @@ void tst_QFileSystemModel::dirsBeforeFiles()
}
}
+void tst_QFileSystemModel::roleNames_data()
+{
+ QTest::addColumn<int>("role");
+ QTest::addColumn<QByteArray>("roleName");
+ QTest::newRow("decoration") << int(Qt::DecorationRole) << QByteArray("decoration");
+ QTest::newRow("display") << int(Qt::DisplayRole) << QByteArray("display");
+ QTest::newRow("fileIcon") << int(QFileSystemModel::FileIconRole) << QByteArray("fileIcon");
+ QTest::newRow("filePath") << int(QFileSystemModel::FilePathRole) << QByteArray("filePath");
+ QTest::newRow("fileName") << int(QFileSystemModel::FileNameRole) << QByteArray("fileName");
+ QTest::newRow("filePermissions") << int(QFileSystemModel::FilePermissions) << QByteArray("filePermissions");
+}
+
+void tst_QFileSystemModel::roleNames()
+{
+ QFileSystemModel model;
+ QHash<int, QByteArray> roles = model.roleNames();
+
+ QFETCH(int, role);
+ QVERIFY(roles.contains(role));
+
+ QFETCH(QByteArray, roleName);
+ QList<QByteArray> values = roles.values(role);
+ QVERIFY(values.contains(roleName));
+}
+
QTEST_MAIN(tst_QFileSystemModel)
#include "tst_qfilesystemmodel.moc"
diff --git a/tests/auto/qsoundeffect/tst_qsoundeffect.cpp b/tests/auto/qsoundeffect/tst_qsoundeffect.cpp
index b918816..e76a4c5 100644
--- a/tests/auto/qsoundeffect/tst_qsoundeffect.cpp
+++ b/tests/auto/qsoundeffect/tst_qsoundeffect.cpp
@@ -72,7 +72,7 @@ void tst_QSoundEffect::initTestCase()
sound = new QSoundEffect;
QVERIFY(sound->source().isEmpty());
- QVERIFY(sound->loopCount() == 1);
+ QVERIFY(sound->loops() == 1);
QVERIFY(sound->volume() == 100);
QVERIFY(sound->isMuted() == false);
#endif
@@ -99,10 +99,10 @@ void tst_QSoundEffect::testSource()
void tst_QSoundEffect::testLooping()
{
#ifndef QT_MULTIMEDIA_QMEDIAPLAYER
- QSignalSpy readSignal(sound, SIGNAL(loopCountChanged()));
+ QSignalSpy readSignal(sound, SIGNAL(loopsChanged()));
- sound->setLoopCount(5);
- QCOMPARE(sound->loopCount(),5);
+ sound->setLoops(5);
+ QCOMPARE(sound->loops(),5);
sound->play();
diff --git a/tests/benchmarks/declarative/qdeclarativetime/tests/animation/large.qml b/tests/benchmarks/declarative/qdeclarativetime/tests/animation/large.qml
new file mode 100644
index 0000000..978e3bf
--- /dev/null
+++ b/tests/benchmarks/declarative/qdeclarativetime/tests/animation/large.qml
@@ -0,0 +1,41 @@
+import Qt 4.6
+import QDeclarativeTime 1.0 as QDeclarativeTime
+
+Item {
+
+ QDeclarativeTime.Timer {
+ component: Component {
+ ParallelAnimation {
+ NumberAnimation { duration: 500 }
+ NumberAnimation { duration: 4000; }
+ NumberAnimation { duration: 2000; easing.type: "OutBack"}
+ ColorAnimation { duration: 3000}
+ SequentialAnimation {
+ PauseAnimation { duration: 1000 }
+ ScriptAction { script: doSomething(); }
+ PauseAnimation { duration: 800 }
+ ScriptAction { script: doSomethingElse(); }
+ PauseAnimation { duration: 800 }
+ ParallelAnimation {
+ NumberAnimation { duration: 200;}
+ SequentialAnimation {
+ PauseAnimation { duration: 200}
+ ParallelAnimation {
+ NumberAnimation { duration: 300;}
+ NumberAnimation { duration: 300;}
+ }
+ NumberAnimation { from: 0; to: 1; duration: 500 }
+ PauseAnimation { duration: 200 }
+ NumberAnimation { from: 1; to: 0; duration: 500 }
+ }
+ SequentialAnimation {
+ PauseAnimation { duration: 150}
+ NumberAnimation { duration: 300; easing.type: "OutBounce" }
+ }
+ }
+ }
+ }
+ }
+ }
+
+}
diff --git a/tests/benchmarks/declarative/qdeclarativetime/tests/animation/largeNoProps.qml b/tests/benchmarks/declarative/qdeclarativetime/tests/animation/largeNoProps.qml
new file mode 100644
index 0000000..cceb3f4
--- /dev/null
+++ b/tests/benchmarks/declarative/qdeclarativetime/tests/animation/largeNoProps.qml
@@ -0,0 +1,41 @@
+import Qt 4.6
+import QDeclarativeTime 1.0 as QDeclarativeTime
+
+Item {
+
+ QDeclarativeTime.Timer {
+ component: Component {
+ ParallelAnimation {
+ NumberAnimation { }
+ NumberAnimation { }
+ NumberAnimation { }
+ ColorAnimation { }
+ SequentialAnimation {
+ PauseAnimation { }
+ ScriptAction { }
+ PauseAnimation { }
+ ScriptAction { }
+ PauseAnimation { }
+ ParallelAnimation {
+ NumberAnimation { }
+ SequentialAnimation {
+ PauseAnimation { }
+ ParallelAnimation {
+ NumberAnimation { }
+ NumberAnimation { }
+ }
+ NumberAnimation { }
+ PauseAnimation { }
+ NumberAnimation { }
+ }
+ SequentialAnimation {
+ PauseAnimation { }
+ NumberAnimation { }
+ }
+ }
+ }
+ }
+ }
+ }
+
+}
diff --git a/tests/benchmarks/declarative/qdeclarativetime/tests/loader/Loaded.qml b/tests/benchmarks/declarative/qdeclarativetime/tests/loader/Loaded.qml
new file mode 100644
index 0000000..6f8d849
--- /dev/null
+++ b/tests/benchmarks/declarative/qdeclarativetime/tests/loader/Loaded.qml
@@ -0,0 +1,7 @@
+import Qt 4.6
+
+Item {
+ Rectangle {}
+ Text {}
+ Image {}
+}
diff --git a/tests/benchmarks/declarative/qdeclarativetime/tests/loader/component_loader.qml b/tests/benchmarks/declarative/qdeclarativetime/tests/loader/component_loader.qml
new file mode 100644
index 0000000..270add4
--- /dev/null
+++ b/tests/benchmarks/declarative/qdeclarativetime/tests/loader/component_loader.qml
@@ -0,0 +1,16 @@
+import Qt 4.6
+import QDeclarativeTime 1.0 as QDeclarativeTime
+
+Item {
+
+ QDeclarativeTime.Timer {
+ component: Component {
+ Item {
+ Loader {
+ sourceComponent: Loaded {}
+ }
+ }
+ }
+ }
+}
+
diff --git a/tests/benchmarks/declarative/qdeclarativetime/tests/loader/empty_loader.qml b/tests/benchmarks/declarative/qdeclarativetime/tests/loader/empty_loader.qml
new file mode 100644
index 0000000..d3b84cc
--- /dev/null
+++ b/tests/benchmarks/declarative/qdeclarativetime/tests/loader/empty_loader.qml
@@ -0,0 +1,15 @@
+import Qt 4.6
+import QDeclarativeTime 1.0 as QDeclarativeTime
+
+Item {
+
+ QDeclarativeTime.Timer {
+ component: Component {
+ Item {
+ Loader {}
+ Loaded {}
+ }
+ }
+ }
+}
+
diff --git a/tests/benchmarks/declarative/qdeclarativetime/tests/loader/no_loader.qml b/tests/benchmarks/declarative/qdeclarativetime/tests/loader/no_loader.qml
new file mode 100644
index 0000000..a94a12a
--- /dev/null
+++ b/tests/benchmarks/declarative/qdeclarativetime/tests/loader/no_loader.qml
@@ -0,0 +1,14 @@
+import Qt 4.6
+import QDeclarativeTime 1.0 as QDeclarativeTime
+
+Item {
+
+ QDeclarativeTime.Timer {
+ component: Component {
+ Item {
+ Loaded {}
+ }
+ }
+ }
+}
+
diff --git a/tests/benchmarks/declarative/qdeclarativetime/tests/loader/source_loader.qml b/tests/benchmarks/declarative/qdeclarativetime/tests/loader/source_loader.qml
new file mode 100644
index 0000000..39ed1a6
--- /dev/null
+++ b/tests/benchmarks/declarative/qdeclarativetime/tests/loader/source_loader.qml
@@ -0,0 +1,16 @@
+import Qt 4.6
+import QDeclarativeTime 1.0 as QDeclarativeTime
+
+Item {
+
+ QDeclarativeTime.Timer {
+ component: Component {
+ Item {
+ Loader {
+ source: "Loaded.qml"
+ }
+ }
+ }
+ }
+}
+