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