diff options
Diffstat (limited to 'src/qt/optionsmodel.cpp')
-rw-r--r-- | src/qt/optionsmodel.cpp | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/src/qt/optionsmodel.cpp b/src/qt/optionsmodel.cpp index 6b1b4e3d8e..95efc58320 100644 --- a/src/qt/optionsmodel.cpp +++ b/src/qt/optionsmodel.cpp @@ -1,3 +1,7 @@ +#if defined(HAVE_CONFIG_H) +#include "bitcoin-config.h" +#endif + #include "optionsmodel.h" #include "bitcoinunits.h" @@ -89,7 +93,7 @@ bool OptionsModel::Upgrade() settings.setValue("bImportFinished", true); // Move settings from old wallet.dat (if any): - CWalletDB walletdb("wallet.dat"); + CWalletDB walletdb(strWalletFile); QList<QString> intOptions; intOptions << "nDisplayUnit" << "nTransactionFee"; @@ -290,3 +294,14 @@ qint64 OptionsModel::getTransactionFee() { return nTransactionFee; } + +bool OptionsModel::getProxySettings(QString& proxyIP, quint16 &proxyPort) const +{ + std::string proxy = GetArg("-proxy", ""); + if (proxy.empty()) return false; + + CService addrProxy(proxy); + proxyIP = QString(addrProxy.ToStringIP().c_str()); + proxyPort = addrProxy.GetPort(); + return true; +} |