Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support better boolean conversion semantics
Task-number: QTBUG-20242 Change-Id: Ie678f6189a8060de600b5394fbaaaef49be274c6 Reviewed-on: http://codereview.qt.nokia.com/2061 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
- Loading branch information
Aaron Kennedy
authored and
Qt by Nokia
committed
Jul 25, 2011
1 parent
2c4c109
commit 408ecd8
Showing
3 changed files
with
53 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
tests/auto/declarative/qdeclarativeecmascript/data/booleanConversion.qml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import QtQuick 1.0 | ||
|
||
QtObject { | ||
id: root | ||
|
||
property bool test_true1: false | ||
property bool test_true2: false | ||
property bool test_true3: false | ||
property bool test_true4: false | ||
property bool test_true5: false | ||
|
||
property bool test_false1: true | ||
property bool test_false2: true | ||
property bool test_false3: true | ||
|
||
|
||
Component.onCompleted: { | ||
test_true1 = 11 | ||
test_true2 = "Hello" | ||
test_true3 = root | ||
test_true4 = { a: 10, b: 11 } | ||
test_true5 = true | ||
|
||
test_false1 = 0 | ||
test_false2 = null | ||
test_false3 = false | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters