~zsombi/ubuntu-ui-toolkit/79-more-simplification

« back to all changes in this revision

Viewing changes to modules/Ubuntu/Components/plugin/statesaverbackend_p.cpp

  • Committer: Zsombor Egri
  • Date: 2015-02-06 07:54:50 UTC
  • mfrom: (1387.2.16 staging)
  • Revision ID: zsombor.egri@canonical.com-20150206075450-aa0ty4ysvm5yinme
staging merge

Show diffs side-by-side

added added

removed removed

Lines of Context:
206
206
        if (qmlProperty.isValid()) {
207
207
            QVariant value = qmlProperty.read();
208
208
            if (static_cast<QMetaType::Type>(value.type()) != QMetaType::QObjectStar) {
 
209
                if (value.userType() == qMetaTypeId<QJSValue>()) {
 
210
                    value = value.value<QJSValue>().toVariant();
 
211
                }
209
212
                m_archive.data()->setValue(propertyName, value);
210
213
                /* Save the type of the property along with its value.
211
214
                 * This is important because QSettings deserializes values as QString.