~aacid/gsettings-qt/use_qchar_upper_lower

« back to all changes in this revision

Viewing changes to tests/tst_GSettings.qml

  • Committer: CI Train Bot
  • Author(s): Lukáš Tinkl, Lukáš Tinkl
  • Date: 2015-08-10 15:49:51 UTC
  • mfrom: (69.1.8 queued-processing)
  • Revision ID: ci-train-bot@canonical.com-20150810154951-qlz4nl5lm0iq32yb
Force handling deferred delete events to avoid memory leaks Fixes: #1460970
Approved by: Nick Dedekind, Lars Uebernickel

Show diffs side-by-side

added added

removed removed

Lines of Context:
11
11
  GSettings {
12
12
    id: settings
13
13
    schema.id: "com.canonical.gsettings.Test"
 
14
    // has to be "valueChanged" signal, not "changed"; the latter doesn't work reliably with the in-memory gsettings backend
 
15
    onValueChanged: changes.push([key, value]);
 
16
  }
14
17
 
15
 
    onChanged: changes.push([key, value]);
 
18
  SignalSpy {
 
19
    id: changesSpy
 
20
    target: settings
 
21
    signalName: "changed"
16
22
  }
17
23
 
18
24
  GSettings {
90
96
  function test_reset() {
91
97
    settings.testInteger = 4;
92
98
    settings.schema.reset('testInteger');
 
99
    tryCompare(changesSpy, "count", 1); // this merely exists only to connect to the "changed" signal; resetting changes is async in gsettings
93
100
    compare(settings.testInteger, 42);
94
101
  }
95
102