Use let instead of var
This commit is contained in:
@@ -66,7 +66,7 @@ Kirigami.Dialog {
|
|||||||
id: optionModel
|
id: optionModel
|
||||||
|
|
||||||
readonly property bool allValuesSet: {
|
readonly property bool allValuesSet: {
|
||||||
for( var i = 0; i < optionModel.rowCount(); i++ ) {
|
for (let i = 0; i < optionModel.rowCount(); i++) {
|
||||||
if (optionModel.get(i).optionText.length <= 0) {
|
if (optionModel.get(i).optionText.length <= 0) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -83,7 +83,7 @@ Kirigami.Dialog {
|
|||||||
|
|
||||||
function values() {
|
function values() {
|
||||||
let textValues = []
|
let textValues = []
|
||||||
for( var i = 0; i < optionModel.rowCount(); i++ ) {
|
for(let i = 0; i < optionModel.rowCount(); i++) {
|
||||||
textValues.push(optionModel.get(i).optionText);
|
textValues.push(optionModel.get(i).optionText);
|
||||||
}
|
}
|
||||||
return textValues;
|
return textValues;
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ Kirigami.Dialog {
|
|||||||
standardButtons: Kirigami.Dialog.Ok | Kirigami.Dialog.Cancel
|
standardButtons: Kirigami.Dialog.Ok | Kirigami.Dialog.Cancel
|
||||||
onAccepted: {
|
onAccepted: {
|
||||||
let ids = [];
|
let ids = [];
|
||||||
for (var i in spaceGroup.buttons) {
|
for (let i in spaceGroup.buttons) {
|
||||||
if (spaceGroup.buttons[i].checked) {
|
if (spaceGroup.buttons[i].checked) {
|
||||||
ids.push(spaceGroup.buttons[i].modelData.id);
|
ids.push(spaceGroup.buttons[i].modelData.id);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -126,7 +126,7 @@ KirigamiComponents.ConvergentContextMenu {
|
|||||||
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
if (emojiText.text === "⋮") {
|
if (emojiText.text === "⋮") {
|
||||||
var dialog = emojiDialog.createObject(emojiDelegate) as EmojiDialog;
|
let dialog = emojiDialog.createObject(emojiDelegate) as EmojiDialog;
|
||||||
dialog.showStickers = false;
|
dialog.showStickers = false;
|
||||||
dialog.chosen.connect(emoji => {
|
dialog.chosen.connect(emoji => {
|
||||||
root.room.toggleReaction(root.eventId, emoji);
|
root.room.toggleReaction(root.eventId, emoji);
|
||||||
|
|||||||
Reference in New Issue
Block a user