on xenial help sign in
Make tryGenericScopeView show the scope correctly
9648eecAlbert Astals Cid
tests/qmltests/Dash/tst_GenericScopeView.qml+7−1
@@ -22,6 +22,7 @@ import "../../../qml/Dash"
22import "../../../qml/Components"
22import "../../../qml/Components"
23import Ubuntu.Components 1.3
23import Ubuntu.Components 1.3
24import Unity.Test 0.1 as UT
24import Unity.Test 0.1 as UT
25+import Qt.test.qtestroot 1.0
25
26
26Item {
27Item {
27 id: shell
28 id: shell
@@ -40,7 +41,12 @@ Item {
40 Scopes {
41 Scopes {
41 id: scopes
42 id: scopes
42 // for tryGenericScopeView
43 // for tryGenericScopeView
44+ onLoadedChanged: {
45+ if (loaded && UT.Util.isInstanceOf(QTestRootObject, "DummyTestRootObject")) {
43− onLoadedChanged: if (loaded) genericScopeView.scope = scopes.getScope(2);
46+ genericScopeView.scope = scopes.getScope(2);
47+ genericScopeView.isCurrent = true;
48+ }
49+ }
44 }
50 }
45
51
46 MockScope {
52 MockScope {