Enable even more qml linter warnings

pull/1603/head
Nicolas Werner 1 year ago
parent d0c43eb872
commit 6fef6ad5f1
No known key found for this signature in database
GPG Key ID: C8D75E610773F2D9
  1. 41
      .qmllint.ini
  2. 4
      resources/qml/SelfVerificationCheck.qml
  3. 2
      resources/qml/TimelineEvent.qml
  4. 1
      resources/qml/ToggleButton.qml
  5. 1
      resources/qml/TypingIndicator.qml
  6. 1
      resources/qml/components/ReorderableListview.qml
  7. 1
      resources/qml/delegates/Pill.qml
  8. 1
      resources/qml/device-verification/DigitVerification.qml
  9. 1
      resources/qml/device-verification/NewVerificationRequest.qml
  10. 1
      resources/qml/device-verification/Success.qml
  11. 5
      resources/qml/dialogs/InputDialog.qml
  12. 5
      resources/qml/dialogs/PhoneNumberInputDialog.qml
  13. 2
      resources/qml/ui/Snackbar.qml

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

@ -45,14 +45,14 @@ Item {
Label { Label {
Layout.fillWidth: true Layout.fillWidth: true
Layout.margins: Nheko.paddingMedium 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 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!") 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 wrapMode: Text.Wrap
} }
TextEdit { TextEdit {
Layout.alignment: Qt.AlignHCenter 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 color: palette.text
font.bold: true font.bold: true
horizontalAlignment: TextEdit.AlignHCenter horizontalAlignment: TextEdit.AlignHCenter

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

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

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

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

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

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

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

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

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

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

@ -49,7 +49,7 @@ Popup {
contentItem: Label { contentItem: Label {
color: palette.light 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 text: snackbar.currentMessage
font.bold: true font.bold: true
} }

Loading…
Cancel
Save