1
mirror of https://github.com/monero-project/monero-gui synced 2024-11-24 11:17:15 +01:00

StandardDropdown: drop Qt 5.8 workaround

This commit is contained in:
xiphon 2020-05-01 12:22:49 +00:00
parent 7536e922e9
commit 4354a76df9
6 changed files with 4 additions and 33 deletions

View File

@ -58,11 +58,6 @@ Item {
onExpandedChanged: if(expanded) appWindow.currentItem = dropdown
// Workaroud for suspected memory leak in 5.8 causing malloc crash on app exit
function update() {
firstColText.text = columnid.currentIndex < repeater.model.rowCount() ? qsTr(repeater.model.get(columnid.currentIndex).column1) + translationManager.emptyString : ""
}
Item {
id: head
anchors.left: parent.left
@ -80,7 +75,6 @@ Item {
}
MoneroComponents.TextPlain {
id: firstColText
anchors.verticalCenter: parent.verticalCenter
anchors.left: parent.left
anchors.leftMargin: 12
@ -91,6 +85,7 @@ Item {
font.bold: dropdown.headerFontBold
font.pixelSize: dropdown.fontHeaderSize
color: dropdown.textColor
text: columnid.currentIndex < repeater.model.count ? qsTr(repeater.model.get(columnid.currentIndex).column1) + translationManager.emptyString : ""
}
Item {
@ -217,7 +212,6 @@ Item {
popup.close()
columnid.currentIndex = index
changed();
dropdown.update()
}
}
}

View File

@ -118,7 +118,6 @@ Rectangle {
amountLine.text = ""
setDescription("");
priorityDropdown.currentIndex = 0
updatePriorityDropdown()
}
// Information dialog
@ -397,6 +396,7 @@ Rectangle {
id: priorityDropdown
Layout.topMargin: 5
currentIndex: 0
dataModel: priorityModelV5
}
}
}
@ -745,12 +745,6 @@ Rectangle {
function onPageCompleted() {
console.log("transfer page loaded")
updateStatus();
updatePriorityDropdown()
}
function updatePriorityDropdown() {
priorityDropdown.dataModel = priorityModelV5;
priorityDropdown.update()
}
//TODO: Add daemon sync status

View File

@ -196,6 +196,7 @@ Rectangle {
MoneroComponents.StandardDropdown {
id: fiatPriceCurrencyDropdown
Layout.fillWidth: true
currentIndex: persistentSettings.fiatPriceCurrency === "xmrusd" ? 0 : 1
dataModel: fiatPriceCurrencyModel
onChanged: {
var obj = dataModel.get(currentIndex);
@ -281,10 +282,6 @@ Rectangle {
i += 1;
}
fiatPriceProviderDropDown.update();
fiatPriceCurrencyDropdown.currentIndex = persistentSettings.fiatPriceCurrency === "xmrusd" ? 0 : 1;
fiatPriceCurrencyDropdown.update();
console.log('SettingsLayout loaded');
}
}

View File

@ -231,9 +231,6 @@ Rectangle {
}
Component.onCompleted: {
logLevelDropdown.currentIndex = appWindow.persistentSettings.logLevel;
logLevelDropdown.update();
if(typeof daemonManager != "undefined")
daemonManager.daemonConsoleUpdated.connect(onDaemonConsoleUpdated)
}

View File

@ -53,11 +53,6 @@ Rectangle {
ListElement { column1: "Trezor Model T"; column2: "Trezor";}
}
function update(){
// update device dropdown
deviceNameDropdown.update();
}
ColumnLayout {
id: pageRoot
Layout.alignment: Qt.AlignHCenter;
@ -208,8 +203,6 @@ Rectangle {
Component.onCompleted: {
errorMsg.text = "";
wizardCreateDevice1.update();
console.log()
}
function onPageCompleted(previousView){

View File

@ -191,6 +191,7 @@ Rectangle {
MoneroComponents.StandardDropdown {
id: networkTypeDropdown
currentIndex: persistentSettings.nettype
dataModel: networkTypeModel
Layout.fillWidth: true
Layout.maximumWidth: 180
@ -244,11 +245,6 @@ Rectangle {
}
}
Component.onCompleted: {
networkTypeDropdown.currentIndex = persistentSettings.nettype;
networkTypeDropdown.update();
}
function onPageCompleted(){
wizardController.walletOptionsIsRecoveringFromDevice = false;
}