aboutsummaryrefslogtreecommitdiff
path: root/src/qt/optionsmodel.cpp
diff options
context:
space:
mode:
authorPieter Wuille <pieter.wuille@gmail.com>2012-02-25 20:59:18 +0100
committerPieter Wuille <pieter.wuille@gmail.com>2012-02-25 21:13:34 +0100
commit4a10d4c6dcd04eb2496257754782150793ce53b1 (patch)
tree1c4f182b1e73d13d48f3eca8cb3b72c4fa0bb97e /src/qt/optionsmodel.cpp
parentda9ab62fb7cfa3fa36eb81ce2503685a45c5d346 (diff)
Fix addrProxy setting
Before 0.6 addrProxy was a CAddress, but netbase changed it to CService. Retain compatibility by wrapping/unwrapping with a CAddress when saving or loading. This commit retains compatibility with 0.6.0rc1 (which wrote the setting as a CService) by trying to parse twice.
Diffstat (limited to 'src/qt/optionsmodel.cpp')
-rw-r--r--src/qt/optionsmodel.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/qt/optionsmodel.cpp b/src/qt/optionsmodel.cpp
index edc1d61e9d..dd69093897 100644
--- a/src/qt/optionsmodel.cpp
+++ b/src/qt/optionsmodel.cpp
@@ -91,7 +91,7 @@ bool OptionsModel::setData(const QModelIndex & index, const QVariant & value, in
if (addr.IsValid())
{
addrProxy.SetIP(addr);
- walletdb.WriteSetting("addrProxy", addrProxy);
+ walletdb.WriteSetting("addrProxy", CAddress(addrProxy));
}
else
{
@@ -105,7 +105,7 @@ bool OptionsModel::setData(const QModelIndex & index, const QVariant & value, in
if (nPort > 0 && nPort < std::numeric_limits<unsigned short>::max())
{
addrProxy.SetPort(nPort);
- walletdb.WriteSetting("addrProxy", addrProxy);
+ walletdb.WriteSetting("addrProxy", CAddress(addrProxy));
}
else
{