diff options
author | Bea Lam <bea.lam@nokia.com> | 2010-04-29 05:39:47 (GMT) |
---|---|---|
committer | Bea Lam <bea.lam@nokia.com> | 2010-04-29 05:42:49 (GMT) |
commit | 96551e8af08c6f5eb506468a1a79070f23525bca (patch) | |
tree | 0de2ac37a5658ae57fe49d9a4b39b2280af26974 /doc/src/snippets | |
parent | 9fb7035d59ffa582edabf53c5d617524ab92ae52 (diff) | |
download | Qt-96551e8af08c6f5eb506468a1a79070f23525bca.zip Qt-96551e8af08c6f5eb506468a1a79070f23525bca.tar.gz Qt-96551e8af08c6f5eb506468a1a79070f23525bca.tar.bz2 |
Remove Component's isReady, isLoading, isError and isNull properties.
The Component status enum covers all of these properties already and
removing these also makes the API consistent with Image and Loader.
Note this change only affects the QML Component API; the methods are
still available for QDeclarativeComponent.
Diffstat (limited to 'doc/src/snippets')
-rw-r--r-- | doc/src/snippets/declarative/componentCreation.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/doc/src/snippets/declarative/componentCreation.js b/doc/src/snippets/declarative/componentCreation.js index be3e4d6..814545e 100644 --- a/doc/src/snippets/declarative/componentCreation.js +++ b/doc/src/snippets/declarative/componentCreation.js @@ -3,7 +3,7 @@ var component; var sprite; function finishCreation() { - if (component.isReady) { + if (component.status == Component.Ready) { sprite = component.createObject(); if (sprite == null) { // Error Handling @@ -13,7 +13,7 @@ function finishCreation() { sprite.y = 100; // ... } - } else if (component.isError()) { + } else if (component.status == Component.Error) { // Error Handling console.log("Error loading component:", component.errorsString()); } @@ -26,7 +26,7 @@ function createSpriteObjects() { //![2] component = Qt.createComponent("Sprite.qml"); - if (component.isReady) + if (component.status == Component.Ready) finishCreation(); else component.statusChanged.connect(finishCreation); |