StandardDropdown: drop Qt 5.8 workaround

pull/7/head
xiphon 4 years ago
parent 7536e922e9
commit 4354a76df9

@ -58,11 +58,6 @@ Item {
onExpandedChanged: if(expanded) appWindow.currentItem = dropdown 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 { Item {
id: head id: head
anchors.left: parent.left anchors.left: parent.left
@ -80,7 +75,6 @@ Item {
} }
MoneroComponents.TextPlain { MoneroComponents.TextPlain {
id: firstColText
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
anchors.left: parent.left anchors.left: parent.left
anchors.leftMargin: 12 anchors.leftMargin: 12
@ -91,6 +85,7 @@ Item {
font.bold: dropdown.headerFontBold font.bold: dropdown.headerFontBold
font.pixelSize: dropdown.fontHeaderSize font.pixelSize: dropdown.fontHeaderSize
color: dropdown.textColor color: dropdown.textColor
text: columnid.currentIndex < repeater.model.count ? qsTr(repeater.model.get(columnid.currentIndex).column1) + translationManager.emptyString : ""
} }
Item { Item {
@ -217,7 +212,6 @@ Item {
popup.close() popup.close()
columnid.currentIndex = index columnid.currentIndex = index
changed(); changed();
dropdown.update()
} }
} }
} }

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

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

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

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

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