fix: workaround to crash on startup with Qt 5.15.11
the most recent Qt upstream version introduced a regression that causes our app to crash right on startup when a grouped property is assigned to inside a `PropertyChanges` handler upstream issue: https://bugreports.qt.io/browse/QTBUG-107795 Upstream fix will be released with Qt 5.15.12, code being at https://codereview.qt-project.org/c/qt/qtdeclarative/+/424702
This commit is contained in:
parent
90cfc0842a
commit
81d99c44e9
|
@ -287,6 +287,13 @@ Rectangle {
|
||||||
bottomPadding: 0
|
bottomPadding: 0
|
||||||
leftPadding: 8
|
leftPadding: 8
|
||||||
rightPadding: 5
|
rightPadding: 5
|
||||||
|
input.edit.color: { // crash workaround, https://bugreports.qt.io/browse/QTBUG-107795
|
||||||
|
if (root.state === "error")
|
||||||
|
return Theme.palette.dangerColor1
|
||||||
|
if (root.locked)
|
||||||
|
return Theme.palette.directColor5
|
||||||
|
return Theme.palette.directColor1
|
||||||
|
}
|
||||||
input.edit.font.pixelSize: 13
|
input.edit.font.pixelSize: 13
|
||||||
input.edit.readOnly: disabled
|
input.edit.readOnly: disabled
|
||||||
input.background.radius: 4
|
input.background.radius: 4
|
||||||
|
@ -319,7 +326,7 @@ Rectangle {
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
text: root.preCalculatedAdvancedText
|
text: root.preCalculatedAdvancedText
|
||||||
onTextChanged: waitTimer.restart()
|
onTextChanged: waitTimer.restart()
|
||||||
Timer {
|
Timer {
|
||||||
id: waitTimer
|
id: waitTimer
|
||||||
interval: lockTimeout
|
interval: lockTimeout
|
||||||
|
@ -393,7 +400,7 @@ Rectangle {
|
||||||
PropertyChanges {
|
PropertyChanges {
|
||||||
target: secondaryLabel
|
target: secondaryLabel
|
||||||
text: disabled ? sensor.containsMouse ? root.enableText : disabledText : secondaryText
|
text: disabled ? sensor.containsMouse ? root.enableText : disabledText : secondaryText
|
||||||
}
|
}
|
||||||
PropertyChanges {
|
PropertyChanges {
|
||||||
target: secondaryLabel
|
target: secondaryLabel
|
||||||
font.weight: disabled && sensor.containsMouse ? Font.Medium : Font.Normal
|
font.weight: disabled && sensor.containsMouse ? Font.Medium : Font.Normal
|
||||||
|
@ -422,11 +429,6 @@ Rectangle {
|
||||||
target: advancedInput
|
target: advancedInput
|
||||||
visible: advancedMode
|
visible: advancedMode
|
||||||
}
|
}
|
||||||
PropertyChanges {
|
|
||||||
target: advancedInput
|
|
||||||
input.edit.color: input.edit.activeFocus || !root.locked ?
|
|
||||||
Theme.palette.directColor1 : Theme.palette.directColor5
|
|
||||||
}
|
|
||||||
PropertyChanges {
|
PropertyChanges {
|
||||||
target: basicInput
|
target: basicInput
|
||||||
visible: !advancedMode && !(root.loading && !disabled)
|
visible: !advancedMode && !(root.loading && !disabled)
|
||||||
|
@ -496,10 +498,6 @@ Rectangle {
|
||||||
target: advancedInput
|
target: advancedInput
|
||||||
visible: advancedMode
|
visible: advancedMode
|
||||||
}
|
}
|
||||||
PropertyChanges {
|
|
||||||
target: advancedInput
|
|
||||||
input.edit.color: Theme.palette.dangerColor1
|
|
||||||
}
|
|
||||||
PropertyChanges {
|
PropertyChanges {
|
||||||
target: basicInput
|
target: basicInput
|
||||||
visible: !advancedMode && !(root.loading && !disabled)
|
visible: !advancedMode && !(root.loading && !disabled)
|
||||||
|
@ -569,10 +567,6 @@ Rectangle {
|
||||||
target: advancedInput
|
target: advancedInput
|
||||||
visible: advancedMode
|
visible: advancedMode
|
||||||
}
|
}
|
||||||
PropertyChanges {
|
|
||||||
target: advancedInput
|
|
||||||
input.edit.color: root.locked ? Theme.palette.directColor5 : Theme.palette.directColor1
|
|
||||||
}
|
|
||||||
PropertyChanges {
|
PropertyChanges {
|
||||||
target: basicInput
|
target: basicInput
|
||||||
visible: !advancedMode && !(root.loading && !disabled)
|
visible: !advancedMode && !(root.loading && !disabled)
|
||||||
|
@ -640,10 +634,6 @@ Rectangle {
|
||||||
target: advancedInput
|
target: advancedInput
|
||||||
visible: false
|
visible: false
|
||||||
}
|
}
|
||||||
PropertyChanges {
|
|
||||||
target: advancedInput
|
|
||||||
input.edit.color: Theme.palette.directColor1
|
|
||||||
}
|
|
||||||
PropertyChanges {
|
PropertyChanges {
|
||||||
target: basicInput
|
target: basicInput
|
||||||
visible: true
|
visible: true
|
||||||
|
@ -653,4 +643,5 @@ Rectangle {
|
||||||
active: false
|
active: false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]}
|
]
|
||||||
|
}
|
||||||
|
|
|
@ -22,7 +22,7 @@ Item {
|
||||||
property var selectedAccount
|
property var selectedAccount
|
||||||
property string ensAddressOrEmpty: ""
|
property string ensAddressOrEmpty: ""
|
||||||
property var selectedAsset
|
property var selectedAsset
|
||||||
property var amountToSend
|
property double amountToSend
|
||||||
property int minSendCryptoDecimals: 0
|
property int minSendCryptoDecimals: 0
|
||||||
property int minReceiveCryptoDecimals: 0
|
property int minReceiveCryptoDecimals: 0
|
||||||
property bool isLoading: false
|
property bool isLoading: false
|
||||||
|
@ -39,7 +39,7 @@ Item {
|
||||||
QtObject {
|
QtObject {
|
||||||
id: d
|
id: d
|
||||||
readonly property int backgroundRectRadius: 13
|
readonly property int backgroundRectRadius: 13
|
||||||
readonly property string backgroundRectColor: Theme.palette.indirectColor1
|
readonly property color backgroundRectColor: Theme.palette.indirectColor1
|
||||||
}
|
}
|
||||||
|
|
||||||
StatusSwitchTabBar {
|
StatusSwitchTabBar {
|
||||||
|
|
Loading…
Reference in New Issue