aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorxiphon <xiphon@protonmail.com>2020-05-01 12:22:49 +0000
committerxiphon <xiphon@protonmail.com>2020-05-07 21:55:44 +0000
commit4354a76df94c26f2298380eb657712dc3e06b470 (patch)
tree4e0bc611d28f84c07b3a96fe8e78b1bd1cb735d4
parent7536e922e916150497162f8becca88738a02da9e (diff)
downloadmonzero-gui-4354a76df94c26f2298380eb657712dc3e06b470.tar.gz
monzero-gui-4354a76df94c26f2298380eb657712dc3e06b470.tar.xz
monzero-gui-4354a76df94c26f2298380eb657712dc3e06b470.zip
StandardDropdown: drop Qt 5.8 workaround
-rw-r--r--components/StandardDropdown.qml8
-rw-r--r--pages/Transfer.qml8
-rw-r--r--pages/settings/SettingsLayout.qml5
-rw-r--r--pages/settings/SettingsLog.qml3
-rw-r--r--wizard/WizardCreateDevice1.qml7
-rw-r--r--wizard/WizardHome.qml6
6 files changed, 4 insertions, 33 deletions
diff --git a/components/StandardDropdown.qml b/components/StandardDropdown.qml
index ad7da891..dfe37a5d 100644
--- a/components/StandardDropdown.qml
+++ b/components/StandardDropdown.qml
@@ -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()
}
}
}
diff --git a/pages/Transfer.qml b/pages/Transfer.qml
index a44c61cf..3877db23 100644
--- a/pages/Transfer.qml
+++ b/pages/Transfer.qml
@@ -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
diff --git a/pages/settings/SettingsLayout.qml b/pages/settings/SettingsLayout.qml
index f6032e32..af00f024 100644
--- a/pages/settings/SettingsLayout.qml
+++ b/pages/settings/SettingsLayout.qml
@@ -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');
}
}
diff --git a/pages/settings/SettingsLog.qml b/pages/settings/SettingsLog.qml
index cd7b35c3..3e41cb01 100644
--- a/pages/settings/SettingsLog.qml
+++ b/pages/settings/SettingsLog.qml
@@ -231,9 +231,6 @@ Rectangle {
}
Component.onCompleted: {
- logLevelDropdown.currentIndex = appWindow.persistentSettings.logLevel;
- logLevelDropdown.update();
-
if(typeof daemonManager != "undefined")
daemonManager.daemonConsoleUpdated.connect(onDaemonConsoleUpdated)
}
diff --git a/wizard/WizardCreateDevice1.qml b/wizard/WizardCreateDevice1.qml
index 4cc6640a..97623283 100644
--- a/wizard/WizardCreateDevice1.qml
+++ b/wizard/WizardCreateDevice1.qml
@@ -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){
diff --git a/wizard/WizardHome.qml b/wizard/WizardHome.qml
index 4d042a2a..589ec6c0 100644
--- a/wizard/WizardHome.qml
+++ b/wizard/WizardHome.qml
@@ -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;
}