on xenial help sign in
Fresh branch of QML searchHistory.
c516c70Nicolas d'Offay
Components/PageHeader.qml+1−1
@@ -30,7 +30,7 @@ Item {
30
30
31 property bool searchEntryEnabled: false
31 property bool searchEntryEnabled: false
32 property alias searchQuery: searchField.text
32 property alias searchQuery: searchField.text
33− property ListModel searchHistory: SearchHistoryModel {}
33+ property ListModel searchHistory
34 property Scope scope
34 property Scope scope
35
35
36 height: units.gu(8.5)
36 height: units.gu(8.5)
Dash/Dash.qml+3
@@ -26,6 +26,8 @@ Showable {
26
26
27 visible: shown
27 visible: shown
28
28
29+ property ListModel searchHistory: SearchHistoryModel {}
30+
29 property alias contentProgress: dashContent.contentProgress
31 property alias contentProgress: dashContent.contentProgress
30 property string showScopeOnLoaded: "home.scope"
32 property string showScopeOnLoaded: "home.scope"
31 property real contentScale: 1.0
33 property real contentScale: 1.0
@@ -63,6 +65,7 @@ Showable {
63 anchors.fill: parent
65 anchors.fill: parent
64 model: filteredScopes
66 model: filteredScopes
65 scopes: scopes
67 scopes: scopes
68+ searchHistory: dash.searchHistory
66 onMovementStarted: dashbar.startNavigation()
69 onMovementStarted: dashbar.startNavigation()
67 onMovementEnded: dashbar.stopNavigation()
70 onMovementEnded: dashbar.stopNavigation()
68 onContentFlickStarted: dashbar.finishNavigation()
71 onContentFlickStarted: dashbar.finishNavigation()
Dash/DashApps.qml+2
@@ -30,6 +30,8 @@ GenericScopeView {
30 property var mainStageApplicationsModel: shell.applicationManager.mainStageApplications
30 property var mainStageApplicationsModel: shell.applicationManager.mainStageApplications
31 property var sideStageApplicationModel: shell.applicationManager.sideStageApplications
31 property var sideStageApplicationModel: shell.applicationManager.sideStageApplications
32
32
33+ property alias searchHistory: scopeView.searchHistory
34+
33 ListModel {
35 ListModel {
34 id: dummyVisibilityModifier
36 id: dummyVisibilityModifier
35
37
Dash/DashContent.qml+2−1
@@ -27,6 +27,7 @@ Item {
27 property alias currentIndex: dashContentList.currentIndex
27 property alias currentIndex: dashContentList.currentIndex
28
28
29 property ScopeDelegateMapper scopeMapper : ScopeDelegateMapper {}
29 property ScopeDelegateMapper scopeMapper : ScopeDelegateMapper {}
30+ property ListModel searchHistory
30
31
31 signal movementStarted()
32 signal movementStarted()
32 signal movementEnded()
33 signal movementEnded()
@@ -127,7 +128,7 @@ Item {
127 onLoaded: {
128 onLoaded: {
128 item.scope = Qt.binding(function() { return scope })
129 item.scope = Qt.binding(function() { return scope })
129 item.isCurrent = Qt.binding(function() { return visible && ListView.isCurrentItem })
130 item.isCurrent = Qt.binding(function() { return visible && ListView.isCurrentItem })
130− item.searchHistory = Qt.binding(function() { return shell.searchHistory })
131+ item.searchHistory = Qt.binding(function() { return dashContent.searchHistory })
131 dashContentList.movementStarted.connect(item.movementStarted)
132 dashContentList.movementStarted.connect(item.movementStarted)
132 dashContent.positionedAtBeginning.connect(item.positionedAtBeginning)
133 dashContent.positionedAtBeginning.connect(item.positionedAtBeginning)
133 dashContent.scopeLoaded(item.scope.id)
134 dashContent.scopeLoaded(item.scope.id)
Dash/GenericScopeView.qml+4
@@ -21,6 +21,9 @@ import "../Components/ListItems" as ListItems
21
21
22ScopeView {
22ScopeView {
23 id: scopeView
23 id: scopeView
24+
25+ property ListModel searchHistory
26+
24 readonly property alias previewShown: previewListView.onScreen
27 readonly property alias previewShown: previewListView.onScreen
25 property bool enableHeightBehaviorOnNextCreation: false
28 property bool enableHeightBehaviorOnNextCreation: false
26
29
@@ -248,6 +251,7 @@ ScopeView {
248 text: scopeView.scope.name
251 text: scopeView.scope.name
249 searchEntryEnabled: true
252 searchEntryEnabled: true
250 scope: scopeView.scope
253 scope: scopeView.scope
254+ searchHistory: scopeView.searchHistory
251 }
255 }
252 }
256 }
253
257
Shell.qml−2
@@ -62,8 +62,6 @@ FocusScope {
62 }
62 }
63 }
63 }
64
64
65− property ListModel searchHistory: SearchHistoryModel {}
66−
67 property var applicationManager: ApplicationManagerWrapper {}
65 property var applicationManager: ApplicationManagerWrapper {}
68
66
69 Binding {
67 Binding {