diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2017-02-28 19:51:52 +0100 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2017-03-01 11:57:43 +0100 |
commit | fea05bb0dba069c82b9dbe2a71b31f88cf54a712 (patch) | |
tree | 86516997de75fb734a03f9a532bc6d821aba847b /components/package/contents/ui/MailListView.qml | |
parent | 0203557d72eceddf19bbca8143e12be95adab2d7 (diff) | |
download | kube-fea05bb0dba069c82b9dbe2a71b31f88cf54a712.tar.gz kube-fea05bb0dba069c82b9dbe2a71b31f88cf54a712.zip |
Avoid "Unable to assign...." errors
i.e. "Unable to assign [undefined] to Sink::ApplicationDomain::Folder::Ptr"
Because qml does not know how to assign a default-constructed value we
have to use conditional bindings. The !! operator checks for
availability of the property which then triggers the binding.
I assume an alternative viable approach would be to expose all
controller properties as QVariants only, in which case an assignment
from null would work (it doesn't for Folder::Ptr).
Diffstat (limited to 'components/package/contents/ui/MailListView.qml')
-rw-r--r-- | components/package/contents/ui/MailListView.qml | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/components/package/contents/ui/MailListView.qml b/components/package/contents/ui/MailListView.qml index 1467979a..35fd4ec9 100644 --- a/components/package/contents/ui/MailListView.qml +++ b/components/package/contents/ui/MailListView.qml | |||
@@ -28,7 +28,7 @@ import org.kube.framework.domain 1.0 as KubeFramework | |||
28 | Item { | 28 | Item { |
29 | id: root | 29 | id: root |
30 | property variant parentFolder | 30 | property variant parentFolder |
31 | property variant currentMail | 31 | property variant currentMail: null |
32 | property bool isDraft : false | 32 | property bool isDraft : false |
33 | property int currentIndex | 33 | property int currentIndex |
34 | 34 | ||