Fix some unqualified access warnings

This commit is contained in:
Tobias Fella
2026-02-06 13:53:20 +01:00
parent 6a45e2532c
commit d5ec37e1af
7 changed files with 39 additions and 39 deletions

View File

@@ -16,7 +16,7 @@ Kirigami.PromptDialog {
customFooterActions: Kirigami.Action { customFooterActions: Kirigami.Action {
icon.name: "camera-video-symbolic" icon.name: "camera-video-symbolic"
text: hasExistingMeeting ? i18nc("@action:button Join the Jitsi meeting", "Join") : i18nc("@action:button Start a new Jitsi meeting", "Start") text: root.hasExistingMeeting ? i18nc("@action:button Join the Jitsi meeting", "Join") : i18nc("@action:button Start a new Jitsi meeting", "Start")
onTriggered: root.accept() onTriggered: root.accept()
} }
} }

View File

@@ -108,7 +108,7 @@ SearchPage {
id: _private id: _private
function openManualUserDialog(): void { function openManualUserDialog(): void {
let dialog = manualUserDialog.createObject(this, { let dialog = manualUserDialog.createObject(this, {
connection: root.connection connection: root.room.connection
}) as ManualUserDialog; }) as ManualUserDialog;
dialog.parent = root.Window.window.overlay; dialog.parent = root.Window.window.overlay;
dialog.accepted.connect(() => { dialog.accepted.connect(() => {

View File

@@ -70,7 +70,7 @@ ColumnLayout {
states: [ states: [
State { State {
name: "downloadedInstant" name: "downloadedInstant"
when: root.fileTransferInfo.completed && autoOpenFile when: root.fileTransferInfo.completed && root.autoOpenFile
PropertyChanges { PropertyChanges {
openButton.icon.name: "document-open" openButton.icon.name: "document-open"
@@ -84,7 +84,7 @@ ColumnLayout {
}, },
State { State {
name: "downloaded" name: "downloaded"
when: root.fileTransferInfo.completed && !autoOpenFile when: root.fileTransferInfo.completed && !root.autoOpenFile
PropertyChanges { PropertyChanges {
openButton.visible: false openButton.visible: false
@@ -138,7 +138,7 @@ ColumnLayout {
id: openButton id: openButton
icon.name: "document-open" icon.name: "document-open"
onClicked: { onClicked: {
autoOpenFile = true; root.autoOpenFile = true;
root.Message.room.downloadTempFile(root.eventId); root.Message.room.downloadTempFile(root.eventId);
} }
@@ -166,7 +166,7 @@ ColumnLayout {
onAccepted: { onAccepted: {
NeoChatConfig.lastSaveDirectory = currentFolder; NeoChatConfig.lastSaveDirectory = currentFolder;
NeoChatConfig.save(); NeoChatConfig.save();
if (autoOpenFile) { if (root.autoOpenFile) {
UrlHelper.copyTo(root.fileTransferInfo.localPath, selectedFile); UrlHelper.copyTo(root.fileTransferInfo.localPath, selectedFile);
} else { } else {
root.Message.room.download(root.eventId, selectedFile); root.Message.room.download(root.eventId, selectedFile);

View File

@@ -57,9 +57,9 @@ FormCard.FormCardPage {
FormCard.FormCheckDelegate { FormCard.FormCheckDelegate {
id: rejectInvitationsDelegate id: rejectInvitationsDelegate
text: i18nc("@option:check", "Reject invitations from unknown users") text: i18nc("@option:check", "Reject invitations from unknown users")
description: connection.canCheckMutualRooms ? i18nc("@info", "If enabled, NeoChat will reject invitations from users you don't share a room with.") : i18nc("@info", "Your server does not support this setting.") description: root.connection.canCheckMutualRooms ? i18nc("@info", "If enabled, NeoChat will reject invitations from users you don't share a room with.") : i18nc("@info", "Your server does not support this setting.")
checked: NeoChatConfig.rejectUnknownInvites checked: NeoChatConfig.rejectUnknownInvites
enabled: !NeoChatConfig.isRejectUnknownInvitesImmutable && connection.canCheckMutualRooms enabled: !NeoChatConfig.isRejectUnknownInvitesImmutable && root.connection.canCheckMutualRooms
onToggled: { onToggled: {
NeoChatConfig.rejectUnknownInvites = checked; NeoChatConfig.rejectUnknownInvites = checked;
NeoChatConfig.save(); NeoChatConfig.save();

View File

@@ -21,10 +21,10 @@ FormCard.FormCardPage {
FormCard.FormRadioDelegate { FormCard.FormRadioDelegate {
id: systemDefault id: systemDefault
text: i18n("System Default") text: i18n("System Default")
checked: currentType === 0 checked: root.currentType === 0
enabled: !NeoChatConfig.isProxyTypeImmutable enabled: !NeoChatConfig.isProxyTypeImmutable
onToggled: { onToggled: {
currentType = 0 root.currentType = 0
} }
} }
@@ -33,10 +33,10 @@ FormCard.FormCardPage {
FormCard.FormRadioDelegate { FormCard.FormRadioDelegate {
id:noProxy id:noProxy
text: i18n("No Proxy") text: i18n("No Proxy")
checked: currentType === 3 checked: root.currentType === 3
enabled: !Config.isProxyTypeImmutable enabled: !NeoChatConfig.isProxyTypeImmutable
onToggled: { onToggled: {
currentType = 3; root.currentType = 3;
} }
} }
@@ -45,10 +45,10 @@ FormCard.FormCardPage {
FormCard.FormRadioDelegate { FormCard.FormRadioDelegate {
id: http id: http
text: i18n("HTTP") text: i18n("HTTP")
checked: currentType === 1 checked: root.currentType === 1
enabled: !NeoChatConfig.isProxyTypeImmutable enabled: !NeoChatConfig.isProxyTypeImmutable
onToggled: { onToggled: {
currentType = 1 root.currentType = 1
} }
} }
@@ -57,10 +57,10 @@ FormCard.FormCardPage {
FormCard.FormRadioDelegate { FormCard.FormRadioDelegate {
id: socks5 id: socks5
text: i18n("Socks5") text: i18n("Socks5")
checked: currentType === 2 checked: root.currentType === 2
enabled: !NeoChatConfig.isProxyTypeImmutable enabled: !NeoChatConfig.isProxyTypeImmutable
onToggled: { onToggled: {
currentType = 2 root.currentType = 2
} }
} }
} }
@@ -71,7 +71,7 @@ FormCard.FormCardPage {
FormCard.FormCard { FormCard.FormCard {
// It makes no sense to configure proxy settings for "System Default" and "No Proxy" // It makes no sense to configure proxy settings for "System Default" and "No Proxy"
enabled: currentType !== 0 && currentType !== 3 enabled: root.currentType !== 0 && root.currentType !== 3
FormCard.FormTextFieldDelegate { FormCard.FormTextFieldDelegate {
id: hostField id: hostField
@@ -79,7 +79,7 @@ FormCard.FormCardPage {
text: NeoChatConfig.proxyHost text: NeoChatConfig.proxyHost
inputMethodHints: Qt.ImhUrlCharactersOnly inputMethodHints: Qt.ImhUrlCharactersOnly
onEditingFinished: { onEditingFinished: {
proxyConfigChanged = true root.proxyConfigChanged = true
} }
} }
FormCard.FormDelegateSeparator { below: hostField; above: portField } FormCard.FormDelegateSeparator { below: hostField; above: portField }
@@ -101,7 +101,7 @@ FormCard.FormCardPage {
return value // it will add a thousands separator if we don't do this, not sure why return value // it will add a thousands separator if we don't do this, not sure why
} }
onValueChanged: { onValueChanged: {
proxyConfigChanged = true root.proxyConfigChanged = true
} }
} }
} }
@@ -113,7 +113,7 @@ FormCard.FormCardPage {
text: NeoChatConfig.proxyUser text: NeoChatConfig.proxyUser
inputMethodHints: Qt.ImhUrlCharactersOnly inputMethodHints: Qt.ImhUrlCharactersOnly
onEditingFinished: { onEditingFinished: {
proxyConfigChanged = true root.proxyConfigChanged = true
} }
} }
FormCard.FormDelegateSeparator { below: userField; above: passwordField } FormCard.FormDelegateSeparator { below: userField; above: passwordField }
@@ -124,7 +124,7 @@ FormCard.FormCardPage {
echoMode: TextInput.Password echoMode: TextInput.Password
inputMethodHints: Qt.ImhUrlCharactersOnly inputMethodHints: Qt.ImhUrlCharactersOnly
onEditingFinished: { onEditingFinished: {
proxyConfigChanged = true root.proxyConfigChanged = true
} }
} }
} }
@@ -139,15 +139,15 @@ FormCard.FormCardPage {
QQC2.Button { QQC2.Button {
text: i18n("Apply") text: i18n("Apply")
icon.name: "dialog-ok-apply-symbolic" icon.name: "dialog-ok-apply-symbolic"
enabled: currentType !== NeoChatConfig.proxyType || proxyConfigChanged enabled: root.currentType !== NeoChatConfig.proxyType || root.proxyConfigChanged
onClicked: { onClicked: {
NeoChatConfig.proxyType = currentType; NeoChatConfig.proxyType = root.currentType;
NeoChatConfig.proxyHost = hostField.text; NeoChatConfig.proxyHost = hostField.text;
NeoChatConfig.proxyPort = portField.value; NeoChatConfig.proxyPort = portField.value;
NeoChatConfig.proxyUser = userField.text; NeoChatConfig.proxyUser = userField.text;
NeoChatConfig.proxyPassword = passwordField.text; NeoChatConfig.proxyPassword = passwordField.text;
NeoChatConfig.save(); NeoChatConfig.save();
proxyConfigChanged = false; root.proxyConfigChanged = false;
ProxyController.setApplicationProxy(); ProxyController.setApplicationProxy();
} }
} }

View File

@@ -30,37 +30,37 @@ FormCard.FormCardPage {
FormCard.FormRadioDelegate { FormCard.FormRadioDelegate {
icon.name: "globe" icon.name: "globe"
text: i18nc("As in the default notification setting", "Default Settings") text: i18nc("As in the default notification setting", "Default Settings")
checked: room.pushNotificationState === PushNotificationState.Default checked: root.room.pushNotificationState === PushNotificationState.Default
enabled: room.pushNotificationState !== PushNotificationState.Unknown enabled: root.room.pushNotificationState !== PushNotificationState.Unknown
onToggled: { onToggled: {
room.pushNotificationState = PushNotificationState.Default; root.room.pushNotificationState = PushNotificationState.Default;
} }
} }
FormCard.FormRadioDelegate { FormCard.FormRadioDelegate {
icon.name: "notifications" icon.name: "notifications"
text: i18nc("As in 'notify for all messages'", "All Messages") text: i18nc("As in 'notify for all messages'", "All Messages")
checked: room.pushNotificationState === PushNotificationState.All checked: root.room.pushNotificationState === PushNotificationState.All
enabled: room.pushNotificationState !== PushNotificationState.Unknown enabled: root.room.pushNotificationState !== PushNotificationState.Unknown
onToggled: { onToggled: {
room.pushNotificationState = PushNotificationState.All; root.room.pushNotificationState = PushNotificationState.All;
} }
} }
FormCard.FormRadioDelegate { FormCard.FormRadioDelegate {
icon.name: "im-user" icon.name: "im-user"
text: i18nc("As in 'notify when the user is mentioned or the message contains a set keyword'", "@Mentions and Keywords") text: i18nc("As in 'notify when the user is mentioned or the message contains a set keyword'", "@Mentions and Keywords")
checked: room.pushNotificationState === PushNotificationState.MentionKeyword checked: root.room.pushNotificationState === PushNotificationState.MentionKeyword
enabled: room.pushNotificationState !== PushNotificationState.Unknown enabled: root.room.pushNotificationState !== PushNotificationState.Unknown
onToggled: { onToggled: {
room.pushNotificationState = PushNotificationState.MentionKeyword; root.room.pushNotificationState = PushNotificationState.MentionKeyword;
} }
} }
FormCard.FormRadioDelegate { FormCard.FormRadioDelegate {
icon.name: "notifications-disabled" icon.name: "notifications-disabled"
text: i18nc("As in 'do not notify for any messages'", "None") text: i18nc("As in 'do not notify for any messages'", "None")
checked: room.pushNotificationState === PushNotificationState.Mute checked: root.room.pushNotificationState === PushNotificationState.Mute
enabled: room.pushNotificationState !== PushNotificationState.Unknown enabled: root.room.pushNotificationState !== PushNotificationState.Unknown
onToggled: { onToggled: {
room.pushNotificationState = PushNotificationState.Mute; root.room.pushNotificationState = PushNotificationState.Mute;
} }
} }
} }

View File

@@ -214,7 +214,7 @@ KirigamiComponents.ConvergentContextMenu {
width: Kirigami.Units.gridUnit * 25 width: Kirigami.Units.gridUnit * 25
}); });
dialog.accepted.connect(reason => { dialog.accepted.connect(reason => {
currentRoom.redactEvent(root.eventId, reason); root.room.redactEvent(root.eventId, reason);
}); });
} }
} }
@@ -340,7 +340,7 @@ KirigamiComponents.ConvergentContextMenu {
width: Kirigami.Units.gridUnit * 25 width: Kirigami.Units.gridUnit * 25
}); });
dialog.accepted.connect(reason => { dialog.accepted.connect(reason => {
currentRoom.reportEvent(root.eventId, reason); root.room.reportEvent(root.eventId, reason);
}); });
} }
} }