aboutsummaryrefslogtreecommitdiff
path: root/src/qt/optionsmodel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/qt/optionsmodel.cpp')
-rw-r--r--src/qt/optionsmodel.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/qt/optionsmodel.cpp b/src/qt/optionsmodel.cpp
index c7817a94a8..1133c457b3 100644
--- a/src/qt/optionsmodel.cpp
+++ b/src/qt/optionsmodel.cpp
@@ -14,8 +14,10 @@
#include "init.h"
#include "main.h"
#include "net.h"
+#ifdef ENABLE_WALLET
#include "wallet.h"
#include "walletdb.h"
+#endif
#include <QSettings>
#include <QStringList>
@@ -67,8 +69,10 @@ void OptionsModel::Init()
// by command-line and show this in the UI.
// Main
+#ifdef ENABLE_WALLET
if (!settings.contains("nTransactionFee"))
settings.setValue("nTransactionFee", 0);
+#endif
if (!settings.contains("nDatabaseCache"))
settings.setValue("nDatabaseCache", 25);
@@ -137,6 +141,7 @@ void OptionsModel::Upgrade()
settings.setValue("bImportFinished", true);
+#ifdef ENABLE_WALLET
// Move settings from old wallet.dat (if any):
CWalletDB walletdb(strWalletFile);
@@ -181,6 +186,7 @@ void OptionsModel::Upgrade()
walletdb.EraseSetting("addrProxy");
}
}
+#endif
Init();
}
@@ -227,6 +233,7 @@ QVariant OptionsModel::data(const QModelIndex & index, int role) const
case ProxySocksVersion:
return settings.value("nSocksVersion", 5);
+#ifdef ENABLE_WALLET
case Fee:
// Attention: Init() is called before nTransactionFee is set in AppInit2()!
// To ensure we can change the fee on-the-fly update our QSetting when
@@ -236,6 +243,7 @@ QVariant OptionsModel::data(const QModelIndex & index, int role) const
// Todo: Consider to revert back to use just nTransactionFee here, if we don't want
// -paytxfee to update our QSettings!
return settings.value("nTransactionFee");
+#endif
case DisplayUnit:
return nDisplayUnit;
case DisplayAddresses:
@@ -318,13 +326,14 @@ bool OptionsModel::setData(const QModelIndex & index, const QVariant & value, in
}
}
break;
-
+#ifdef ENABLE_WALLET
case Fee: // core option - can be changed on-the-fly
// Todo: Add is valid check and warn via message, if not
nTransactionFee = value.toLongLong();
settings.setValue("nTransactionFee", (qint64)nTransactionFee);
emit transactionFeeChanged(nTransactionFee);
break;
+#endif
case DisplayUnit:
nDisplayUnit = value.toInt();
settings.setValue("nDisplayUnit", nDisplayUnit);