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