~lukas-kde/gsettings-qt/queued-processing

« back to all changes in this revision

Viewing changes to GSettings/gsettings-qml.cpp

  • Committer: Lukáš Tinkl
  • Date: 2015-05-22 03:00:49 UTC
  • Revision ID: lukas@kde.org-20150522030049-eryz34y1bo7r5e2u
process the changed signals in a queued connection

allows for freeing an associated QML Component by synchronizing
the 2 event loops

fix the unit tests

Show diffs side-by-side

added added

removed removed

Lines of Context:
135
135
    if (schemaValid) {
136
136
        priv->settings = new QGSettings(priv->schema->id(), priv->schema->path(), this);
137
137
 
138
 
        connect(priv->settings, SIGNAL(changed(const QString &)), this, SLOT(settingChanged(const QString &)));
 
138
        connect(priv->settings, SIGNAL(changed(const QString &)), this, SLOT(settingChanged(const QString &)), Qt::QueuedConnection);
139
139
 
140
 
        Q_FOREACH(QString key, priv->settings->keys())
 
140
        Q_FOREACH(const QString &key, priv->settings->keys())
141
141
            this->insert(key, priv->settings->get(key));
142
142
 
143
143
        Q_EMIT(schemaChanged());