Enable even more qml linter warnings

This commit is contained in:
Nicolas Werner 2023-10-26 21:43:05 +02:00
parent d0c43eb872
commit 6fef6ad5f1
No known key found for this signature in database
GPG key ID: C8D75E610773F2D9
13 changed files with 30 additions and 36 deletions

View file

@ -36,32 +36,33 @@ ResourcePath=
#VarUsedBeforeDeclaration=warning
#WithStatement=warning
AccessSingletonViaObject=disable
AttachedPropertyReuse=disable
AccessSingletonViaObject=warning
AttachedPropertyReuse=warning
# https://bugreports.qt.io/browse/QTBUG-115439 -> set to disabled until Qt6.7
BadSignalHandlerParameters=disable
CompilerWarnings=disable
Deprecated=disable
DuplicatePropertyBinding=disable
DuplicatedName=disable
Deprecated=warning
DuplicatePropertyBinding=warning
DuplicatedName=warning
ImportFailure=disable
IncompatibleType=disable
InheritanceCycle=disable
InvalidLintDirective=disable
LintPluginWarnings=disable
IncompatibleType=warning
InheritanceCycle=warning
InvalidLintDirective=warning
LintPluginWarnings=warning
MissingProperty=disable
MissingType=disable
MultilineStrings=info
NonListProperty=disable
PrefixedImportType=disable
MultilineStrings=warning
NonListProperty=warning
PrefixedImportType=warning
PropertyAliasCycles=disable
ReadOnlyProperty=disable
RequiredProperty=disable
RestrictedType=disable
TopLevelComponent=disable
UncreatableType=disable
ReadOnlyProperty=warning
RequiredProperty=warning
RestrictedType=warning
TopLevelComponent=warning
UncreatableType=warning
UnqualifiedAccess=disable
UnresolvedType=disable
UnusedImports=info
UseProperFunction=disable
VarUsedBeforeDeclaration=disable
WithStatement=disable
UseProperFunction=warning
VarUsedBeforeDeclaration=warning
WithStatement=warning

View file

@ -45,14 +45,14 @@ Item {
Label {
Layout.fillWidth: true
Layout.margins: Nheko.paddingMedium
Layout.maximumWidth: (Overlay.overlay ? Overlay.overlay.width : 400) - Nheko.paddingMedium * 4
Layout.maximumWidth: (showRecoverKeyDialog.Overlay.overlay ? showRecoverKeyDialog.Overlay.overlay.width : 400) - Nheko.paddingMedium * 4
color: palette.text
text: qsTr("This is your recovery key. You will need it to restore access to your encrypted messages and verification keys. Keep this safe. Don't share it with anyone and don't lose it! Do not pass go! Do not collect $200!")
wrapMode: Text.Wrap
}
TextEdit {
Layout.alignment: Qt.AlignHCenter
Layout.maximumWidth: (Overlay.overlay ? Overlay.overlay.width : 400) - Nheko.paddingMedium * 4
Layout.maximumWidth: (showRecoverKeyDialog.Overlay.overlay ? showRecoverKeyDialog.Overlay.overlay.width : 400) - Nheko.paddingMedium * 4
color: palette.text
font.bold: true
horizontalAlignment: TextEdit.AlignHCenter

View file

@ -14,6 +14,7 @@ EventDelegateChooser {
required property bool isStateEvent
// qmllint disable required
EventDelegateChoice {
roleValues: [MtxEvent.TextMessage, MtxEvent.NoticeMessage, MtxEvent.ElementEffectMessage, MtxEvent.UnknownMessage,]
@ -258,4 +259,5 @@ EventDelegateChooser {
text: "Unsupported: " + typeString
}
}
// qmllint enable required
}

View file

@ -5,7 +5,6 @@
import QtQuick 2.5
import QtQuick 2.12
import QtQuick.Controls 2.12
import im.nheko 1.0
Switch {
id: toggleButton

View file

@ -5,7 +5,6 @@
import QtQuick 2.9
import QtQuick.Controls 2.3
import QtQuick.Layouts 1.2
import im.nheko 1.0
Item {
Layout.fillWidth: true

View file

@ -4,7 +4,6 @@
import QtQuick
import QtQml.Models
import im.nheko
Item {
id: root

View file

@ -4,7 +4,6 @@
import QtQuick 2.5
import QtQuick.Controls 2.1
import im.nheko 1.0
Label {
property bool isStateEvent

View file

@ -5,7 +5,6 @@
import QtQuick 2.3
import QtQuick.Controls 2.3
import QtQuick.Layouts 1.10
import im.nheko 1.0
ColumnLayout {
property string title: qsTr("Verification Code")

View file

@ -5,7 +5,6 @@
import QtQuick 2.3
import QtQuick.Controls 2.3
import QtQuick.Layouts 1.10
import im.nheko 1.0
ColumnLayout {
property string title: flow.sender ? qsTr("Send Verification Request") : qsTr("Received Verification Request")

View file

@ -5,7 +5,6 @@
import QtQuick 2.3
import QtQuick.Controls 2.3
import QtQuick.Layouts 1.10
import im.nheko 1.0
ColumnLayout {
property string title: qsTr("Successful Verification")

View file

@ -13,7 +13,7 @@ ApplicationWindow {
property alias prompt: promptLabel.text
property alias echoMode: statusInput.echoMode
property var onAccepted: undefined
signal accepted(text: string)
modality: Qt.NonModal
flags: Qt.Dialog
@ -55,8 +55,7 @@ ApplicationWindow {
standardButtons: DialogButtonBox.Ok | DialogButtonBox.Cancel
onAccepted: {
if (inputDialog.onAccepted)
inputDialog.onAccepted(statusInput.text);
inputDialog.accepted(statusInput.text);
inputDialog.close();
}

View file

@ -13,7 +13,7 @@ ApplicationWindow {
property alias prompt: promptLabel.text
property alias echoMode: statusInput.echoMode
property var onAccepted: undefined
signal accepted(countryCode: string, text: string)
modality: Qt.NonModal
flags: Qt.Dialog
@ -1729,8 +1729,7 @@ ApplicationWindow {
footer: DialogButtonBox {
standardButtons: DialogButtonBox.Ok | DialogButtonBox.Cancel
onAccepted: {
if (inputDialog.onAccepted)
inputDialog.onAccepted(numberPrefix.model.get(numberPrefix.currentIndex).i, statusInput.text);
inputDialog.accepted(numberPrefix.model.get(numberPrefix.currentIndex).i, statusInput.text);
inputDialog.close();
}

View file

@ -49,7 +49,7 @@ Popup {
contentItem: Label {
color: palette.light
width: Math.max(Overlay.overlay? Overlay.overlay.width/2 : 0, 400)
width: Math.max(snackbar.Overlay.overlay? snackbar.Overlay.overlay.width/2 : 0, 400)
text: snackbar.currentMessage
font.bold: true
}