Changeset View
Changeset View
Standalone View
Standalone View
applets/systemtray/package/contents/ui/ConfigEntries.qml
Show First 20 Lines • Show All 175 Lines • ▼ Show 20 Line(s) | 175 | for (var i = 0; i < model.length; i++) { | |||
---|---|---|---|---|---|
176 | if (model[i].value === value) { | 176 | if (model[i].value === value) { | ||
177 | return i | 177 | return i | ||
178 | } | 178 | } | ||
179 | } | 179 | } | ||
180 | 180 | | |||
181 | return 0 | 181 | return 0 | ||
182 | } | 182 | } | ||
183 | 183 | | |||
184 | property var currentValue: model[currentIndex].value | 184 | property var myCurrentValue: model[currentIndex].value | ||
185 | 185 | | |||
186 | onActivated: { | 186 | onActivated: { | ||
187 | var shownIndex = cfg_shownItems.indexOf(itemId) | 187 | var shownIndex = cfg_shownItems.indexOf(itemId) | ||
188 | var hiddenIndex = cfg_hiddenItems.indexOf(itemId) | 188 | var hiddenIndex = cfg_hiddenItems.indexOf(itemId) | ||
189 | var extraIndex = cfg_extraItems.indexOf(itemId) | 189 | var extraIndex = cfg_extraItems.indexOf(itemId) | ||
190 | 190 | | |||
191 | switch (currentValue) { | 191 | switch (myCurrentValue) { | ||
kmaterka: Instead of removing `currentValue` change it's name. This property is used in `KeySequenceItem` | |||||
192 | case "auto": | 192 | case "auto": | ||
193 | if (shownIndex > -1) { | 193 | if (shownIndex > -1) { | ||
194 | cfg_shownItems.splice(shownIndex, 1) | 194 | cfg_shownItems.splice(shownIndex, 1) | ||
195 | } | 195 | } | ||
196 | if (hiddenIndex > -1) { | 196 | if (hiddenIndex > -1) { | ||
197 | cfg_hiddenItems.splice(hiddenIndex, 1) | 197 | cfg_hiddenItems.splice(hiddenIndex, 1) | ||
198 | } | 198 | } | ||
199 | if (extraIndex === -1) { | 199 | if (extraIndex === -1) { | ||
▲ Show 20 Lines • Show All 54 Lines • ▼ Show 20 Line(s) | |||||
254 | } | 254 | } | ||
255 | KQC.KeySequenceItem { | 255 | KQC.KeySequenceItem { | ||
256 | id: keySequenceItem | 256 | id: keySequenceItem | ||
257 | Layout.minimumWidth: itemsList.keySequenceColumnWidth | 257 | Layout.minimumWidth: itemsList.keySequenceColumnWidth | ||
258 | Layout.preferredWidth: itemsList.keySequenceColumnWidth | 258 | Layout.preferredWidth: itemsList.keySequenceColumnWidth | ||
259 | Component.onCompleted: itemsList.keySequenceColumnWidth = Math.max(implicitWidth, itemsList.keySequenceColumnWidth) | 259 | Component.onCompleted: itemsList.keySequenceColumnWidth = Math.max(implicitWidth, itemsList.keySequenceColumnWidth) | ||
260 | 260 | | |||
261 | visible: isPlasmoid | 261 | visible: isPlasmoid | ||
262 | enabled: visibilityComboBox.currentValue !== "disabled" | 262 | enabled: visibilityComboBox.myCurrentValue !== "disabled" | ||
I won't work in Qt =< 5.13. Just rename currentValue to something not-conflicting. kmaterka: I won't work in Qt =< 5.13. Just rename `currentValue` to something not-conflicting. | |||||
263 | keySequence: model.applet ? model.applet.globalShortcut : "" | 263 | keySequence: model.applet ? model.applet.globalShortcut : "" | ||
264 | onKeySequenceChanged: { | 264 | onKeySequenceChanged: { | ||
265 | if (model.applet && keySequence !== model.applet.globalShortcut) { | 265 | if (model.applet && keySequence !== model.applet.globalShortcut) { | ||
266 | model.applet.globalShortcut = keySequence | 266 | model.applet.globalShortcut = keySequence | ||
267 | 267 | | |||
268 | itemsList.keySequenceColumnWidth = Math.max(implicitWidth, itemsList.keySequenceColumnWidth) | 268 | itemsList.keySequenceColumnWidth = Math.max(implicitWidth, itemsList.keySequenceColumnWidth) | ||
269 | } | 269 | } | ||
270 | } | 270 | } | ||
Show All 12 Lines |
Instead of removing currentValue change it's name. This property is used in KeySequenceItem