Fix some runtime qml warnings
This commit is contained in:
committed by
Joshua Goins
parent
a989ef42b2
commit
4155e9116a
@@ -31,7 +31,7 @@ Kirigami.Page {
|
||||
Keys.onReturnPressed: event => {
|
||||
if (event.modifiers & Qt.ControlModifier) {
|
||||
root.accepted(reason.text);
|
||||
root.closeDialog();
|
||||
root.Kirigami.PageStack.closeDialog();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -52,14 +52,14 @@ Kirigami.Page {
|
||||
QQC2.DialogButtonBox.buttonRole: QQC2.DialogButtonBox.AcceptRole
|
||||
onClicked: {
|
||||
root.accepted(reason.text);
|
||||
root.closeDialog();
|
||||
root.Kirigami.PageStack.closeDialog();
|
||||
}
|
||||
}
|
||||
QQC2.Button {
|
||||
icon.name: "dialog-cancel-symbolic"
|
||||
text: i18nc("@action", "Cancel")
|
||||
QQC2.DialogButtonBox.buttonRole: QQC2.DialogButtonBox.RejectRole
|
||||
onClicked: root.closeDialog()
|
||||
onClicked: root.Kirigami.PageStack.closeDialog()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -113,7 +113,7 @@ Kirigami.Page {
|
||||
}
|
||||
},
|
||||
Kirigami.Action {
|
||||
visible: Kirigami.Settings.isMobile || !(root.Kirigami.PageStack.pageStack as Kirigami.PageRow).wideMode
|
||||
visible: Kirigami.Settings.isMobile || !(root.Kirigami.PageStack.pageStack as Kirigami.PageRow)?.wideMode
|
||||
icon.name: "view-right-new"
|
||||
onTriggered: (root.QQC2.ApplicationWindow.window as Main).openRoomDrawer()
|
||||
}
|
||||
@@ -289,7 +289,7 @@ Kirigami.Page {
|
||||
|
||||
footer: Loader {
|
||||
id: chatBarLoader
|
||||
height: active ? (item as ChatBar).implicitHeight : 0
|
||||
height: active ? (item as ChatBar)?.implicitHeight : 0
|
||||
active: timelineViewLoader.active && !root.currentRoom.readOnly
|
||||
sourceComponent: ChatBar {
|
||||
id: chatBar
|
||||
|
||||
@@ -65,7 +65,7 @@ QQC2.Popup {
|
||||
padding: 2
|
||||
|
||||
implicitHeight: Kirigami.Units.gridUnit * 20 + 2 * padding
|
||||
width: Math.min(contentItem.categoryIconSize * 11 + 2 * padding, QQC2.ApplicationWindow.window.width)
|
||||
width: Math.min(contentItem.categoryIconSize * 11 + 2 * padding, QQC2.ApplicationWindow.window?.width)
|
||||
contentItem: EmojiPicker {
|
||||
id: emojiPicker
|
||||
height: 400
|
||||
|
||||
@@ -55,7 +55,7 @@ RowLayout {
|
||||
QQC2.ToolButton {
|
||||
id: menuButton
|
||||
|
||||
property QQC2.Menu menuItem: undefined
|
||||
property QQC2.Menu menuItem: null
|
||||
|
||||
function openMenu(): void {
|
||||
if (!menuItem || !menuItem.visible) {
|
||||
@@ -69,7 +69,7 @@ RowLayout {
|
||||
|
||||
Accessible.role: Accessible.ButtonMenu
|
||||
display: QQC2.AbstractButton.IconOnly
|
||||
down: pressed || menuItem.visible
|
||||
down: pressed || menuItem?.visible
|
||||
text: i18nc("@action:button", "Show Menu")
|
||||
icon.name: "application-menu-symbolic"
|
||||
|
||||
@@ -78,7 +78,7 @@ RowLayout {
|
||||
Keys.onEnterPressed: openMenu()
|
||||
Accessible.onPressAction: openMenu()
|
||||
|
||||
QQC2.ToolTip.visible: hovered && !menuItem.visible
|
||||
QQC2.ToolTip.visible: hovered && !menuItem?.visible
|
||||
QQC2.ToolTip.text: text
|
||||
QQC2.ToolTip.delay: Kirigami.Units.toolTipDelay
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user