Changeset View
Changeset View
Standalone View
Standalone View
applets/systemtray/package/contents/ui/ConfigEntries.qml
Show First 20 Lines • Show All 182 Lines • ▼ Show 20 Line(s) | 182 | for (var i = 0; i < model.length; i++) { | |||
---|---|---|---|---|---|
183 | if (model[i].value === value) { | 183 | if (model[i].value === value) { | ||
184 | return i | 184 | return i | ||
185 | } | 185 | } | ||
186 | } | 186 | } | ||
187 | 187 | | |||
188 | return 0 | 188 | return 0 | ||
189 | } | 189 | } | ||
190 | 190 | | |||
191 | property var currentValue: model[currentIndex].value | 191 | property var myCurrentValue: model[currentIndex].value | ||
192 | 192 | | |||
193 | onActivated: { | 193 | onActivated: { | ||
194 | var shownIndex = cfg_shownItems.indexOf(itemId) | 194 | var shownIndex = cfg_shownItems.indexOf(itemId) | ||
195 | var hiddenIndex = cfg_hiddenItems.indexOf(itemId) | 195 | var hiddenIndex = cfg_hiddenItems.indexOf(itemId) | ||
196 | var extraIndex = cfg_extraItems.indexOf(itemId) | 196 | var extraIndex = cfg_extraItems.indexOf(itemId) | ||
197 | 197 | | |||
198 | switch (currentValue) { | 198 | switch (myCurrentValue) { | ||
kmaterka: Instead of removing `currentValue` change it's name. This property is used in `KeySequenceItem` | |||||
199 | case "auto": | 199 | case "auto": | ||
200 | if (shownIndex > -1) { | 200 | if (shownIndex > -1) { | ||
201 | cfg_shownItems.splice(shownIndex, 1) | 201 | cfg_shownItems.splice(shownIndex, 1) | ||
202 | } | 202 | } | ||
203 | if (hiddenIndex > -1) { | 203 | if (hiddenIndex > -1) { | ||
204 | cfg_hiddenItems.splice(hiddenIndex, 1) | 204 | cfg_hiddenItems.splice(hiddenIndex, 1) | ||
205 | } | 205 | } | ||
206 | if (extraIndex === -1) { | 206 | if (extraIndex === -1) { | ||
▲ Show 20 Lines • Show All 54 Lines • ▼ Show 20 Line(s) | |||||
261 | } | 261 | } | ||
262 | KQC.KeySequenceItem { | 262 | KQC.KeySequenceItem { | ||
263 | id: keySequenceItem | 263 | id: keySequenceItem | ||
264 | Layout.minimumWidth: itemsList.keySequenceColumnWidth | 264 | Layout.minimumWidth: itemsList.keySequenceColumnWidth | ||
265 | Layout.preferredWidth: itemsList.keySequenceColumnWidth | 265 | Layout.preferredWidth: itemsList.keySequenceColumnWidth | ||
266 | Component.onCompleted: itemsList.keySequenceColumnWidth = Math.max(implicitWidth, itemsList.keySequenceColumnWidth) | 266 | Component.onCompleted: itemsList.keySequenceColumnWidth = Math.max(implicitWidth, itemsList.keySequenceColumnWidth) | ||
267 | 267 | | |||
268 | visible: isPlasmoid | 268 | visible: isPlasmoid | ||
269 | enabled: visibilityComboBox.currentValue !== "disabled" | 269 | 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. | |||||
270 | keySequence: model.applet ? model.applet.globalShortcut : "" | 270 | keySequence: model.applet ? model.applet.globalShortcut : "" | ||
271 | onKeySequenceChanged: { | 271 | onKeySequenceChanged: { | ||
272 | if (model.applet && keySequence !== model.applet.globalShortcut) { | 272 | if (model.applet && keySequence !== model.applet.globalShortcut) { | ||
273 | model.applet.globalShortcut = keySequence | 273 | model.applet.globalShortcut = keySequence | ||
274 | 274 | | |||
275 | itemsList.keySequenceColumnWidth = Math.max(implicitWidth, itemsList.keySequenceColumnWidth) | 275 | itemsList.keySequenceColumnWidth = Math.max(implicitWidth, itemsList.keySequenceColumnWidth) | ||
276 | } | 276 | } | ||
277 | } | 277 | } | ||
Show All 12 Lines |
Instead of removing currentValue change it's name. This property is used in KeySequenceItem