Replace all ==/!= by ===/!==
This commit is contained in:
@@ -61,10 +61,10 @@ Rectangle {
|
||||
text: modelData.text
|
||||
icon.name: modelData.iconName || ""
|
||||
icon.color: modelData.iconColor || (
|
||||
name == "ok" || name == "apply" || name == "retry" ?
|
||||
name === "ok" || name === "apply" || name === "retry" ?
|
||||
theme.colors.positiveBackground :
|
||||
|
||||
name == "cancel" ?
|
||||
name === "cancel" ?
|
||||
theme.colors.negativeBackground :
|
||||
|
||||
theme.icons.colorize
|
||||
@@ -90,7 +90,7 @@ Rectangle {
|
||||
Keys.onEnterPressed: Keys.onReturnPressed(event)
|
||||
|
||||
Component.onCompleted:
|
||||
if (name == focusButton) forceActiveFocus()
|
||||
if (name === focusButton) forceActiveFocus()
|
||||
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredHeight: theme.baseElementsHeight
|
||||
|
@@ -52,7 +52,7 @@ Image {
|
||||
parent.height - theme.spacing * 2,
|
||||
theme.controls.image.maxPauseIndicatorSize,
|
||||
)
|
||||
scale: parent.status == Image.Ready && parent.paused ? 1 : 0
|
||||
scale: parent.status === Image.Ready && parent.paused ? 1 : 0
|
||||
|
||||
Behavior on scale { HScaleAnimator { overshoot: 4 } }
|
||||
}
|
||||
|
@@ -10,5 +10,5 @@ Label {
|
||||
color: theme.colors.text
|
||||
linkColor: theme.colors.link
|
||||
|
||||
maximumLineCount: elide == Label.ElideNone ? Number.MAX_VALUE : 1
|
||||
maximumLineCount: elide === Label.ElideNone ? Number.MAX_VALUE : 1
|
||||
}
|
||||
|
@@ -13,7 +13,7 @@ JsonListModel {
|
||||
let obj = JSON.parse(JSON.stringify(item))
|
||||
|
||||
for (let role in obj) {
|
||||
if (obj[role]["objectName"] != undefined) {
|
||||
if (obj[role]["objectName"] !== undefined) {
|
||||
obj[role] = toObject(item[role])
|
||||
}
|
||||
}
|
||||
|
@@ -3,5 +3,5 @@ import QtQuick 2.12
|
||||
Loader {
|
||||
id: loader
|
||||
asynchronous: true
|
||||
visible: status == Loader.Ready
|
||||
visible: status === Loader.Ready
|
||||
}
|
||||
|
@@ -32,7 +32,7 @@ HImage {
|
||||
if (! image) return // if it was destroyed
|
||||
|
||||
if (! isMxc) {
|
||||
if (source != mxc) source = mxc
|
||||
if (source !== mxc) source = mxc
|
||||
show = image.visible
|
||||
return
|
||||
}
|
||||
@@ -43,7 +43,7 @@ HImage {
|
||||
|
||||
py.callCoro("media_cache." + method, args, path => {
|
||||
if (! image) return
|
||||
if (image.cachedPath != path) image.cachedPath = path
|
||||
if (image.cachedPath !== path) image.cachedPath = path
|
||||
|
||||
image.broken = false
|
||||
image.show = image.visible
|
||||
|
@@ -1,7 +1,7 @@
|
||||
import QtQuick 2.12
|
||||
|
||||
HAvatar {
|
||||
name: displayName[0] == "#" && displayName.length > 1 ?
|
||||
name: displayName[0] === "#" && displayName.length > 1 ?
|
||||
displayName.substring(1) :
|
||||
displayName
|
||||
|
||||
|
@@ -54,7 +54,7 @@ TextEdit {
|
||||
var lastPos = container.selectionStartPosition
|
||||
}
|
||||
|
||||
if (first == index && last == index) {
|
||||
if (first === index && last === index) {
|
||||
select(
|
||||
label.positionAt(firstPos.x, firstPos.y),
|
||||
label.positionAt(lastPos.x, lastPos.y),
|
||||
@@ -65,10 +65,10 @@ TextEdit {
|
||||
{
|
||||
label.selectAll()
|
||||
|
||||
} else if (first == index) {
|
||||
} else if (first === index) {
|
||||
label.select(positionAt(firstPos.x, firstPos.y), length)
|
||||
|
||||
} else if (last == index) {
|
||||
} else if (last === index) {
|
||||
label.select(0, positionAt(lastPos.x, lastPos.y))
|
||||
|
||||
} else {
|
||||
@@ -121,8 +121,8 @@ TextEdit {
|
||||
TapHandler {
|
||||
acceptedButtons: Qt.LeftButton
|
||||
onTapped: {
|
||||
tapCount == 2 ? selectWordAt(eventPoint.position) :
|
||||
tapCount == 3 ? selectAllText() :
|
||||
tapCount === 2 ? selectWordAt(eventPoint.position) :
|
||||
tapCount === 3 ? selectAllText() :
|
||||
container.clearSelection()
|
||||
}
|
||||
}
|
||||
|
@@ -31,7 +31,7 @@ TabButton {
|
||||
readonly property alias label: contentItem.label
|
||||
|
||||
property color backgroundColor:
|
||||
TabBar.index % 2 == 0 ?
|
||||
TabBar.index % 2 === 0 ?
|
||||
theme.controls.tab.background : theme.controls.tab.alternateBackground
|
||||
|
||||
property bool loading: false
|
||||
|
@@ -154,7 +154,7 @@ HColumnLayout {
|
||||
boundPosition >= savedDuration - 500 ?
|
||||
"restart" :
|
||||
|
||||
media.playbackState == MediaPlayer.PlayingState ? "pause" :
|
||||
media.playbackState === MediaPlayer.PlayingState ? "pause" :
|
||||
|
||||
"play"
|
||||
|
||||
|
Reference in New Issue
Block a user