mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2026-01-02 05:38:06 -06:00
Store enum type in settings directly
Affected settings will be migrated to new keys so nothing should break. PR #15800.
This commit is contained in:
@@ -41,7 +41,7 @@ using namespace Net;
|
||||
DNSUpdater::DNSUpdater(QObject *parent)
|
||||
: QObject(parent)
|
||||
, m_state(OK)
|
||||
, m_service(DNS::NONE)
|
||||
, m_service(DNS::Service::None)
|
||||
{
|
||||
updateCredentials();
|
||||
|
||||
@@ -143,15 +143,16 @@ QString DNSUpdater::getUpdateUrl() const
|
||||
// Service specific
|
||||
switch (m_service)
|
||||
{
|
||||
case DNS::DYNDNS:
|
||||
case DNS::Service::DynDNS:
|
||||
url.setHost("members.dyndns.org");
|
||||
break;
|
||||
case DNS::NOIP:
|
||||
case DNS::Service::NoIP:
|
||||
url.setHost("dynupdate.no-ip.com");
|
||||
break;
|
||||
default:
|
||||
qWarning() << "Unrecognized Dynamic DNS service!";
|
||||
Q_ASSERT(0);
|
||||
Q_ASSERT(false);
|
||||
break;
|
||||
}
|
||||
url.setPath("/nic/update");
|
||||
|
||||
@@ -295,16 +296,17 @@ void DNSUpdater::updateCredentials()
|
||||
}
|
||||
}
|
||||
|
||||
QUrl DNSUpdater::getRegistrationUrl(const int service)
|
||||
QUrl DNSUpdater::getRegistrationUrl(const DNS::Service service)
|
||||
{
|
||||
switch (service)
|
||||
{
|
||||
case DNS::DYNDNS:
|
||||
case DNS::Service::DynDNS:
|
||||
return {"https://account.dyn.com/entrance/"};
|
||||
case DNS::NOIP:
|
||||
case DNS::Service::NoIP:
|
||||
return {"https://www.noip.com/remote-access"};
|
||||
default:
|
||||
Q_ASSERT(0);
|
||||
Q_ASSERT(false);
|
||||
break;
|
||||
}
|
||||
return {};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user