diff options
| author | Wladimir J. van der Laan <[email protected]> | 2014-01-11 12:51:03 +0100 |
|---|---|---|
| committer | Wladimir J. van der Laan <[email protected]> | 2014-01-11 12:51:12 +0100 |
| commit | 061aff4c46babdc30bb9f52f874a24edd8d14d82 (patch) | |
| tree | 6a0820ae13a8131ce3a0e2e0acf3754089b88ba3 /src/qt/optionsmodel.cpp | |
| parent | Merge pull request #3493 (diff) | |
| parent | GUI for --disable-wallet compiles and -disablewallet mode (diff) | |
| download | discoin-061aff4c46babdc30bb9f52f874a24edd8d14d82.tar.xz discoin-061aff4c46babdc30bb9f52f874a24edd8d14d82.zip | |
Merge pull request #3392
b7f4b6d GUI for --disable-wallet compiles and -disablewallet mode (Wladimir J. van der Laan)
ec41342 build: pass correct defs and include path to moc (Wladimir J. van der Laan)
Diffstat (limited to 'src/qt/optionsmodel.cpp')
| -rw-r--r-- | src/qt/optionsmodel.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/qt/optionsmodel.cpp b/src/qt/optionsmodel.cpp index c7817a94a..1133c457b 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); |