Fix qml warnings in RoomAdvancedPage
This commit is contained in:
@@ -9,7 +9,6 @@ import QtQuick.Window
|
||||
|
||||
import org.kde.kirigami as Kirigami
|
||||
import org.kde.kirigamiaddons.formcard as FormCard
|
||||
import org.kde.kirigamiaddons.labs.components as KirigamiComponents
|
||||
|
||||
import org.kde.neochat
|
||||
|
||||
@@ -26,7 +25,7 @@ FormCard.FormCardPage {
|
||||
FormCard.FormTextDelegate {
|
||||
id: roomIdDelegate
|
||||
text: i18nc("@info:label", "Room ID")
|
||||
description: room.id
|
||||
description: root.room.id
|
||||
|
||||
contentItem.children: QQC2.Button {
|
||||
visible: roomIdDelegate.hovered
|
||||
@@ -35,7 +34,7 @@ FormCard.FormCardPage {
|
||||
display: QQC2.AbstractButton.IconOnly
|
||||
|
||||
onClicked: {
|
||||
Clipboard.saveText(room.id);
|
||||
Clipboard.saveText(root.room.id);
|
||||
}
|
||||
|
||||
QQC2.ToolTip.text: text
|
||||
@@ -45,17 +44,17 @@ FormCard.FormCardPage {
|
||||
}
|
||||
FormCard.FormTextDelegate {
|
||||
text: i18nc("@info:label", "Room Version")
|
||||
description: room.version
|
||||
description: root.room.version
|
||||
|
||||
contentItem.children: QQC2.Button {
|
||||
visible: room.canSwitchVersions()
|
||||
enabled: room.version < room.maxRoomVersion
|
||||
visible: root.room.canSwitchVersions()
|
||||
enabled: root.room.version < root.room.maxRoomVersion
|
||||
text: i18nc("@action:button", "Upgrade Room")
|
||||
icon.name: "arrow-up-double"
|
||||
|
||||
onClicked: {
|
||||
if (room.canSwitchVersions()) {
|
||||
roomUpgradeDialog.currentRoomVersion = room.version;
|
||||
if (root.room.canSwitchVersions()) {
|
||||
roomUpgradeDialog.currentRoomVersion = root.room.version;
|
||||
roomUpgradeDialog.open();
|
||||
}
|
||||
}
|
||||
@@ -80,9 +79,9 @@ FormCard.FormCardPage {
|
||||
FormCard.FormSpinBoxDelegate {
|
||||
id: spinBox
|
||||
label: i18nc("@label:spinbox", "Select new version")
|
||||
from: room.version
|
||||
to: room.maxRoomVersion
|
||||
value: room.version
|
||||
from: root.room.version
|
||||
to: root.room.maxRoomVersion
|
||||
value: root.room.version
|
||||
}
|
||||
}
|
||||
customFooterActions: [
|
||||
@@ -90,7 +89,7 @@ FormCard.FormCardPage {
|
||||
text: i18nc("@action:button", "Confirm")
|
||||
icon.name: "dialog-ok"
|
||||
onTriggered: {
|
||||
room.switchVersion(spinBox.value);
|
||||
root.room.switchVersion(spinBox.value);
|
||||
roomUpgradeDialog.close();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user