diff options
author | Erik Verbruggen <erik.verbruggen@theqtcompany.com> | 2016-04-01 15:48:09 +0200 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@theqtcompany.com> | 2016-04-01 16:21:57 +0000 |
commit | e19b1a66baf73cef63ea6ed81be036ed2f74d464 (patch) | |
tree | eed1c6a91870f54f92df760a1f6b23930f3a11de /examples/scxml | |
parent | e22ab608d254c03d58f094e0f25d9e83c2f56be8 (diff) |
Fix use of context property in invoke example.
Change-Id: I559e41c22ab55a076ebc4ead7e23df0aea99de13
Reviewed-by: Ulf Hermann <ulf.hermann@theqtcompany.com>
Diffstat (limited to 'examples/scxml')
-rw-r--r-- | examples/scxml/invoke-common/SubView.qml | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/examples/scxml/invoke-common/SubView.qml b/examples/scxml/invoke-common/SubView.qml index cec32e3..61cc723 100644 --- a/examples/scxml/invoke-common/SubView.qml +++ b/examples/scxml/invoke-common/SubView.qml @@ -51,9 +51,10 @@ import QtQuick 2.5 Item { + // "anywhere" is a context property, so we always have to check if it's null Button { id: here - enabled: anywhere.here + enabled: anywhere ? anywhere.here : false text: "Go There" width: parent.width / 2 height: parent.height @@ -62,7 +63,7 @@ Item { Button { id: there - enabled: anywhere.there + enabled: anywhere ? anywhere.there : false text: "Go Here" width: parent.width / 2 height: parent.height |