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
#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

@ -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

@ -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
}

@ -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

@ -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

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

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

@ -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")

@ -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")

@ -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")

@ -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();
}

@ -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();
}

@ -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
}

Loading…
Cancel
Save