~ubuntu-branches/ubuntu/saucy/qtdeclarative-opensource-src/saucy

« back to all changes in this revision

Viewing changes to tests/auto/qml/qqmllanguage/data/scopedProperties.qml

  • Committer: Package Import Robot
  • Author(s): Timo Jyrinki
  • Date: 2013-02-05 14:17:19 UTC
  • Revision ID: package-import@ubuntu.com-20130205141719-qqeyml8wslpyez52
Tags: upstream-5.0.1
ImportĀ upstreamĀ versionĀ 5.0.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
import QtQuick 2.0
 
2
 
 
3
MyBaseComponent {
 
4
    id: extended
 
5
 
 
6
    property bool success: false
 
7
 
 
8
    property int baseProperty: 666
 
9
    property int boundProperty: baseProperty
 
10
    property alias aliasProperty: extended.baseProperty
 
11
 
 
12
    function extendedPropertiesTest(expected) {
 
13
        return (baseProperty == expected &&
 
14
                boundProperty == expected &&
 
15
                aliasProperty == expected);
 
16
    }
 
17
 
 
18
    Component.onCompleted: {
 
19
        if (basePropertiesTest('bar') && extendedPropertiesTest(666)) {
 
20
            baseProperty = 999;
 
21
            success = extendedPropertiesTest(999) && baseSuccess;
 
22
        }
 
23
    }
 
24
}