mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-21 10:40:47 +03:00
Enable even more qml linter warnings
This commit is contained in:
parent
d0c43eb872
commit
6fef6ad5f1
13 changed files with 30 additions and 36 deletions
41
.qmllint.ini
41
.qmllint.ini
|
@ -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…
Reference in a new issue