on xenial help sign in
Simplify DashApps count/fake models
commitcbbcda3a2f44e6d323ce1705d404d546c553c0d5 authorAlbert Astals <albert.astals@canonical.com> dateWed 12 Feb 2014, 09:45 (13 years ago) parentb1ddcfb
1 file changed+1−17
qml/Dash/DashApps.qml+1−17
qml/Dash/DashApps.qml+1−17
@@ -29,25 +29,9 @@ GenericScopeView {
2929 property var mainStageApplicationsModel: shell.applicationManager.mainStageApplications
3030 property var sideStageApplicationModel: shell.applicationManager.sideStageApplications
3131
32− ListModel {
33− id: dummyVisibilityModifier
34−
35− ListElement { name: "running-apps" }
36− }
37−
38− SortFilterProxyModel {
39− id: runningApplicationsModel
40−
41− model: dummyVisibilityModifier
42− filterRole: 0
43− filterRegExp: invertMatch ? ((mainStageApplicationsModel.count === 0 &&
44− sideStageApplicationModel.count === 0) ? RegExp("running-apps") : RegExp("")) : RegExp("disabled")
45− invertMatch: scopeView.scope.searchQuery.length == 0
46− }
47−
4832 QtObject {
4933 id: countObject
50− property int count: runningApplicationsModel.count
34+ property int count: scopeView.scope.searchQuery.length == 0 ? (mainStageApplicationsModel.count + sideStageApplicationModel.count) : 0
5135 }
5236
5337 onScopeChanged: {