on xenial help sign in
More merge issues
72f88c5Albert Astals
qml/Dash/Dash.qml+7−1
@@ -113,7 +113,13 @@ Showable {
113 hide();
113 hide();
114 }
114 }
115 onSearchSelected: {
115 onSearchSelected: {
116− var scopeIndex = filteredScopes.findFirst(Scopes.RoleId, scopeId);
116+ var scopeIndex = -1;
117+ for (var i = 0; i < scopes.count; ++i) {
118+ if (scopes.getScope(i).id == scopeId) {
119+ scopeIndex = i;
120+ break;
121+ }
122+ }
117 if (scopeIndex >= 0) {
123 if (scopeIndex >= 0) {
118 // Is a favorite one
124 // Is a favorite one
119 setCurrentScope(scopeId, false, false);
125 setCurrentScope(scopeId, false, false);
qml/Dash/GenericScopeView.qml+5−3
@@ -25,7 +25,7 @@ import "../Components/ListItems" as ListItems
25FocusScope {
25FocusScope {
26 id: scopeView
26 id: scopeView
27
27
28− readonly property bool navigationShown: pageHeaderLoader.item ? pageHeaderLoader.item.bottomItem.showList : false
28+ readonly property bool navigationShown: pageHeaderLoader.item ? pageHeaderLoader.item.bottomItem[0].showList : false
29 property var scope: null
29 property var scope: null
30 property SortFilterProxyModel categories: categoryFilter
30 property SortFilterProxyModel categories: categoryFilter
31 property bool isCurrent: false
31 property bool isCurrent: false
@@ -35,8 +35,8 @@ FocusScope {
35 property var categoryView: categoryView
35 property var categoryView: categoryView
36 property bool showPageHeader: true
36 property bool showPageHeader: true
37 readonly property alias previewShown: previewListView.open
37 readonly property alias previewShown: previewListView.open
38− property alias paginationCount: pageHeader.paginationCount
38+ property int paginationCount: 0
39− property alias paginationIndex: pageHeader.paginationIndex
39+ property int paginationIndex: 0
40
40
41 property var scopeStyle: ScopeStyle {
41 property var scopeStyle: ScopeStyle {
42 style: scope ? scope.customizations : {}
42 style: scope ? scope.customizations : {}
@@ -417,6 +417,8 @@ FocusScope {
417 showBackButton: scopeView.hasBackAction
417 showBackButton: scopeView.hasBackAction
418 searchEntryEnabled: true
418 searchEntryEnabled: true
419 scopeStyle: scopeView.scopeStyle
419 scopeStyle: scopeView.scopeStyle
420+ paginationCount: scopeView.paginationCount
421+ paginationIndex: scopeView.paginationIndex
420
422
421 bottomItem: DashNavigation {
423 bottomItem: DashNavigation {
422 scope: scopeView.scope
424 scope: scopeView.scope
qml/Dash/PreviewListView.qml+1−1
@@ -108,7 +108,7 @@ Item {
108 anchors {
108 anchors {
109 left: parent.left
109 left: parent.left
110 right: parent.right
110 right: parent.right
111− top: pageHeader.bottom
111+ top: header.bottom
112 bottom: parent.bottom
112 bottom: parent.bottom
113 }
113 }
114
114
qml/Dash/ScopesOverview.qml−1
@@ -188,7 +188,6 @@ Item {
188 scopeStyle: overviewScopeStyle
188 scopeStyle: overviewScopeStyle
189 showSignatureLine: false
189 showSignatureLine: false
190 searchEntryEnabled: true
190 searchEntryEnabled: true
191− searchInProgress: root.scope ? root.scope.searchInProgress : false
192 }
191 }
193
192
194 ScopesOverviewTab {
193 ScopesOverviewTab {
tests/qmltests/Dash/tst_Dash.qml+11−4
@@ -59,9 +59,9 @@ Item {
59 function get_scope_data() {
59 function get_scope_data() {
60 return [
60 return [
61 { tag: "MockScope1", visualIndex: 0 },
61 { tag: "MockScope1", visualIndex: 0 },
62− { tag: "MockScope2", visualIndex: 1 },
62+ { tag: "MockScope2", visualIndex: -1 },
63− { tag: "clickscope", visualIndex: 2 },
63+ { tag: "clickscope", visualIndex: 1 },
64− { tag: "MockScope5", visualIndex: 3 },
64+ { tag: "MockScope5", visualIndex: 2 },
65 ]
65 ]
66 }
66 }
67
67
@@ -80,7 +80,14 @@ Item {
80 tryCompare(dashContentList, "count", 6);
80 tryCompare(dashContentList, "count", 6);
81
81
82 verify(dashContentList != undefined);
82 verify(dashContentList != undefined);
83+ if (data.visualIndex == -1) {
83− tryCompare(dashContentList, "currentIndex", data.visualIndex);
84+ tryCompare(dashContentList, "currentIndex", 0);
85+ expectFail(data.tag, "non favorite scopes should not be visble in the scopes model");
86+ compare(dashContentList.currentItem.scopeId, data.tag); // this should fail
87+ } else {
88+ tryCompare(dashContentList, "currentIndex", data.visualIndex);
89+ compare(dashContentList.currentItem.scopeId, data.tag);
90+ }
84 }
91 }
85
92
86 function test_dash_overview_show_select_same_favorite() {
93 function test_dash_overview_show_select_same_favorite() {