aboutsummaryrefslogtreecommitdiff
path: root/jobs
diff options
context:
space:
mode:
authorKitsune Ral <Kitsune-Ral@users.sf.net>2017-08-19 18:01:19 +0900
committerKitsune Ral <Kitsune-Ral@users.sf.net>2017-08-19 18:01:19 +0900
commit5f85a2bfc5d5fee00fcdfb1230af32344376e39a (patch)
tree0a36c95c30e27f142f839442a991ec38686d99dd /jobs
parentde1f9a320bdabf4859a89d2686873aea622c1354 (diff)
downloadlibquotient-5f85a2bfc5d5fee00fcdfb1230af32344376e39a.tar.gz
libquotient-5f85a2bfc5d5fee00fcdfb1230af32344376e39a.zip
BaseJob::Data: Small update to better match Qt API
Also: Query and Data constructors from initialization_list<> are no more explicit, as clang-tidy recommends.
Diffstat (limited to 'jobs')
-rw-r--r--jobs/basejob.h7
-rw-r--r--jobs/passwordlogin.cpp2
2 files changed, 4 insertions, 5 deletions
diff --git a/jobs/basejob.h b/jobs/basejob.h
index 0ec40a7a..5df03b32 100644
--- a/jobs/basejob.h
+++ b/jobs/basejob.h
@@ -63,7 +63,7 @@ namespace QMatrixClient
public:
using QUrlQuery::QUrlQuery;
Query() = default;
- explicit Query(const std::initializer_list< QPair<QString, QString> >& l)
+ Query(const std::initializer_list< QPair<QString, QString> >& l)
{
setQueryItems(l);
}
@@ -78,11 +78,10 @@ namespace QMatrixClient
{
public:
Data() = default;
- Data(const QJsonObject& o) : QJsonObject(o) { }
- Data(QJsonObject&& o) : QJsonObject(std::move(o)) { }
+ explicit Data(const QJsonObject& o) : QJsonObject(o) { }
#if (QT_VERSION < QT_VERSION_CHECK(5, 4, 0))
// This method exists in QJsonObject of newer Qt versions
- explicit Data(const std::initializer_list< QPair<QString, QString> >& l)
+ Data(const std::initializer_list< QPair<QString, QJsonValue> >& l)
{
for (auto i: l)
insert(i.first, i.second);
diff --git a/jobs/passwordlogin.cpp b/jobs/passwordlogin.cpp
index 081e19bc..09108215 100644
--- a/jobs/passwordlogin.cpp
+++ b/jobs/passwordlogin.cpp
@@ -33,7 +33,7 @@ PasswordLogin::PasswordLogin(const ConnectionData* connection, QString user, QSt
, "_matrix/client/r0/login"
, Query()
, Data(
- { { "type", "m.login.password" }
+ { { "type", QStringLiteral("m.login.password") }
, { "user", user }
, { "password", password }
})