aboutsummaryrefslogtreecommitdiff
path: root/lib/csapi/registration.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/csapi/registration.cpp')
-rw-r--r--lib/csapi/registration.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/csapi/registration.cpp b/lib/csapi/registration.cpp
index 1e239d2a..85a3e256 100644
--- a/lib/csapi/registration.cpp
+++ b/lib/csapi/registration.cpp
@@ -24,8 +24,7 @@ class RegisterJob::Private
BaseJob::Query queryToRegister(const QString& kind)
{
BaseJob::Query _q;
- if (!kind.isEmpty())
- _q.addQueryItem("kind", kind);
+ addToQuery<IfNotEmpty>(_q, "kind", kind);
return _q;
}
@@ -130,7 +129,7 @@ class CheckUsernameAvailabilityJob::Private
BaseJob::Query queryToCheckUsernameAvailability(const QString& username)
{
BaseJob::Query _q;
- _q.addQueryItem("username", username);
+ addToQuery<>(_q, "username", username);
return _q;
}