on xenial help sign in
Removed previewShown and settingsShown properties
commitc6d555d32c50d77240ad150709d4c324a1b5c261 authorAndrea Cimitan <andrea.cimitan@gmail.com> dateMon 25 Aug 2014, 17:07 (12 years ago) parent9178f5b
5 files changed+11−15
qml/Dash/Dash.qml+1−2 qml/Dash/DashContent.qml+4−6 qml/Dash/GenericScopeView.qml+2−4 tests/autopilot/unity8/shell/emulators/dash.py+1−1 tests/qmltests/Dash/tst_GenericScopeView.qml+3−2
qml/Dash/Dash.qml+1−2
@@ -341,8 +341,7 @@ Showable {
341341 objectName: "overviewDragHandle"
342342 z: 1
343343 direction: Direction.Upwards
344− enabled: !dashContent.previewShown &&
345− !dashContent.settingsShown &&
344+ enabled: !dashContent.subPageShown &&
346345 dashContent.currentScope &&
347346 dashContent.currentScope.searchQuery == "" &&
348347 (overviewController.progress == 0 || dragging)
qml/Dash/DashContent.qml+4−6
@@ -27,10 +27,8 @@ Item {
2727 readonly property alias currentIndex: dashContentList.currentIndex
2828 readonly property string currentScopeId: dashContentList.currentItem ? dashContentList.currentItem.scopeId : ""
2929 readonly property var currentScope: dashContentList.currentItem ? dashContentList.currentItem.theScope : null
30− readonly property bool previewShown: dashContentList.currentItem && dashContentList.currentItem.item ?
31− dashContentList.currentItem.item.previewShown : false
32− readonly property bool settingsShown: dashContentList.currentItem && dashContentList.currentItem.item ?
33− dashContentList.currentItem.item.settingsShown : false
30+ readonly property bool subPageShown: dashContentList.currentItem && dashContentList.currentItem.item ?
31+ dashContentList.currentItem.item.subPageShown : false
3432 readonly property bool processing: dashContentList.currentItem && dashContentList.currentItem.item
3533 && dashContentList.currentItem.item.processing || false
3634 readonly property bool pageHeaderTotallyVisible: dashContentList.currentItem && dashContentList.currentItem.item
@@ -98,7 +96,7 @@ Item {
9896 id: dashContentList
9997 objectName: "dashContentList"
10098
101− interactive: dashContent.scopes.loaded && currentItem && !currentItem.moving && !currentItem.navigationShown && !currentItem.settingsShown
99+ interactive: dashContent.scopes.loaded && currentItem && !currentItem.moving && !currentItem.navigationShown && !currentItem.subPageShown
102100 anchors.fill: parent
103101 orientation: ListView.Horizontal
104102 boundsBehavior: Flickable.DragAndOvershootBounds
@@ -138,7 +136,7 @@ Item {
138136
139137 readonly property bool moving: item ? item.moving : false
140138 readonly property bool navigationShown: item ? item.navigationShown : false
141− readonly property bool settingsShown: item ? item.settingsShown : false
139+ readonly property bool subPageShown: item ? item.subPageShown : false
142140 readonly property var categoryView: item ? item.categoryView : null
143141 readonly property var theScope: scope
144142
qml/Dash/GenericScopeView.qml+2−4
@@ -34,8 +34,7 @@ FocusScope {
3434 property bool enableHeightBehaviorOnNextCreation: false
3535 property var categoryView: categoryView
3636 property bool showPageHeader: true
37− readonly property alias previewShown: subPageLoader.previewShown
38− readonly property alias settingsShown: subPageLoader.settingsShown
37+ readonly property alias subPageShown: subPageLoader.subPageShown
3938 property int paginationCount: 0
4039 property int paginationIndex: 0
4140 property alias pageHeaderTotallyVisible: categoryView.pageHeaderTotallyVisible
@@ -471,8 +470,7 @@ FocusScope {
471470 readonly property var currentItem: item && item.currentItem || null
472471
473472 property string subPage: ""
474− readonly property bool previewShown: visible && subPage == "preview"
475− readonly property bool settingsShown: visible && subPage == "settings"
473+ readonly property bool subPageShown: visible && status === Loader.Ready
476474
477475 function openSubPage(page) {
478476 subPage = page;
tests/autopilot/unity8/shell/emulators/dash.py+1−1
@@ -186,7 +186,7 @@ class GenericScopeView(emulators.UnityEmulatorBase):
186186 self.click_scope_item(category, app_name)
187187 preview_list = self.wait_select_single(
188188 'QQuickLoader', objectName='subPageLoader')
189− preview_list.previewShown.wait_for(True)
189+ preview_list.subPageShown.wait_for(True)
190190 preview_list.x.wait_for(0)
191191 return preview_list.select_single(
192192 Preview, objectName='preview{}'.format(preview_list.currentIndex))
tests/qmltests/Dash/tst_GenericScopeView.qml+3−2
@@ -375,14 +375,15 @@ Item {
375375 mouseClick(settings, settings.width / 2, settings.height / 2);
376376 tryCompare(testCase.subPageLoader, "open", true);
377377 tryCompareFunction(function() { return ("" + subPageLoader.source).indexOf("ScopeSettingsPage.qml") != -1; }, true);
378− compare(genericScopeView.settingsShown, true)
378+ compare(genericScopeView.subPageShown, true);
379+ compare(genericScopeView.subPage, "settings");
379380 tryCompare(testCase.subPageLoader, "x", 0);
380381
381382 // close
382383 var settingsHeader = findChild(testCase.subPageLoader.item, "pageHeader");
383384 mouseClick(settingsHeader, units.gu(2), units.gu(2));
384385 tryCompare(testCase.subPageLoader, "open", false);
385− tryCompare(genericScopeView, "settingsShown", false);
386+ tryCompare(genericScopeView, "subPageShown", false);
386387 var categoryListView = findChild(genericScopeView, "categoryListView");
387388 tryCompare(categoryListView, "x", 0);
388389 }