diff options
author | Paolo Angelelli <paolo.angelelli@qt.io> | 2018-11-06 13:48:27 +0100 |
---|---|---|
committer | Paolo Angelelli <paolo.angelelli@qt.io> | 2018-11-27 18:48:52 +0000 |
commit | a4cc61fc30cb7dff15bf7ae2ff064530b40d72c5 (patch) | |
tree | e3e5e26cc1227d09f2589fd6c0cfd07e1af8ae65 /tests | |
parent | cb19e1f7e3cc2cfee3b8fcbdfa5cd151826dadac (diff) | |
download | qtlocation-a4cc61fc30cb7dff15bf7ae2ff064530b40d72c5.tar.gz |
Improve the initialization behavior of CategoryModel
CategoryModel was missing an update call in the ::componentComplete
callback, as well as reacting on the name changed signal of the plugin.
An update call was also missing in the setPlugin method.
This patch makes it react on the attached signal instead, and
adds missing update calls.
Fixes: QTBUG-70254
Change-Id: I1a8de0137b4fe4af7c5ffc848799061147febba2
Reviewed-by: Michael Brasser <michael.brasser@live.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/declarative_core/tst_categorymodel.qml | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/auto/declarative_core/tst_categorymodel.qml b/tests/auto/declarative_core/tst_categorymodel.qml index 0b6e50a3..86d0fd4c 100644 --- a/tests/auto/declarative_core/tst_categorymodel.qml +++ b/tests/auto/declarative_core/tst_categorymodel.qml @@ -221,7 +221,7 @@ TestCase { //iteration. //try updating with an uninitialized plugin instance. - testModel.plugin = uninitializedPlugin; + testModel.plugin = uninitializedPlugin; // uninitialized does not trigger update on setPlugin testModel.update(); tryCompare(statusChangedSpy, "count", 2); compare(testModel.status, CategoryModel.Error); @@ -229,8 +229,9 @@ TestCase { //try searching with plugin a instance //that has been provided a non-existent name + tryCompare(statusChangedSpy, "count", 0); testModel.plugin = nonExistantPlugin; - testModel.update(); +// testModel.update(); //QTBUG-70254 tryCompare(statusChangedSpy, "count", 2); compare(testModel.status, CategoryModel.Error); } |