diff options
Diffstat (limited to 'lib/jobs/generated')
-rw-r--r-- | lib/jobs/generated/administrative_contact.cpp | 18 | ||||
-rw-r--r-- | lib/jobs/generated/create_room.cpp | 20 | ||||
-rw-r--r-- | lib/jobs/generated/list_public_rooms.cpp | 50 | ||||
-rw-r--r-- | lib/jobs/generated/pusher.cpp | 32 | ||||
-rw-r--r-- | lib/jobs/generated/users.cpp | 10 |
5 files changed, 65 insertions, 65 deletions
diff --git a/lib/jobs/generated/administrative_contact.cpp b/lib/jobs/generated/administrative_contact.cpp index 78eb21fe..fc75fd85 100644 --- a/lib/jobs/generated/administrative_contact.cpp +++ b/lib/jobs/generated/administrative_contact.cpp @@ -23,14 +23,14 @@ namespace QMatrixClient template <> struct FromJson<GetAccount3PIDsJob::ThirdPartyIdentifier> { - GetAccount3PIDsJob::ThirdPartyIdentifier operator()(QJsonValue jv) + GetAccount3PIDsJob::ThirdPartyIdentifier operator()(const QJsonValue& jv) { - QJsonObject o = jv.toObject(); + const auto& o = jv.toObject(); GetAccount3PIDsJob::ThirdPartyIdentifier result; result.medium = - fromJson<QString>(o.value("medium")); + fromJson<QString>(o.value("medium")); result.address = - fromJson<QString>(o.value("address")); + fromJson<QString>(o.value("address")); return result; } @@ -84,16 +84,16 @@ namespace QMatrixClient template <> struct FromJson<Post3PIDsJob::ThreePidCredentials> { - Post3PIDsJob::ThreePidCredentials operator()(QJsonValue jv) + Post3PIDsJob::ThreePidCredentials operator()(const QJsonValue& jv) { - QJsonObject o = jv.toObject(); + const auto& o = jv.toObject(); Post3PIDsJob::ThreePidCredentials result; result.clientSecret = - fromJson<QString>(o.value("client_secret")); + fromJson<QString>(o.value("client_secret")); result.idServer = - fromJson<QString>(o.value("id_server")); + fromJson<QString>(o.value("id_server")); result.sid = - fromJson<QString>(o.value("sid")); + fromJson<QString>(o.value("sid")); return result; } diff --git a/lib/jobs/generated/create_room.cpp b/lib/jobs/generated/create_room.cpp index 008bc697..4fc75974 100644 --- a/lib/jobs/generated/create_room.cpp +++ b/lib/jobs/generated/create_room.cpp @@ -24,16 +24,16 @@ namespace QMatrixClient template <> struct FromJson<CreateRoomJob::Invite3pid> { - CreateRoomJob::Invite3pid operator()(QJsonValue jv) + CreateRoomJob::Invite3pid operator()(const QJsonValue& jv) { - QJsonObject o = jv.toObject(); + const auto& o = jv.toObject(); CreateRoomJob::Invite3pid result; result.idServer = - fromJson<QString>(o.value("id_server")); + fromJson<QString>(o.value("id_server")); result.medium = - fromJson<QString>(o.value("medium")); + fromJson<QString>(o.value("medium")); result.address = - fromJson<QString>(o.value("address")); + fromJson<QString>(o.value("address")); return result; } @@ -54,16 +54,16 @@ namespace QMatrixClient template <> struct FromJson<CreateRoomJob::StateEvent> { - CreateRoomJob::StateEvent operator()(QJsonValue jv) + CreateRoomJob::StateEvent operator()(const QJsonValue& jv) { - QJsonObject o = jv.toObject(); + const auto& o = jv.toObject(); CreateRoomJob::StateEvent result; result.type = - fromJson<QString>(o.value("type")); + fromJson<QString>(o.value("type")); result.stateKey = - fromJson<QString>(o.value("state_key")); + fromJson<QString>(o.value("state_key")); result.content = - fromJson<QJsonObject>(o.value("content")); + fromJson<QJsonObject>(o.value("content")); return result; } diff --git a/lib/jobs/generated/list_public_rooms.cpp b/lib/jobs/generated/list_public_rooms.cpp index 2ae7f5d3..35a670fb 100644 --- a/lib/jobs/generated/list_public_rooms.cpp +++ b/lib/jobs/generated/list_public_rooms.cpp @@ -73,28 +73,28 @@ namespace QMatrixClient template <> struct FromJson<GetPublicRoomsJob::PublicRoomsChunk> { - GetPublicRoomsJob::PublicRoomsChunk operator()(QJsonValue jv) + GetPublicRoomsJob::PublicRoomsChunk operator()(const QJsonValue& jv) { - QJsonObject o = jv.toObject(); + const auto& o = jv.toObject(); GetPublicRoomsJob::PublicRoomsChunk result; result.aliases = - fromJson<QVector<QString>>(o.value("aliases")); + fromJson<QVector<QString>>(o.value("aliases")); result.canonicalAlias = - fromJson<QString>(o.value("canonical_alias")); + fromJson<QString>(o.value("canonical_alias")); result.name = - fromJson<QString>(o.value("name")); + fromJson<QString>(o.value("name")); result.numJoinedMembers = - fromJson<double>(o.value("num_joined_members")); + fromJson<double>(o.value("num_joined_members")); result.roomId = - fromJson<QString>(o.value("room_id")); + fromJson<QString>(o.value("room_id")); result.topic = - fromJson<QString>(o.value("topic")); + fromJson<QString>(o.value("topic")); result.worldReadable = - fromJson<bool>(o.value("world_readable")); + fromJson<bool>(o.value("world_readable")); result.guestCanJoin = - fromJson<bool>(o.value("guest_can_join")); + fromJson<bool>(o.value("guest_can_join")); result.avatarUrl = - fromJson<QString>(o.value("avatar_url")); + fromJson<QString>(o.value("avatar_url")); return result; } @@ -184,12 +184,12 @@ namespace QMatrixClient template <> struct FromJson<QueryPublicRoomsJob::Filter> { - QueryPublicRoomsJob::Filter operator()(QJsonValue jv) + QueryPublicRoomsJob::Filter operator()(const QJsonValue& jv) { - QJsonObject o = jv.toObject(); + const auto& o = jv.toObject(); QueryPublicRoomsJob::Filter result; result.genericSearchTerm = - fromJson<QString>(o.value("generic_search_term")); + fromJson<QString>(o.value("generic_search_term")); return result; } @@ -216,28 +216,28 @@ namespace QMatrixClient template <> struct FromJson<QueryPublicRoomsJob::PublicRoomsChunk> { - QueryPublicRoomsJob::PublicRoomsChunk operator()(QJsonValue jv) + QueryPublicRoomsJob::PublicRoomsChunk operator()(const QJsonValue& jv) { - QJsonObject o = jv.toObject(); + const auto& o = jv.toObject(); QueryPublicRoomsJob::PublicRoomsChunk result; result.aliases = - fromJson<QVector<QString>>(o.value("aliases")); + fromJson<QVector<QString>>(o.value("aliases")); result.canonicalAlias = - fromJson<QString>(o.value("canonical_alias")); + fromJson<QString>(o.value("canonical_alias")); result.name = - fromJson<QString>(o.value("name")); + fromJson<QString>(o.value("name")); result.numJoinedMembers = - fromJson<double>(o.value("num_joined_members")); + fromJson<double>(o.value("num_joined_members")); result.roomId = - fromJson<QString>(o.value("room_id")); + fromJson<QString>(o.value("room_id")); result.topic = - fromJson<QString>(o.value("topic")); + fromJson<QString>(o.value("topic")); result.worldReadable = - fromJson<bool>(o.value("world_readable")); + fromJson<bool>(o.value("world_readable")); result.guestCanJoin = - fromJson<bool>(o.value("guest_can_join")); + fromJson<bool>(o.value("guest_can_join")); result.avatarUrl = - fromJson<QString>(o.value("avatar_url")); + fromJson<QString>(o.value("avatar_url")); return result; } diff --git a/lib/jobs/generated/pusher.cpp b/lib/jobs/generated/pusher.cpp index 2937c124..4a9bde95 100644 --- a/lib/jobs/generated/pusher.cpp +++ b/lib/jobs/generated/pusher.cpp @@ -22,12 +22,12 @@ namespace QMatrixClient template <> struct FromJson<GetPushersJob::PusherData> { - GetPushersJob::PusherData operator()(QJsonValue jv) + GetPushersJob::PusherData operator()(const QJsonValue& jv) { - QJsonObject o = jv.toObject(); + const auto& o = jv.toObject(); GetPushersJob::PusherData result; result.url = - fromJson<QString>(o.value("url")); + fromJson<QString>(o.value("url")); return result; } @@ -53,26 +53,26 @@ namespace QMatrixClient template <> struct FromJson<GetPushersJob::Pusher> { - GetPushersJob::Pusher operator()(QJsonValue jv) + GetPushersJob::Pusher operator()(const QJsonValue& jv) { - QJsonObject o = jv.toObject(); + const auto& o = jv.toObject(); GetPushersJob::Pusher result; result.pushkey = - fromJson<QString>(o.value("pushkey")); + fromJson<QString>(o.value("pushkey")); result.kind = - fromJson<QString>(o.value("kind")); + fromJson<QString>(o.value("kind")); result.appId = - fromJson<QString>(o.value("app_id")); + fromJson<QString>(o.value("app_id")); result.appDisplayName = - fromJson<QString>(o.value("app_display_name")); + fromJson<QString>(o.value("app_display_name")); result.deviceDisplayName = - fromJson<QString>(o.value("device_display_name")); + fromJson<QString>(o.value("device_display_name")); result.profileTag = - fromJson<QString>(o.value("profile_tag")); + fromJson<QString>(o.value("profile_tag")); result.lang = - fromJson<QString>(o.value("lang")); + fromJson<QString>(o.value("lang")); result.data = - fromJson<GetPushersJob::PusherData>(o.value("data")); + fromJson<GetPushersJob::PusherData>(o.value("data")); return result; } @@ -124,12 +124,12 @@ namespace QMatrixClient template <> struct FromJson<PostPusherJob::PusherData> { - PostPusherJob::PusherData operator()(QJsonValue jv) + PostPusherJob::PusherData operator()(const QJsonValue& jv) { - QJsonObject o = jv.toObject(); + const auto& o = jv.toObject(); PostPusherJob::PusherData result; result.url = - fromJson<QString>(o.value("url")); + fromJson<QString>(o.value("url")); return result; } diff --git a/lib/jobs/generated/users.cpp b/lib/jobs/generated/users.cpp index b222cac5..6af3be3c 100644 --- a/lib/jobs/generated/users.cpp +++ b/lib/jobs/generated/users.cpp @@ -24,16 +24,16 @@ namespace QMatrixClient template <> struct FromJson<SearchUserDirectoryJob::User> { - SearchUserDirectoryJob::User operator()(QJsonValue jv) + SearchUserDirectoryJob::User operator()(const QJsonValue& jv) { - QJsonObject o = jv.toObject(); + const auto& o = jv.toObject(); SearchUserDirectoryJob::User result; result.userId = - fromJson<QString>(o.value("user_id")); + fromJson<QString>(o.value("user_id")); result.displayName = - fromJson<QString>(o.value("display_name")); + fromJson<QString>(o.value("display_name")); result.avatarUrl = - fromJson<QString>(o.value("avatar_url")); + fromJson<QString>(o.value("avatar_url")); return result; } |