diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2010-04-21 11:29:25 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2010-04-21 11:29:25 (GMT) |
commit | 38b8940413fc83d2e641be580369125709ffa8e1 (patch) | |
tree | 6612da384fae93e4b31fb8ea7007d3e3934b01d9 /tests/auto/declarative/qdeclarativeqt/data/createQmlObject.qml | |
parent | c74dac2a0ef5d1b428c4da4e48fab05f9886233a (diff) | |
parent | edc74eecf2967b295c7b881977527474be8e1c80 (diff) | |
download | Qt-38b8940413fc83d2e641be580369125709ffa8e1.zip Qt-38b8940413fc83d2e641be580369125709ffa8e1.tar.gz Qt-38b8940413fc83d2e641be580369125709ffa8e1.tar.bz2 |
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-qml into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/qt-qml: (118 commits)
Update test files to new syntax
Compile without Qt3 support.
Ensure workerscript.qml works (autotested).
Update strings in test
remove debugs
Make the dynamic creation functions on the Qt object
More focus example cleanup.
Autotests
Add hasModelChildren property to delegates with QAbstractItemModel model type.
Emit released and hoveredChanged in MouseArea when a UngrabMouse is received
Balance grid items for larger displays.
Autotest
Cleanup declarative focus example.
Add forceFocus method to QDeclarativeItem.
Don't allow properties in Component elements
Fix crash when QDeclarativeInfo objects are copied
Ignore message in QDeclarativeLoader test.
Fix crash.
Fix qmlvisual/animation/parentAnimation autotest
delete the viewer before calling exit(). Ensures correct cleanup.
...
Diffstat (limited to 'tests/auto/declarative/qdeclarativeqt/data/createQmlObject.qml')
-rw-r--r-- | tests/auto/declarative/qdeclarativeqt/data/createQmlObject.qml | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/tests/auto/declarative/qdeclarativeqt/data/createQmlObject.qml b/tests/auto/declarative/qdeclarativeqt/data/createQmlObject.qml index 54a3e7d..9fe169d 100644 --- a/tests/auto/declarative/qdeclarativeqt/data/createQmlObject.qml +++ b/tests/auto/declarative/qdeclarativeqt/data/createQmlObject.qml @@ -3,29 +3,29 @@ import Qt 4.6 Item { id: root - property bool incorrectArgCount1: false - property bool incorrectArgCount2: false + // errors resulting in exceptions + property QtObject incorrectArgCount1: Qt.createQmlObject() + property QtObject incorrectArgCount2: Qt.createQmlObject("import Qt 4.6\nQtObject{}", root, "main.qml", 10) + property QtObject noParent: Qt.createQmlObject("import Qt 4.6\nQtObject{\nproperty int test: 13}", 0) + property QtObject notAvailable: Qt.createQmlObject("import Qt 4.6\nQtObject{Blah{}}", root) + property QtObject errors: Qt.createQmlObject("import Qt 4.6\nQtObject{\nproperty int test: 13\nproperty int test: 13\n}", root, "main.qml") + property bool emptyArg: false - property bool noParent: false - property bool notAvailable: false - property bool runtimeError: false - property bool errors: false property bool success: false Component.onCompleted: { - // errors - incorrectArgCount1 = (createQmlObject() == null); - incorrectArgCount2 = (createQmlObject("import Qt 4.6\nQtObject{}", root, "main.qml", 10) == null); - emptyArg = (createQmlObject("", root) == null); - errors = (createQmlObject("import Qt 4.6\nQtObject{\nproperty int test: 13\nproperty int test: 13\n}", root, "main.qml") == null); - noParent = (createQmlObject("import Qt 4.6\nQtObject{\nproperty int test: 13}", 0) == null); - notAvailable = (createQmlObject("import Qt 4.6\nQtObject{Blah{}}", root) == null); - runtimeError = (createQmlObject("import Qt 4.6\nQtObject{property int test\nonTestChanged: QtObject{}\n}", root) == null); + // errors resulting in nulls + emptyArg = (Qt.createQmlObject("", root) == null); + try { + Qt.createQmlObject("import Qt 4.6\nQtObject{property int test\nonTestChanged: QtObject{}\n}", root) + } catch (error) { + console.log("RunTimeError: ",error.message); + } - var o = createQmlObject("import Qt 4.6\nQtObject{\nproperty int test: 13\n}", root); + var o = Qt.createQmlObject("import Qt 4.6\nQtObject{\nproperty int test: 13\n}", root); success = (o.test == 13); - createQmlObject("import Qt 4.6\nItem {}\n", root); + Qt.createQmlObject("import Qt 4.6\nItem {}\n", root); } } |