diff options
author | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2018-05-01 20:04:51 +0900 |
---|---|---|
committer | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2018-05-01 20:59:50 +0900 |
commit | 38934c2310b426be640988dc10f48de88a3d92bc (patch) | |
tree | f69dbe30e73e4572cefd7804a6dfc2226e21738c /lib | |
parent | ea363441269c9100c4bcc8076d4b3d125333a649 (diff) | |
download | libquotient-38934c2310b426be640988dc10f48de88a3d92bc.tar.gz libquotient-38934c2310b426be640988dc10f48de88a3d92bc.zip |
jobs/generated: use std::move in baseURL; type updates from the API files
The type updates are a matter of pending PR to matrix-doc yet.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/jobs/generated/administrative_contact.cpp | 4 | ||||
-rw-r--r-- | lib/jobs/generated/content-repo.cpp | 20 | ||||
-rw-r--r-- | lib/jobs/generated/content-repo.h | 6 | ||||
-rw-r--r-- | lib/jobs/generated/directory.cpp | 4 | ||||
-rw-r--r-- | lib/jobs/generated/leaving.cpp | 4 | ||||
-rw-r--r-- | lib/jobs/generated/list_joined_rooms.cpp | 2 | ||||
-rw-r--r-- | lib/jobs/generated/list_public_rooms.cpp | 28 | ||||
-rw-r--r-- | lib/jobs/generated/list_public_rooms.h | 14 | ||||
-rw-r--r-- | lib/jobs/generated/logout.cpp | 2 | ||||
-rw-r--r-- | lib/jobs/generated/notifications.cpp | 96 | ||||
-rw-r--r-- | lib/jobs/generated/notifications.h | 25 | ||||
-rw-r--r-- | lib/jobs/generated/profile.cpp | 6 | ||||
-rw-r--r-- | lib/jobs/generated/pusher.cpp | 2 | ||||
-rw-r--r-- | lib/jobs/generated/tags.cpp | 4 | ||||
-rw-r--r-- | lib/jobs/generated/users.cpp | 2 | ||||
-rw-r--r-- | lib/jobs/generated/users.h | 2 | ||||
-rw-r--r-- | lib/jobs/generated/versions.cpp | 2 | ||||
-rw-r--r-- | lib/jobs/generated/whoami.cpp | 2 |
18 files changed, 60 insertions, 165 deletions
diff --git a/lib/jobs/generated/administrative_contact.cpp b/lib/jobs/generated/administrative_contact.cpp index fc75fd85..b003c92d 100644 --- a/lib/jobs/generated/administrative_contact.cpp +++ b/lib/jobs/generated/administrative_contact.cpp @@ -45,7 +45,7 @@ class GetAccount3PIDsJob::Private QUrl GetAccount3PIDsJob::makeRequestUrl(QUrl baseUrl) { - return BaseJob::makeRequestUrl(baseUrl, + return BaseJob::makeRequestUrl(std::move(baseUrl), basePath % "/account/3pid"); } @@ -112,7 +112,7 @@ Post3PIDsJob::Post3PIDsJob(const ThreePidCredentials& threePidCreds, bool bind) QUrl RequestTokenTo3PIDJob::makeRequestUrl(QUrl baseUrl) { - return BaseJob::makeRequestUrl(baseUrl, + return BaseJob::makeRequestUrl(std::move(baseUrl), basePath % "/account/3pid/email/requestToken"); } diff --git a/lib/jobs/generated/content-repo.cpp b/lib/jobs/generated/content-repo.cpp index 51011251..95fc5aed 100644 --- a/lib/jobs/generated/content-repo.cpp +++ b/lib/jobs/generated/content-repo.cpp @@ -65,7 +65,7 @@ class GetContentJob::Private QUrl GetContentJob::makeRequestUrl(QUrl baseUrl, const QString& serverName, const QString& mediaId) { - return BaseJob::makeRequestUrl(baseUrl, + return BaseJob::makeRequestUrl(std::move(baseUrl), basePath % "/download/" % serverName % "/" % mediaId); } @@ -112,7 +112,7 @@ class GetContentOverrideNameJob::Private QUrl GetContentOverrideNameJob::makeRequestUrl(QUrl baseUrl, const QString& serverName, const QString& mediaId, const QString& fileName) { - return BaseJob::makeRequestUrl(baseUrl, + return BaseJob::makeRequestUrl(std::move(baseUrl), basePath % "/download/" % serverName % "/" % mediaId % "/" % fileName); } @@ -168,7 +168,7 @@ BaseJob::Query queryToGetContentThumbnail(int width, int height, const QString& QUrl GetContentThumbnailJob::makeRequestUrl(QUrl baseUrl, const QString& serverName, const QString& mediaId, int width, int height, const QString& method) { - return BaseJob::makeRequestUrl(baseUrl, + return BaseJob::makeRequestUrl(std::move(baseUrl), basePath % "/thumbnail/" % serverName % "/" % mediaId, queryToGetContentThumbnail(width, height, method)); } @@ -205,11 +205,11 @@ BaseJob::Status GetContentThumbnailJob::parseReply(QNetworkReply* reply) class GetUrlPreviewJob::Private { public: - double matrixImageSize; + qint64 matrixImageSize; QString ogImage; }; -BaseJob::Query queryToGetUrlPreview(const QString& url, double ts) +BaseJob::Query queryToGetUrlPreview(const QString& url, qint64 ts) { BaseJob::Query _q; _q.addQueryItem("url", url); @@ -217,14 +217,14 @@ BaseJob::Query queryToGetUrlPreview(const QString& url, double ts) return _q; } -QUrl GetUrlPreviewJob::makeRequestUrl(QUrl baseUrl, const QString& url, double ts) +QUrl GetUrlPreviewJob::makeRequestUrl(QUrl baseUrl, const QString& url, qint64 ts) { - return BaseJob::makeRequestUrl(baseUrl, + return BaseJob::makeRequestUrl(std::move(baseUrl), basePath % "/preview_url", queryToGetUrlPreview(url, ts)); } -GetUrlPreviewJob::GetUrlPreviewJob(const QString& url, double ts) +GetUrlPreviewJob::GetUrlPreviewJob(const QString& url, qint64 ts) : BaseJob(HttpVerb::Get, "GetUrlPreviewJob", basePath % "/preview_url", queryToGetUrlPreview(url, ts)) @@ -234,7 +234,7 @@ GetUrlPreviewJob::GetUrlPreviewJob(const QString& url, double ts) GetUrlPreviewJob::~GetUrlPreviewJob() = default; -double GetUrlPreviewJob::matrixImageSize() const +qint64 GetUrlPreviewJob::matrixImageSize() const { return d->matrixImageSize; } @@ -247,7 +247,7 @@ const QString& GetUrlPreviewJob::ogImage() const BaseJob::Status GetUrlPreviewJob::parseJson(const QJsonDocument& data) { auto json = data.object(); - d->matrixImageSize = fromJson<double>(json.value("matrix:image:size")); + d->matrixImageSize = fromJson<qint64>(json.value("matrix:image:size")); d->ogImage = fromJson<QString>(json.value("og:image")); return Success; } diff --git a/lib/jobs/generated/content-repo.h b/lib/jobs/generated/content-repo.h index b4ea562f..e1e58f88 100644 --- a/lib/jobs/generated/content-repo.h +++ b/lib/jobs/generated/content-repo.h @@ -111,12 +111,12 @@ namespace QMatrixClient * a URL for GetUrlPreviewJob is necessary but the job * itself isn't. */ - static QUrl makeRequestUrl(QUrl baseUrl, const QString& url, double ts = {}); + static QUrl makeRequestUrl(QUrl baseUrl, const QString& url, qint64 ts = {}); - explicit GetUrlPreviewJob(const QString& url, double ts = {}); + explicit GetUrlPreviewJob(const QString& url, qint64 ts = {}); ~GetUrlPreviewJob() override; - double matrixImageSize() const; + qint64 matrixImageSize() const; const QString& ogImage() const; protected: diff --git a/lib/jobs/generated/directory.cpp b/lib/jobs/generated/directory.cpp index 9428dcee..6324a1f5 100644 --- a/lib/jobs/generated/directory.cpp +++ b/lib/jobs/generated/directory.cpp @@ -31,7 +31,7 @@ class GetRoomIdByAliasJob::Private QUrl GetRoomIdByAliasJob::makeRequestUrl(QUrl baseUrl, const QString& roomAlias) { - return BaseJob::makeRequestUrl(baseUrl, + return BaseJob::makeRequestUrl(std::move(baseUrl), basePath % "/room/" % roomAlias); } @@ -64,7 +64,7 @@ BaseJob::Status GetRoomIdByAliasJob::parseJson(const QJsonDocument& data) QUrl DeleteRoomAliasJob::makeRequestUrl(QUrl baseUrl, const QString& roomAlias) { - return BaseJob::makeRequestUrl(baseUrl, + return BaseJob::makeRequestUrl(std::move(baseUrl), basePath % "/room/" % roomAlias); } diff --git a/lib/jobs/generated/leaving.cpp b/lib/jobs/generated/leaving.cpp index fbc40d11..afc4adbd 100644 --- a/lib/jobs/generated/leaving.cpp +++ b/lib/jobs/generated/leaving.cpp @@ -14,7 +14,7 @@ static const auto basePath = QStringLiteral("/_matrix/client/r0"); QUrl LeaveRoomJob::makeRequestUrl(QUrl baseUrl, const QString& roomId) { - return BaseJob::makeRequestUrl(baseUrl, + return BaseJob::makeRequestUrl(std::move(baseUrl), basePath % "/rooms/" % roomId % "/leave"); } @@ -26,7 +26,7 @@ LeaveRoomJob::LeaveRoomJob(const QString& roomId) QUrl ForgetRoomJob::makeRequestUrl(QUrl baseUrl, const QString& roomId) { - return BaseJob::makeRequestUrl(baseUrl, + return BaseJob::makeRequestUrl(std::move(baseUrl), basePath % "/rooms/" % roomId % "/forget"); } diff --git a/lib/jobs/generated/list_joined_rooms.cpp b/lib/jobs/generated/list_joined_rooms.cpp index f902f94c..8ea44721 100644 --- a/lib/jobs/generated/list_joined_rooms.cpp +++ b/lib/jobs/generated/list_joined_rooms.cpp @@ -20,7 +20,7 @@ class GetJoinedRoomsJob::Private QUrl GetJoinedRoomsJob::makeRequestUrl(QUrl baseUrl) { - return BaseJob::makeRequestUrl(baseUrl, + return BaseJob::makeRequestUrl(std::move(baseUrl), basePath % "/joined_rooms"); } diff --git a/lib/jobs/generated/list_public_rooms.cpp b/lib/jobs/generated/list_public_rooms.cpp index 35a670fb..9b4174cb 100644 --- a/lib/jobs/generated/list_public_rooms.cpp +++ b/lib/jobs/generated/list_public_rooms.cpp @@ -18,7 +18,7 @@ class GetRoomVisibilityOnDirectoryJob::Private QUrl GetRoomVisibilityOnDirectoryJob::makeRequestUrl(QUrl baseUrl, const QString& roomId) { - return BaseJob::makeRequestUrl(baseUrl, + return BaseJob::makeRequestUrl(std::move(baseUrl), basePath % "/directory/list/room/" % roomId); } @@ -84,7 +84,7 @@ namespace QMatrixClient result.name = fromJson<QString>(o.value("name")); result.numJoinedMembers = - fromJson<double>(o.value("num_joined_members")); + fromJson<qint64>(o.value("num_joined_members")); result.roomId = fromJson<QString>(o.value("room_id")); result.topic = @@ -107,10 +107,10 @@ class GetPublicRoomsJob::Private QVector<PublicRoomsChunk> chunk; QString nextBatch; QString prevBatch; - double totalRoomCountEstimate; + qint64 totalRoomCountEstimate; }; -BaseJob::Query queryToGetPublicRooms(double limit, const QString& since, const QString& server) +BaseJob::Query queryToGetPublicRooms(int limit, const QString& since, const QString& server) { BaseJob::Query _q; _q.addQueryItem("limit", QString("%1").arg(limit)); @@ -121,14 +121,14 @@ BaseJob::Query queryToGetPublicRooms(double limit, const QString& since, const Q return _q; } -QUrl GetPublicRoomsJob::makeRequestUrl(QUrl baseUrl, double limit, const QString& since, const QString& server) +QUrl GetPublicRoomsJob::makeRequestUrl(QUrl baseUrl, int limit, const QString& since, const QString& server) { - return BaseJob::makeRequestUrl(baseUrl, + return BaseJob::makeRequestUrl(std::move(baseUrl), basePath % "/publicRooms", queryToGetPublicRooms(limit, since, server)); } -GetPublicRoomsJob::GetPublicRoomsJob(double limit, const QString& since, const QString& server) +GetPublicRoomsJob::GetPublicRoomsJob(int limit, const QString& since, const QString& server) : BaseJob(HttpVerb::Get, "GetPublicRoomsJob", basePath % "/publicRooms", queryToGetPublicRooms(limit, since, server), @@ -154,7 +154,7 @@ const QString& GetPublicRoomsJob::prevBatch() const return d->prevBatch; } -double GetPublicRoomsJob::totalRoomCountEstimate() const +qint64 GetPublicRoomsJob::totalRoomCountEstimate() const { return d->totalRoomCountEstimate; } @@ -168,7 +168,7 @@ BaseJob::Status GetPublicRoomsJob::parseJson(const QJsonDocument& data) d->chunk = fromJson<QVector<PublicRoomsChunk>>(json.value("chunk")); d->nextBatch = fromJson<QString>(json.value("next_batch")); d->prevBatch = fromJson<QString>(json.value("prev_batch")); - d->totalRoomCountEstimate = fromJson<double>(json.value("total_room_count_estimate")); + d->totalRoomCountEstimate = fromJson<qint64>(json.value("total_room_count_estimate")); return Success; } @@ -227,7 +227,7 @@ namespace QMatrixClient result.name = fromJson<QString>(o.value("name")); result.numJoinedMembers = - fromJson<double>(o.value("num_joined_members")); + fromJson<qint64>(o.value("num_joined_members")); result.roomId = fromJson<QString>(o.value("room_id")); result.topic = @@ -250,7 +250,7 @@ class QueryPublicRoomsJob::Private QVector<PublicRoomsChunk> chunk; QString nextBatch; QString prevBatch; - double totalRoomCountEstimate; + qint64 totalRoomCountEstimate; }; BaseJob::Query queryToQueryPublicRooms(const QString& server) @@ -261,7 +261,7 @@ BaseJob::Query queryToQueryPublicRooms(const QString& server) return _q; } -QueryPublicRoomsJob::QueryPublicRoomsJob(const QString& server, double limit, const QString& since, const Filter& filter) +QueryPublicRoomsJob::QueryPublicRoomsJob(const QString& server, int limit, const QString& since, const Filter& filter) : BaseJob(HttpVerb::Post, "QueryPublicRoomsJob", basePath % "/publicRooms", queryToQueryPublicRooms(server)) @@ -292,7 +292,7 @@ const QString& QueryPublicRoomsJob::prevBatch() const return d->prevBatch; } -double QueryPublicRoomsJob::totalRoomCountEstimate() const +qint64 QueryPublicRoomsJob::totalRoomCountEstimate() const { return d->totalRoomCountEstimate; } @@ -306,7 +306,7 @@ BaseJob::Status QueryPublicRoomsJob::parseJson(const QJsonDocument& data) d->chunk = fromJson<QVector<PublicRoomsChunk>>(json.value("chunk")); d->nextBatch = fromJson<QString>(json.value("next_batch")); d->prevBatch = fromJson<QString>(json.value("prev_batch")); - d->totalRoomCountEstimate = fromJson<double>(json.value("total_room_count_estimate")); + d->totalRoomCountEstimate = fromJson<qint64>(json.value("total_room_count_estimate")); return Success; } diff --git a/lib/jobs/generated/list_public_rooms.h b/lib/jobs/generated/list_public_rooms.h index c8adccb4..1e44e8b2 100644 --- a/lib/jobs/generated/list_public_rooms.h +++ b/lib/jobs/generated/list_public_rooms.h @@ -53,7 +53,7 @@ namespace QMatrixClient QVector<QString> aliases; QString canonicalAlias; QString name; - double numJoinedMembers; + qint64 numJoinedMembers; QString roomId; QString topic; bool worldReadable; @@ -69,15 +69,15 @@ namespace QMatrixClient * a URL for GetPublicRoomsJob is necessary but the job * itself isn't. */ - static QUrl makeRequestUrl(QUrl baseUrl, double limit = {}, const QString& since = {}, const QString& server = {}); + static QUrl makeRequestUrl(QUrl baseUrl, int limit = {}, const QString& since = {}, const QString& server = {}); - explicit GetPublicRoomsJob(double limit = {}, const QString& since = {}, const QString& server = {}); + explicit GetPublicRoomsJob(int limit = {}, const QString& since = {}, const QString& server = {}); ~GetPublicRoomsJob() override; const QVector<PublicRoomsChunk>& chunk() const; const QString& nextBatch() const; const QString& prevBatch() const; - double totalRoomCountEstimate() const; + qint64 totalRoomCountEstimate() const; protected: Status parseJson(const QJsonDocument& data) override; @@ -103,7 +103,7 @@ namespace QMatrixClient QVector<QString> aliases; QString canonicalAlias; QString name; - double numJoinedMembers; + qint64 numJoinedMembers; QString roomId; QString topic; bool worldReadable; @@ -114,13 +114,13 @@ namespace QMatrixClient // End of inner data structures - explicit QueryPublicRoomsJob(const QString& server = {}, double limit = {}, const QString& since = {}, const Filter& filter = {}); + explicit QueryPublicRoomsJob(const QString& server = {}, int limit = {}, const QString& since = {}, const Filter& filter = {}); ~QueryPublicRoomsJob() override; const QVector<PublicRoomsChunk>& chunk() const; const QString& nextBatch() const; const QString& prevBatch() const; - double totalRoomCountEstimate() const; + qint64 totalRoomCountEstimate() const; protected: Status parseJson(const QJsonDocument& data) override; diff --git a/lib/jobs/generated/logout.cpp b/lib/jobs/generated/logout.cpp index 83139842..b943dcd3 100644 --- a/lib/jobs/generated/logout.cpp +++ b/lib/jobs/generated/logout.cpp @@ -14,7 +14,7 @@ static const auto basePath = QStringLiteral("/_matrix/client/r0"); QUrl LogoutJob::makeRequestUrl(QUrl baseUrl) { - return BaseJob::makeRequestUrl(baseUrl, + return BaseJob::makeRequestUrl(std::move(baseUrl), basePath % "/logout"); } diff --git a/lib/jobs/generated/notifications.cpp b/lib/jobs/generated/notifications.cpp index e3558097..ffd17b8a 100644 --- a/lib/jobs/generated/notifications.cpp +++ b/lib/jobs/generated/notifications.cpp @@ -12,94 +12,6 @@ static const auto basePath = QStringLiteral("/_matrix/client/r0"); namespace QMatrixClient { - QJsonObject toJson(const GetNotificationsJob::Unsigned& pod) - { - QJsonObject o; - o.insert("age", toJson(pod.age)); - o.insert("prev_content", toJson(pod.prevContent)); - o.insert("transaction_id", toJson(pod.transactionId)); - o.insert("redacted_because", toJson(pod.redactedBecause)); - - return o; - } - - template <> struct FromJson<GetNotificationsJob::Unsigned> - { - GetNotificationsJob::Unsigned operator()(const QJsonValue& jv) - { - const auto& o = jv.toObject(); - GetNotificationsJob::Unsigned result; - result.age = - fromJson<qint64>(o.value("age")); - result.prevContent = - fromJson<QJsonObject>(o.value("prev_content")); - result.transactionId = - fromJson<QString>(o.value("transaction_id")); - result.redactedBecause = - fromJson<QJsonObject>(o.value("redacted_because")); - - return result; - } - }; -} // namespace QMatrixClient - -namespace QMatrixClient -{ - QJsonObject toJson(const GetNotificationsJob::Event& pod) - { - QJsonObject o; - o.insert("event_id", toJson(pod.eventId)); - o.insert("content", toJson(pod.content)); - o.insert("origin_server_ts", toJson(pod.originServerTimestamp)); - o.insert("sender", toJson(pod.sender)); - o.insert("state_key", toJson(pod.stateKey)); - o.insert("type", toJson(pod.type)); - o.insert("unsigned", toJson(pod.unsignedData)); - - return o; - } - - template <> struct FromJson<GetNotificationsJob::Event> - { - GetNotificationsJob::Event operator()(const QJsonValue& jv) - { - const auto& o = jv.toObject(); - GetNotificationsJob::Event result; - result.eventId = - fromJson<QString>(o.value("event_id")); - result.content = - fromJson<QJsonObject>(o.value("content")); - result.originServerTimestamp = - fromJson<qint64>(o.value("origin_server_ts")); - result.sender = - fromJson<QString>(o.value("sender")); - result.stateKey = - fromJson<QString>(o.value("state_key")); - result.type = - fromJson<QString>(o.value("type")); - result.unsignedData = - fromJson<GetNotificationsJob::Unsigned>(o.value("unsigned")); - - return result; - } - }; -} // namespace QMatrixClient - -namespace QMatrixClient -{ - QJsonObject toJson(const GetNotificationsJob::Notification& pod) - { - QJsonObject o; - o.insert("actions", toJson(pod.actions)); - o.insert("event", toJson(pod.event)); - o.insert("profile_tag", toJson(pod.profileTag)); - o.insert("read", toJson(pod.read)); - o.insert("room_id", toJson(pod.roomId)); - o.insert("ts", toJson(pod.ts)); - - return o; - } - template <> struct FromJson<GetNotificationsJob::Notification> { GetNotificationsJob::Notification operator()(const QJsonValue& jv) @@ -128,7 +40,7 @@ class GetNotificationsJob::Private { public: QString nextToken; - QVector<Notification> notifications; + std::vector<Notification> notifications; }; BaseJob::Query queryToGetNotifications(const QString& from, int limit, const QString& only) @@ -144,7 +56,7 @@ BaseJob::Query queryToGetNotifications(const QString& from, int limit, const QSt QUrl GetNotificationsJob::makeRequestUrl(QUrl baseUrl, const QString& from, int limit, const QString& only) { - return BaseJob::makeRequestUrl(baseUrl, + return BaseJob::makeRequestUrl(std::move(baseUrl), basePath % "/notifications", queryToGetNotifications(from, limit, only)); } @@ -164,7 +76,7 @@ const QString& GetNotificationsJob::nextToken() const return d->nextToken; } -const QVector<GetNotificationsJob::Notification>& GetNotificationsJob::notifications() const +const std::vector<GetNotificationsJob::Notification>& GetNotificationsJob::notifications() const { return d->notifications; } @@ -176,7 +88,7 @@ BaseJob::Status GetNotificationsJob::parseJson(const QJsonDocument& data) if (!json.contains("notifications")) return { JsonParseError, "The key 'notifications' not found in the response" }; - d->notifications = fromJson<QVector<Notification>>(json.value("notifications")); + d->notifications = fromJson<std::vector<Notification>>(json.value("notifications")); return Success; } diff --git a/lib/jobs/generated/notifications.h b/lib/jobs/generated/notifications.h index 9249a1b7..72318f69 100644 --- a/lib/jobs/generated/notifications.h +++ b/lib/jobs/generated/notifications.h @@ -6,6 +6,8 @@ #include "../basejob.h" +#include <vector> +#include "events/event.h" #include <QtCore/QJsonObject> #include <QtCore/QVector> @@ -20,26 +22,7 @@ namespace QMatrixClient public: // Inner data structures - struct Unsigned - { - qint64 age; - QJsonObject prevContent; - QString transactionId; - QJsonObject redactedBecause; - - }; - - struct Event - { - QString eventId; - QJsonObject content; - qint64 originServerTimestamp; - QString sender; - QString stateKey; - QString type; - Unsigned unsignedData; - - }; + using Event = EventPtr; struct Notification { @@ -65,7 +48,7 @@ namespace QMatrixClient ~GetNotificationsJob() override; const QString& nextToken() const; - const QVector<Notification>& notifications() const; + const std::vector<Notification>& notifications() const; protected: Status parseJson(const QJsonDocument& data) override; diff --git a/lib/jobs/generated/profile.cpp b/lib/jobs/generated/profile.cpp index 1f7092d7..d8ddbc14 100644 --- a/lib/jobs/generated/profile.cpp +++ b/lib/jobs/generated/profile.cpp @@ -30,7 +30,7 @@ class GetDisplayNameJob::Private QUrl GetDisplayNameJob::makeRequestUrl(QUrl baseUrl, const QString& userId) { - return BaseJob::makeRequestUrl(baseUrl, + return BaseJob::makeRequestUrl(std::move(baseUrl), basePath % "/profile/" % userId % "/displayname"); } @@ -73,7 +73,7 @@ class GetAvatarUrlJob::Private QUrl GetAvatarUrlJob::makeRequestUrl(QUrl baseUrl, const QString& userId) { - return BaseJob::makeRequestUrl(baseUrl, + return BaseJob::makeRequestUrl(std::move(baseUrl), basePath % "/profile/" % userId % "/avatar_url"); } @@ -107,7 +107,7 @@ class GetUserProfileJob::Private QUrl GetUserProfileJob::makeRequestUrl(QUrl baseUrl, const QString& userId) { - return BaseJob::makeRequestUrl(baseUrl, + return BaseJob::makeRequestUrl(std::move(baseUrl), basePath % "/profile/" % userId); } diff --git a/lib/jobs/generated/pusher.cpp b/lib/jobs/generated/pusher.cpp index 4a9bde95..7d5e80d1 100644 --- a/lib/jobs/generated/pusher.cpp +++ b/lib/jobs/generated/pusher.cpp @@ -87,7 +87,7 @@ class GetPushersJob::Private QUrl GetPushersJob::makeRequestUrl(QUrl baseUrl) { - return BaseJob::makeRequestUrl(baseUrl, + return BaseJob::makeRequestUrl(std::move(baseUrl), basePath % "/pushers"); } diff --git a/lib/jobs/generated/tags.cpp b/lib/jobs/generated/tags.cpp index ef3b5f34..9cd78aec 100644 --- a/lib/jobs/generated/tags.cpp +++ b/lib/jobs/generated/tags.cpp @@ -20,7 +20,7 @@ class GetRoomTagsJob::Private QUrl GetRoomTagsJob::makeRequestUrl(QUrl baseUrl, const QString& userId, const QString& roomId) { - return BaseJob::makeRequestUrl(baseUrl, + return BaseJob::makeRequestUrl(std::move(baseUrl), basePath % "/user/" % userId % "/rooms/" % roomId % "/tags"); } @@ -54,7 +54,7 @@ SetRoomTagJob::SetRoomTagJob(const QString& userId, const QString& roomId, const QUrl DeleteRoomTagJob::makeRequestUrl(QUrl baseUrl, const QString& userId, const QString& roomId, const QString& tag) { - return BaseJob::makeRequestUrl(baseUrl, + return BaseJob::makeRequestUrl(std::move(baseUrl), basePath % "/user/" % userId % "/rooms/" % roomId % "/tags/" % tag); } diff --git a/lib/jobs/generated/users.cpp b/lib/jobs/generated/users.cpp index 6af3be3c..f82a2a64 100644 --- a/lib/jobs/generated/users.cpp +++ b/lib/jobs/generated/users.cpp @@ -47,7 +47,7 @@ class SearchUserDirectoryJob::Private bool limited; }; -SearchUserDirectoryJob::SearchUserDirectoryJob(const QString& searchTerm, double limit) +SearchUserDirectoryJob::SearchUserDirectoryJob(const QString& searchTerm, int limit) : BaseJob(HttpVerb::Post, "SearchUserDirectoryJob", basePath % "/user_directory/search") , d(new Private) diff --git a/lib/jobs/generated/users.h b/lib/jobs/generated/users.h index ce7f5aba..bfa688c8 100644 --- a/lib/jobs/generated/users.h +++ b/lib/jobs/generated/users.h @@ -29,7 +29,7 @@ namespace QMatrixClient // End of inner data structures - explicit SearchUserDirectoryJob(const QString& searchTerm, double limit = {}); + explicit SearchUserDirectoryJob(const QString& searchTerm, int limit = {}); ~SearchUserDirectoryJob() override; const QVector<User>& results() const; diff --git a/lib/jobs/generated/versions.cpp b/lib/jobs/generated/versions.cpp index b12594ca..3b03172c 100644 --- a/lib/jobs/generated/versions.cpp +++ b/lib/jobs/generated/versions.cpp @@ -20,7 +20,7 @@ class GetVersionsJob::Private QUrl GetVersionsJob::makeRequestUrl(QUrl baseUrl) { - return BaseJob::makeRequestUrl(baseUrl, + return BaseJob::makeRequestUrl(std::move(baseUrl), basePath % "/versions"); } diff --git a/lib/jobs/generated/whoami.cpp b/lib/jobs/generated/whoami.cpp index cc38fa4d..4c231b5f 100644 --- a/lib/jobs/generated/whoami.cpp +++ b/lib/jobs/generated/whoami.cpp @@ -20,7 +20,7 @@ class GetTokenOwnerJob::Private QUrl GetTokenOwnerJob::makeRequestUrl(QUrl baseUrl) { - return BaseJob::makeRequestUrl(baseUrl, + return BaseJob::makeRequestUrl(std::move(baseUrl), basePath % "/account/whoami"); } |