mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-06 05:01:25 -07:00
Give better name to parameter checking function
This function will throw exceptions if the required parameters do not exsit hence a stronger word is more appropriate here. Also change the function parameter type to QVector. We don't need the duplicate entries checking as currently we only use 3 fields at max and can be easily checked by hand. So drop back to QVector which can be constructed more efficiently.
This commit is contained in:
parent
9cb07db84b
commit
9b5df92078
7 changed files with 63 additions and 63 deletions
|
@ -316,7 +316,7 @@ void AppController::preferencesAction()
|
|||
|
||||
void AppController::setPreferencesAction()
|
||||
{
|
||||
checkParams({"json"});
|
||||
requireParams({"json"});
|
||||
|
||||
Preferences *const pref = Preferences::instance();
|
||||
auto session = BitTorrent::Session::instance();
|
||||
|
@ -762,7 +762,7 @@ void AppController::networkInterfaceListAction()
|
|||
|
||||
void AppController::networkInterfaceAddressListAction()
|
||||
{
|
||||
checkParams({"iface"});
|
||||
requireParams({"iface"});
|
||||
|
||||
const QString ifaceName = params().value("iface");
|
||||
QJsonArray addressList;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue