aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative/qdeclarativevaluetypes/data/bindingsSpliceCorrectly.3.qml
blob: 669feb99b256e7cb626d54efffbac76a3ec69fa9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
import Test 1.0
import QtQuick 1.0

BindingsSpliceCorrectlyType {
    property bool test: false

    property bool italicProperty: false
    property bool boldProperty2: false

    font.italic: italicProperty
    font.bold: boldProperty2

    Component.onCompleted: {
        // Test initial state
        if (font.italic != false) return;
        if (font.bold != false) return;

        // Test italic binding worked
        italicProperty = true;

        if (font.italic != true) return;
        if (font.bold != false) return;

        // Test bold binding was overridden
        boldProperty = true;
        if (font.italic != true) return;
        if (font.bold != false) return;

        boldProperty2 = true;
        if (font.italic != true) return;
        if (font.bold != true) return;

        test = true;
    }
}