summaryrefslogtreecommitdiffstats
path: root/framework/qml/View.qml
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2018-07-13 09:36:09 +0200
committerChristian Mollekopf <chrigi_1@fastmail.fm>2018-07-13 09:36:09 +0200
commit08e323af598896b422caab607893441a0387cc47 (patch)
treef45d46d17f83f640cf178807983d18d96d9d8ca0 /framework/qml/View.qml
parenteac3504ff1aadc5a1f2e5c57ed4abaa24130127c (diff)
downloadkube-08e323af598896b422caab607893441a0387cc47.tar.gz
kube-08e323af598896b422caab607893441a0387cc47.zip
Avoid warnings
Diffstat (limited to 'framework/qml/View.qml')
-rw-r--r--framework/qml/View.qml21
1 files changed, 13 insertions, 8 deletions
diff --git a/framework/qml/View.qml b/framework/qml/View.qml
index d74fb4c0..d8e32fab 100644
--- a/framework/qml/View.qml
+++ b/framework/qml/View.qml
@@ -27,7 +27,7 @@ FocusScope {
27 id: root 27 id: root
28 28
29 //Search 29 //Search
30 property rect searchArea: null 30 property rect searchArea
31 property string filter: "" 31 property string filter: ""
32 property var searchObject: null 32 property var searchObject: null
33 function triggerSearch() { 33 function triggerSearch() {
@@ -51,7 +51,7 @@ FocusScope {
51 } 51 }
52 52
53 //View columns 53 //View columns
54 property int visibleViews: 2 54 property int visibleViews: 0 //0 means the feature is disabled entirely
55 property int currentIndex: 0 55 property int currentIndex: 0
56 property int count: contentItems.length 56 property int count: contentItems.length
57 default property alias contentItems: content.data 57 default property alias contentItems: content.data
@@ -94,14 +94,19 @@ FocusScope {
94 } 94 }
95 95
96 function showRelevantSplits() { 96 function showRelevantSplits() {
97 if (!visibleViews) {
98 return
99 }
97 var i; 100 var i;
98 for (i = 0; i < count; i++) { 101 for (i = 0; i < count; i++) {
99 if (i < currentIndex) { 102 if ('visible' in contentItems[i]) {
100 contentItems[i].visible = false; 103 if (i < currentIndex) {
101 } else if (i > (currentIndex + visibleViews - 1)) { 104 contentItems[i].visible = false;
102 contentItems[i].visible = false; 105 } else if (i > (currentIndex + visibleViews - 1)) {
103 } else { 106 contentItems[i].visible = false;
104 contentItems[i].visible = true; 107 } else {
108 contentItems[i].visible = true;
109 }
105 } 110 }
106 } 111 }
107 112