qt: Changes for built-in PCP+NAT-PMP

Change option help, and remove conditionals.
This commit is contained in:
laanwj 2024-05-05 19:17:53 +02:00
parent 52f8ef66c6
commit 7b04709862
3 changed files with 2 additions and 9 deletions

View file

@ -328,10 +328,10 @@
<item> <item>
<widget class="QCheckBox" name="mapPortNatpmp"> <widget class="QCheckBox" name="mapPortNatpmp">
<property name="toolTip"> <property name="toolTip">
<string>Automatically open the Bitcoin client port on the router. This only works when your router supports NAT-PMP and it is enabled. The external port could be random.</string> <string>Automatically open the Bitcoin client port on the router. This only works when your router supports PCP or NAT-PMP and it is enabled. The external port could be random.</string>
</property> </property>
<property name="text"> <property name="text">
<string>Map port using NA&amp;T-PMP</string> <string>Map port using PCP or NA&amp;T-PMP</string>
</property> </property>
</widget> </widget>
</item> </item>

View file

@ -108,9 +108,6 @@ OptionsDialog::OptionsDialog(QWidget* parent, bool enableWallet)
#ifndef USE_UPNP #ifndef USE_UPNP
ui->mapPortUpnp->setEnabled(false); ui->mapPortUpnp->setEnabled(false);
#endif #endif
#ifndef USE_NATPMP
ui->mapPortNatpmp->setEnabled(false);
#endif
ui->proxyIp->setEnabled(false); ui->proxyIp->setEnabled(false);
ui->proxyPort->setEnabled(false); ui->proxyPort->setEnabled(false);

View file

@ -414,11 +414,7 @@ QVariant OptionsModel::getOption(OptionID option, const std::string& suffix) con
return false; return false;
#endif // USE_UPNP #endif // USE_UPNP
case MapPortNatpmp: case MapPortNatpmp:
#ifdef USE_NATPMP
return SettingToBool(setting(), DEFAULT_NATPMP); return SettingToBool(setting(), DEFAULT_NATPMP);
#else
return false;
#endif // USE_NATPMP
case MinimizeOnClose: case MinimizeOnClose:
return fMinimizeOnClose; return fMinimizeOnClose;