~loic.molinari/+junk/qtdeclarative-shadereffectsource-changes

« back to all changes in this revision

Viewing changes to tests/auto/qml/qqmlcomponent/data/incubateObject.qml

  • Committer: Loïc Molinari
  • Date: 2012-04-21 17:59:51 UTC
  • Revision ID: loic.molinari@canonical.com-20120421175951-bqx68caaf5zrp76l
Initial import

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
import QtQuick 2.0
 
2
 
 
3
Item{
 
4
    id: root
 
5
 
 
6
    property bool test1: false
 
7
    property bool test2: false
 
8
 
 
9
    property var i
 
10
 
 
11
    Component{ 
 
12
        id: component
 
13
        Item {
 
14
            property int dummy: 13
 
15
            property int dummy2: 26
 
16
        } 
 
17
    }
 
18
 
 
19
    Component.onCompleted: {
 
20
        i = component.incubateObject(null, { dummy2: 19 });
 
21
 
 
22
        if (i.status != Component.Loading) return;
 
23
        if (i.object != null) return;
 
24
 
 
25
        i.onStatusChanged = function(status) {
 
26
            if (status != Component.Ready) return;
 
27
            if (i.object == null) return;
 
28
            if (i.object.dummy != 13) return;
 
29
            if (i.object.dummy2 != 19) return;
 
30
            test2 = true;
 
31
        }
 
32
 
 
33
        test1 = true;
 
34
    }
 
35
}
 
36