on xenial help sign in
Link the pageheader scope with the current scope
fe450bbAlbert Astals
qml/Dash/DashContent.qml+2
@@ -156,9 +156,11 @@ Item {
156
156
157 PageHeader {
157 PageHeader {
158 id: pageHeader
158 id: pageHeader
159+ objectName: "pageHeader"
159 width: parent.width
160 width: parent.width
160 searchEntryEnabled: true
161 searchEntryEnabled: true
161 searchHistory: dashContent.searchHistory
162 searchHistory: dashContent.searchHistory
163+ scope: dashContentList.currentItem.theScope
162
164
163 childItem: TabBar {
165 childItem: TabBar {
164 id: tabBar
166 id: tabBar
tests/qmltests/Dash/tst_DashContent.qml+2
@@ -250,6 +250,8 @@ Item {
250 function test_scope_mapping(data) {
250 function test_scope_mapping(data) {
251 dashContent.setCurrentScopeAtIndex(data.index, true, false);
251 dashContent.setCurrentScopeAtIndex(data.index, true, false);
252 tryCompareFunction(get_current_item_object_name, data.objectName)
252 tryCompareFunction(get_current_item_object_name, data.objectName)
253+ var pageHeader = findChild(dashContent, "pageHeader");
254+ compare(pageHeader.scope, scopesModel.get(data.index));
253 }
255 }
254
256
255 function test_is_active_data() {
257 function test_is_active_data() {