diff options
author | Ryan Ofsky <ryan@ofsky.org> | 2022-04-18 19:19:02 -0400 |
---|---|---|
committer | Ryan Ofsky <ryan@ofsky.org> | 2022-05-26 11:05:10 -0400 |
commit | d2ada6e63583cad91e92b49c4dbf8c7ff086a758 (patch) | |
tree | ceb02927072e15fa83e0cbead1bdcec9a78ae8e6 /src/qt/optionsdialog.cpp | |
parent | 1dc4fc29c1086420b7dc51b20c0b7a18fecb4462 (diff) | |
download | bitcoin-d2ada6e63583cad91e92b49c4dbf8c7ff086a758.tar.xz |
Migrate -upnp and -natpmp settings from QSettings to settings.json
This also effectively reverts 58e8364dcdc4e57b0caac09f8402e6535301de9b from
#18077, applying upnp and natpmp settings from the optionsmodel class instead
of the optionsdialog class. This makes sense because model code, not view code
is responsible for applying all other settings, and because leaving these
settings half-applied in optionsmodel seems error prone and could lead to bugs.
(These things were discussed a little in
https://github.com/bitcoin/bitcoin/pull/18077#discussion_r560381734)
Diffstat (limited to 'src/qt/optionsdialog.cpp')
-rw-r--r-- | src/qt/optionsdialog.cpp | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/src/qt/optionsdialog.cpp b/src/qt/optionsdialog.cpp index e6ff43a379..f3c3af10e0 100644 --- a/src/qt/optionsdialog.cpp +++ b/src/qt/optionsdialog.cpp @@ -26,7 +26,6 @@ #include <QIntValidator> #include <QLocale> #include <QMessageBox> -#include <QSettings> #include <QSystemTrayIcon> #include <QTimer> @@ -56,10 +55,6 @@ OptionsDialog::OptionsDialog(QWidget *parent, bool enableWallet) : #ifndef USE_NATPMP ui->mapPortNatpmp->setEnabled(false); #endif - connect(this, &QDialog::accepted, [this](){ - QSettings settings; - model->node().mapPort(settings.value("fUseUPnP").toBool(), settings.value("fUseNatpmp").toBool()); - }); ui->proxyIp->setEnabled(false); ui->proxyPort->setEnabled(false); |