Skip to content

Commit f8b54a8

Browse files
committed
qml: Set OptionQmlModel initial property values
1 parent b6bf91f commit f8b54a8

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/qml/models/options_model.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
#include <common/settings.h>
99
#include <common/system.h>
1010
#include <interfaces/node.h>
11+
#include <mapport.h>
1112
#include <qt/guiconstants.h>
1213
#include <qt/optionsmodel.h>
1314
#include <txdb.h>
@@ -21,11 +22,19 @@ OptionsQmlModel::OptionsQmlModel(interfaces::Node& node)
2122
{
2223
m_dbcache_size_mib = SettingToInt(m_node.getPersistentSetting("dbcache"), nDefaultDbCache);
2324

25+
m_listen = SettingToBool(m_node.getPersistentSetting("listen"), DEFAULT_LISTEN);
26+
27+
m_natpmp = SettingToBool(m_node.getPersistentSetting("natpmp"), DEFAULT_NATPMP);
28+
2429
int64_t prune_value{SettingToInt(m_node.getPersistentSetting("prune"), 0)};
2530
m_prune = (prune_value > 1);
2631
m_prune_size_gb = m_prune ? PruneMiBtoGB(prune_value) : DEFAULT_PRUNE_TARGET_GB;
2732

2833
m_script_threads = SettingToInt(m_node.getPersistentSetting("par"), DEFAULT_SCRIPTCHECK_THREADS);
34+
35+
m_server = SettingToBool(m_node.getPersistentSetting("server"), false);
36+
37+
m_upnp = SettingToBool(m_node.getPersistentSetting("upnp"), DEFAULT_UPNP);
2938
}
3039

3140
void OptionsQmlModel::setDbcacheSizeMiB(int new_dbcache_size_mib)

0 commit comments

Comments
 (0)