qml - Saving JS Object (variant or var) in settings -


when write this:

property bool token: false  settings {     property alias token: root.token } 

and change token somewhere in application true, next time when run application token true.

but when write this:

property var token: null  settings {     property alias token: root.token } 

and change token {'a': 'b'} example, next time run application token null settings doesn't save js object. idea what's wrong here?

update: seems problem not saving js object {'a': 'b'}, qml saves successfully, problem null if change false works alright. guess it's related question storing data using settings element in qml don't understand why null being post processed, though using false instead of null default value property solves problem don't don't want false here, it's not appropriate morally, want null.

update 2: found solution, setting no default value property (not false nor null) seems solve issue , seems appropriate morally this:

property var token  settings {     property alias token: root.token } 

i don't understand why null doesn't work yet. explanation welcome.

setting no default value property (not false nor null) seems solve issue:

property var token  settings {     property alias token: root.token } 

Comments

Popular posts from this blog

ios - RestKit 0.20 — CoreData: error: Failed to call designated initializer on NSManagedObject class (again) -

laravel - PDOException in Connector.php line 55: SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: YES) -

java - Digest auth with Spring Security using javaconfig -