mirror of
https://github.com/monero-project/monero-gui.git
synced 2025-01-18 23:53:41 +02:00
fix Qt 5.8 crash on app exit bug in StandardDialog
This commit is contained in:
parent
d437b98a12
commit
1c7f529141
@ -38,6 +38,9 @@ Item {
|
||||
property string textColor: "#FFFFFF"
|
||||
property alias currentIndex: column.currentIndex
|
||||
property bool expanded: false
|
||||
|
||||
signal changed();
|
||||
|
||||
height: 37 * scaleRatio
|
||||
|
||||
onExpandedChanged: if(expanded) appWindow.currentItem = dropdown
|
||||
@ -54,6 +57,12 @@ Item {
|
||||
return true
|
||||
}
|
||||
|
||||
// Workaroud for suspected memory leak in 5.8 causing malloc crash on app exit
|
||||
function update() {
|
||||
firstColText.text = column.currentIndex < repeater.model.rowCount() ? qsTr(repeater.model.get(column.currentIndex).column1) + translationManager.emptyString : ""
|
||||
secondColText.text = column.currentIndex < repeater.model.rowCount() ? qsTr(repeater.model.get(column.currentIndex).column2) + translationManager.emptyString : ""
|
||||
}
|
||||
|
||||
Item {
|
||||
id: head
|
||||
anchors.left: parent.left
|
||||
@ -107,7 +116,6 @@ Item {
|
||||
font.bold: true
|
||||
font.pixelSize: 12 * scaleRatio
|
||||
color: "#FFFFFF"
|
||||
text: column.currentIndex < repeater.model.rowCount() ? qsTr(repeater.model.get(column.currentIndex).column1) + translationManager.emptyString : ""
|
||||
}
|
||||
|
||||
Text {
|
||||
@ -119,8 +127,6 @@ Item {
|
||||
font.family: "Arial"
|
||||
font.pixelSize: 12 * scaleRatio
|
||||
color: "#FFFFFF"
|
||||
text: column.currentIndex < repeater.model.rowCount() ? qsTr(repeater.model.get(column.currentIndex).column2) + translationManager.emptyString : ""
|
||||
|
||||
property int w: 0
|
||||
Component.onCompleted: w = implicitWidth
|
||||
}
|
||||
@ -258,6 +264,8 @@ Item {
|
||||
onClicked: {
|
||||
dropdown.expanded = false
|
||||
column.currentIndex = index
|
||||
changed();
|
||||
dropdown.update()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user