View Single Post
smoku's Avatar
Posts: 1,716 | Thanked: 3,007 times | Joined on Dec 2009 @ Warsaw, Poland
#357
Originally Posted by javispedro View Post
QObject->property() will only return an invalid variant if the property does not exist. The property exists (it is not dynamic, since it is declared via Q_PROPERTY), and therefore the isValid() check is useless (always returns true).
Ouch! I missed that.
MDConf returns invalid QVariant for non-existing values. But in MDConfGroup there is an explicit check not to store invalid QVariant.
Also like you noticed, QObject would not return one anyway.


Originally Posted by javispedro View Post
Sorry I don't have time to make a patch atm, but it should be as trivial as changing the settings.h constructor to initialize the member variables to the proper default values.
I'm hesistant to such change as it would mean storing default values both in daemon and app and a need to keep them synchronized.
__________________
smoku @xiaoka.com (SMTP/XMPP) ...:.:....:... pebbled . Poky Fish : sixaxis . psx4m . uae4all
Jolla Phone post-mortem . . . . . . . . . . -> 1+1 VGN-UX390N
 

The Following 2 Users Say Thank You to smoku For This Useful Post: