diff options
author | Cozz Lovan <cozzlovan@yahoo.com> | 2014-02-07 07:55:23 +0100 |
---|---|---|
committer | Cozz Lovan <cozzlovan@yahoo.com> | 2014-02-07 12:27:41 +0100 |
commit | 44eb59e4a65499b581f3dd65adb719b21dc73673 (patch) | |
tree | 85c2d23bcb2b107e994f1357804cc34e0579467f /src/qt/optionsmodel.cpp | |
parent | 1d0295e9d5273838ef2cd9134154551bdbbf3850 (diff) |
[Qt] remove broken OptionsModel::Upgrade()
Diffstat (limited to 'src/qt/optionsmodel.cpp')
-rw-r--r-- | src/qt/optionsmodel.cpp | 63 |
1 files changed, 0 insertions, 63 deletions
diff --git a/src/qt/optionsmodel.cpp b/src/qt/optionsmodel.cpp index c1dbd916b3..a2a2732b1c 100644 --- a/src/qt/optionsmodel.cpp +++ b/src/qt/optionsmodel.cpp @@ -130,69 +130,6 @@ void OptionsModel::Reset() // default setting for OptionsModel::StartAtStartup - disabled if (GUIUtil::GetStartOnSystemStartup()) GUIUtil::SetStartOnSystemStartup(false); - - // Ensure Upgrade() is not running again by setting the bImportFinished flag - settings.setValue("bImportFinished", true); -} - -void OptionsModel::Upgrade() -{ - QSettings settings; - - // Already upgraded - if (settings.contains("bImportFinished")) - return; - - settings.setValue("bImportFinished", true); - -#ifdef ENABLE_WALLET - // Move settings from old wallet.dat (if any): - CWalletDB walletdb(strWalletFile); - - QList<QString> intOptions; - intOptions << "nDisplayUnit" << "nTransactionFee"; - foreach(QString key, intOptions) - { - int value = 0; - if (walletdb.ReadSetting(key.toStdString(), value)) - { - settings.setValue(key, value); - walletdb.EraseSetting(key.toStdString()); - } - } - QList<QString> boolOptions; - boolOptions << "bDisplayAddresses" << "fMinimizeToTray" << "fMinimizeOnClose" << "fUseProxy" << "fUseUPnP"; - foreach(QString key, boolOptions) - { - bool value = false; - if (walletdb.ReadSetting(key.toStdString(), value)) - { - settings.setValue(key, value); - walletdb.EraseSetting(key.toStdString()); - } - } - try - { - CAddress addrProxyAddress; - if (walletdb.ReadSetting("addrProxy", addrProxyAddress)) - { - settings.setValue("addrProxy", addrProxyAddress.ToStringIPPort().c_str()); - walletdb.EraseSetting("addrProxy"); - } - } - catch (std::ios_base::failure &e) - { - // 0.6.0rc1 saved this as a CService, which causes failure when parsing as a CAddress - CService addrProxy; - if (walletdb.ReadSetting("addrProxy", addrProxy)) - { - settings.setValue("addrProxy", addrProxy.ToStringIPPort().c_str()); - walletdb.EraseSetting("addrProxy"); - } - } -#endif - - Init(); } int OptionsModel::rowCount(const QModelIndex & parent) const |