~aacid/gsettings-qt/disconnect_signal_handler

Viewing all changes in revision 74.

  • Committer: CI Train Bot
  • Author(s): Lars Uebernickel
  • Date: 2015-11-04 17:59:11 UTC
  • mfrom: (73.1.2 git-trunk)
  • Revision ID: ci-train-bot@canonical.com-20151104175911-jexgv9674vsowtbo
qgsettings-qml: explicitly emit changed events

We're working around QTBUG-32859 by not dispatching changed signals
directly. This leads to two issues:

1. Changed signals are not emitted by GSettingsQml, because it only
emits those when the value is different from its cached one, which is
already updated by the time the queued signal arrives.

2. Calling schema.reset() from qml and immediately fetching the value
after returns the old value, because the value was only updated when the
signal arrives.

Fix these by explicitly emitting the changed signal when setting the
value from qml (the later one is then ignored) and setting the cached
value when calling reset().

Also, remove changesSpy from test_reset(), because that now counts
changes correctly and includes the ones from previous tests.

This patch can be reverted once the Qt bug is fixed. Fixes: #1503693
Approved by: Albert Astals Cid

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: