mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-11 15:56:17 -07:00
Store WebUI port setting in human readable number
Previously it was wrapped in QVariant type. PR #16977.
This commit is contained in:
parent
2a6f02fa29
commit
e9d3928fe0
2 changed files with 4 additions and 3 deletions
|
@ -592,12 +592,13 @@ void Preferences::setWebUiAddress(const QString &addr)
|
|||
|
||||
quint16 Preferences::getWebUiPort() const
|
||||
{
|
||||
return value<int>(u"Preferences/WebUI/Port"_qs, 8080);
|
||||
return value<quint16>(u"Preferences/WebUI/Port"_qs, 8080);
|
||||
}
|
||||
|
||||
void Preferences::setWebUiPort(const quint16 port)
|
||||
{
|
||||
setValue(u"Preferences/WebUI/Port"_qs, port);
|
||||
// cast to `int` type so it will show human readable unit in configuration file
|
||||
setValue(u"Preferences/WebUI/Port"_qs, static_cast<int>(port));
|
||||
}
|
||||
|
||||
bool Preferences::useUPnPForWebUIPort() const
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue