Created
October 27, 2022 19:28
-
-
Save johnny9/0534358700749a8b5cb2008606d27cbc to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/src/qml/bitcoin.cpp b/src/qml/bitcoin.cpp | |
| index 8391161b3..837bf0c68 100644 | |
| --- a/src/qml/bitcoin.cpp | |
| +++ b/src/qml/bitcoin.cpp | |
| @@ -187,7 +187,7 @@ int QmlGuiMain(int argc, char* argv[]) | |
| engine.rootContext()->setContextProperty("nodeModel", &node_model); | |
| OptionsQmlModel options_model{*node}; | |
| - engine.rootContext()->setContextProperty("options", &options_model); | |
| + qmlRegisterSingletonInstance<OptionsQmlModel>("org.bitcoincore.qt", 1, 0, "OptionsModel", &options_model); | |
| #ifdef __ANDROID__ | |
| AppMode app_mode(AppMode::MOBILE); | |
| diff --git a/src/qml/components/StorageSettings.qml b/src/qml/components/StorageSettings.qml | |
| index 055184ce1..a845e90ce 100644 | |
| --- a/src/qml/components/StorageSettings.qml | |
| +++ b/src/qml/components/StorageSettings.qml | |
| @@ -6,6 +6,7 @@ import QtQuick 2.15 | |
| import QtQuick.Controls 2.15 | |
| import QtQuick.Layouts 1.15 | |
| import "../controls" | |
| +import org.bitcoincore.qt 1.0 | |
| ColumnLayout { | |
| spacing: 20 | |
| @@ -13,16 +14,16 @@ ColumnLayout { | |
| Layout.fillWidth: true | |
| header: qsTr("Store recent blocks only") | |
| actionItem: OptionSwitch { | |
| - checked: options.prune | |
| - onToggled: options.prune = checked | |
| + checked: OptionsModel.prune | |
| + onToggled: OptionsModel.prune = checked | |
| } | |
| } | |
| Setting { | |
| Layout.fillWidth: true | |
| header: qsTr("Storage limit") | |
| actionItem: ValueInput { | |
| - description: options.pruneSizeGB | |
| - onEditingFinished: options.pruneSizeGB = parseInt(text) | |
| + description: OptionsModel.pruneSizeGB | |
| + onEditingFinished: OptionsModel.pruneSizeGB = parseInt(text) | |
| } | |
| } | |
| Setting { |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment