diff options
author | Kent Hansen <kent.hansen@nokia.com> | 2012-03-19 12:29:32 +0100 |
---|---|---|
committer | Kent Hansen <kent.hansen@nokia.com> | 2012-03-19 12:37:03 +0100 |
commit | 4821058f10118be55a541ad39e25ec9165cca3b3 (patch) | |
tree | 167973e3c68fc442b0e37d6f628f3fdbe759f15a /tests/auto/qml/qqmlqt/data/createComponent.qml | |
parent | 83f11e33745180e9370d484cbcedd0bac020c9dd (diff) | |
parent | 26d5f2e833f0e3686aaa27e695bbfab5fbd808ad (diff) |
Merge master into api_changes
Conflicts:
src/qml/debugger/qqmlenginedebugservice.cpp
src/qml/qml/v8/qv8qobjectwrapper.cpp
src/quick/util/qquickimageprovider.cpp
tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp
Change-Id: Ie78ba2fabd32f4812bcae9dbdd66ed289dc11dcb
Diffstat (limited to 'tests/auto/qml/qqmlqt/data/createComponent.qml')
-rw-r--r-- | tests/auto/qml/qqmlqt/data/createComponent.qml | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/auto/qml/qqmlqt/data/createComponent.qml b/tests/auto/qml/qqmlqt/data/createComponent.qml index 3ebc9f14f8..01b6490419 100644 --- a/tests/auto/qml/qqmlqt/data/createComponent.qml +++ b/tests/auto/qml/qqmlqt/data/createComponent.qml @@ -9,6 +9,14 @@ QtObject { property QtObject incorectArgCount1: Qt.createComponent() property QtObject incorectArgCount2: Qt.createComponent("main.qml", 10) + property bool asyncResult: false + property var asyncComponent + + function asyncStatusChanged() { + if (asyncComponent.status == Component.Ready) + asyncResult = true; + } + Component.onCompleted: { emptyArg = (Qt.createComponent("") == null); var r = Qt.createComponent("createComponentData.qml"); @@ -16,5 +24,10 @@ QtObject { var a = Qt.createComponent("http://www.example.com/test.qml"); absoluteUrl = a.url; + + asyncComponent = Qt.createComponent("TestComponent.qml", Component.Asynchronous); + if (asyncComponent.status != Component.Loading) + return; + asyncComponent.statusChanged.connect(asyncStatusChanged); } } |