Merge lp:~mzanetti/gsettings-qt/queued-processing into lp:gsettings-qt

Proposed by Michael Zanetti
Status: Rejected
Rejected by: Lars Karlitski
Proposed branch: lp:~mzanetti/gsettings-qt/queued-processing
Merge into: lp:gsettings-qt
Diff against target: 15 lines (+4/-1)
1 file modified
GSettings/gsettings-qml.cpp (+4/-1)
To merge this branch: bzr merge lp:~mzanetti/gsettings-qt/queued-processing
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Needs Fixing
Ubuntu Touch System Settings Pending
Review via email: mp+248224@code.launchpad.net

Commit message

sync event processing with the Qt event loop

To post a comment you must log in.
Revision history for this message
Albert Astals Cid (aacid) wrote :

Looks a bit workaround-ish, i'm not opposing to it, but maybe a TODO to try to find the real cause of it?

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Lars Karlitski (larsu) wrote :

Unmerged revisions

68. By Michael Zanetti

add comment

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'GSettings/gsettings-qml.cpp'
2--- GSettings/gsettings-qml.cpp 2014-06-23 14:55:54 +0000
3+++ GSettings/gsettings-qml.cpp 2015-02-02 10:24:24 +0000
4@@ -135,7 +135,10 @@
5 if (schemaValid) {
6 priv->settings = new QGSettings(priv->schema->id(), priv->schema->path(), this);
7
8- connect(priv->settings, SIGNAL(changed(const QString &)), this, SLOT(settingChanged(const QString &)));
9+ // There seems to be some context issues if this is a Qt::DirectConnection. E.g. if a setting is used in a
10+ // condition for a Loader source, the Loader won't destroy the old item any more. Switching to a
11+ // Qt::QueuedConnection, which effectively syncs processing to the Qt event loop, fixes that issue.
12+ connect(priv->settings, SIGNAL(changed(const QString &)), this, SLOT(settingChanged(const QString &)), Qt::QueuedConnection);
13
14 Q_FOREACH(QString key, priv->settings->keys())
15 this->insert(key, priv->settings->get(key));

Subscribers

People subscribed via source and target branches