on xenial help sign in
Fresh branch of QML searchHistory.
commitc516c708bfdb57f625015ad5740feef0e2219488 authorNicolas d'Offay <nicolas.doffay@canonical.com> dateTue 5 Nov 2013, 14:21 (13 years ago) parented08389
6 files changed+12−4
Components/PageHeader.qml+1−1 Dash/Dash.qml+3 Dash/DashApps.qml+2 Dash/DashContent.qml+2−1 Dash/GenericScopeView.qml+4 Shell.qml−2
Components/PageHeader.qml+1−1
@@ -30,7 +30,7 @@ Item {
3030
3131 property bool searchEntryEnabled: false
3232 property alias searchQuery: searchField.text
33− property ListModel searchHistory: SearchHistoryModel {}
33+ property ListModel searchHistory
3434 property Scope scope
3535
3636 height: units.gu(8.5)
Dash/Dash.qml+3
@@ -26,6 +26,8 @@ Showable {
2626
2727 visible: shown
2828
29+ property ListModel searchHistory: SearchHistoryModel {}
30+
2931 property alias contentProgress: dashContent.contentProgress
3032 property string showScopeOnLoaded: "home.scope"
3133 property real contentScale: 1.0
@@ -63,6 +65,7 @@ Showable {
6365 anchors.fill: parent
6466 model: filteredScopes
6567 scopes: scopes
68+ searchHistory: dash.searchHistory
6669 onMovementStarted: dashbar.startNavigation()
6770 onMovementEnded: dashbar.stopNavigation()
6871 onContentFlickStarted: dashbar.finishNavigation()
Dash/DashApps.qml+2
@@ -30,6 +30,8 @@ GenericScopeView {
3030 property var mainStageApplicationsModel: shell.applicationManager.mainStageApplications
3131 property var sideStageApplicationModel: shell.applicationManager.sideStageApplications
3232
33+ property alias searchHistory: scopeView.searchHistory
34+
3335 ListModel {
3436 id: dummyVisibilityModifier
3537
Dash/DashContent.qml+2−1
@@ -27,6 +27,7 @@ Item {
2727 property alias currentIndex: dashContentList.currentIndex
2828
2929 property ScopeDelegateMapper scopeMapper : ScopeDelegateMapper {}
30+ property ListModel searchHistory
3031
3132 signal movementStarted()
3233 signal movementEnded()
@@ -127,7 +128,7 @@ Item {
127128 onLoaded: {
128129 item.scope = Qt.binding(function() { return scope })
129130 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 })
131132 dashContentList.movementStarted.connect(item.movementStarted)
132133 dashContent.positionedAtBeginning.connect(item.positionedAtBeginning)
133134 dashContent.scopeLoaded(item.scope.id)
Dash/GenericScopeView.qml+4
@@ -21,6 +21,9 @@ import "../Components/ListItems" as ListItems
2121
2222ScopeView {
2323 id: scopeView
24+
25+ property ListModel searchHistory
26+
2427 readonly property alias previewShown: previewListView.onScreen
2528 property bool enableHeightBehaviorOnNextCreation: false
2629
@@ -248,6 +251,7 @@ ScopeView {
248251 text: scopeView.scope.name
249252 searchEntryEnabled: true
250253 scope: scopeView.scope
254+ searchHistory: scopeView.searchHistory
251255 }
252256 }
253257
Shell.qml−2
@@ -62,8 +62,6 @@ FocusScope {
6262 }
6363 }
6464
65− property ListModel searchHistory: SearchHistoryModel {}
66−
6765 property var applicationManager: ApplicationManagerWrapper {}
6866
6967 Binding {