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:
Chocobo1
2019-11-06 13:31:06 +08:00
parent 9cb07db84b
commit 9b5df92078
7 changed files with 63 additions and 63 deletions

View File

@@ -69,7 +69,7 @@ const DataMap &APIController::data() const
return m_data;
}
void APIController::checkParams(const QSet<QString> &requiredParams) const
void APIController::requireParams(const QVector<QString> &requiredParams) const
{
const bool hasAllRequiredParams = std::all_of(requiredParams.cbegin(), requiredParams.cend()
, [this](const QString &requiredParam)