diff options
author | Philip Kaufmann <phil.kaufmann@t-online.de> | 2014-02-18 12:48:16 +0100 |
---|---|---|
committer | Philip Kaufmann <phil.kaufmann@t-online.de> | 2014-03-27 11:54:13 +0100 |
commit | 5409404d7585d45b5d4a7142171f138c213e6e19 (patch) | |
tree | e04848a16e77aee270cd7bd5fe1c12f825860aac /src/qt/optionsmodel.cpp | |
parent | 77eaa6fc45ba7cda90ca7c1ed2374e488a553d2e (diff) |
add constant for shared (GUI/core) -par settings
- introduce DEFAULT_SCRIPTCHECK_THREADS in main.h
- only show values from -"MAX_HW_THREADS" up to 16 for -par, as it
makes no sense to try to leave more "cores free" than the system
supports anyway
- use the new constant in optionsdialog and remove defaults from
.ui file
Diffstat (limited to 'src/qt/optionsmodel.cpp')
-rw-r--r-- | src/qt/optionsmodel.cpp | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/src/qt/optionsmodel.cpp b/src/qt/optionsmodel.cpp index b61fdd2301..9abe9351bb 100644 --- a/src/qt/optionsmodel.cpp +++ b/src/qt/optionsmodel.cpp @@ -76,6 +76,17 @@ void OptionsModel::Init() // by command-line and show this in the UI. // Main + if (!settings.contains("nDatabaseCache")) + settings.setValue("nDatabaseCache", (qint64)nDefaultDbCache); + if (!SoftSetArg("-dbcache", settings.value("nDatabaseCache").toString().toStdString())) + addOverriddenOption("-dbcache"); + + if (!settings.contains("nThreadsScriptVerif")) + settings.setValue("nThreadsScriptVerif", DEFAULT_SCRIPTCHECK_THREADS); + if (!SoftSetArg("-par", settings.value("nThreadsScriptVerif").toString().toStdString())) + addOverriddenOption("-par"); + + // Wallet #ifdef ENABLE_WALLET if (!settings.contains("nTransactionFee")) settings.setValue("nTransactionFee", 0); @@ -89,16 +100,6 @@ void OptionsModel::Init() addOverriddenOption("-spendzeroconfchange"); #endif - if (!settings.contains("nDatabaseCache")) - settings.setValue("nDatabaseCache", (qint64)nDefaultDbCache); - if (!SoftSetArg("-dbcache", settings.value("nDatabaseCache").toString().toStdString())) - addOverriddenOption("-dbcache"); - - if (!settings.contains("nThreadsScriptVerif")) - settings.setValue("nThreadsScriptVerif", 0); - if (!SoftSetArg("-par", settings.value("nThreadsScriptVerif").toString().toStdString())) - addOverriddenOption("-par"); - // Network if (!settings.contains("fUseUPnP")) #ifdef USE_UPNP |