diff options
author | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2021-01-15 13:10:41 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-15 13:10:41 +0100 |
commit | 8d9684a4ceec239daf66ff98effe46ab70a3f6a4 (patch) | |
tree | 878a6db1895d75c89292b8278731d63fadf248e1 /lib/events | |
parent | b0d3ecc774ca4aec24bceb5ec1f1ded844a7213a (diff) | |
parent | 544ec34b4563aacac6fd5b2f4aa64813096cd4b8 (diff) | |
download | libquotient-8d9684a4ceec239daf66ff98effe46ab70a3f6a4.tar.gz libquotient-8d9684a4ceec239daf66ff98effe46ab70a3f6a4.zip |
Merge pull request #417 from dfaure/dfaure/stricter-flags
Enable QT_NO_URL_CAST_FROM_STRING and QT_STRICT_ITERATORS.
Diffstat (limited to 'lib/events')
-rw-r--r-- | lib/events/eventcontent.cpp | 2 | ||||
-rw-r--r-- | lib/events/eventcontent.h | 2 | ||||
-rw-r--r-- | lib/events/roommemberevent.cpp | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/lib/events/eventcontent.cpp b/lib/events/eventcontent.cpp index d7b109f7..18b1b94b 100644 --- a/lib/events/eventcontent.cpp +++ b/lib/events/eventcontent.cpp @@ -77,7 +77,7 @@ void ImageInfo::fillInfoJson(QJsonObject* infoJson) const } Thumbnail::Thumbnail(const QJsonObject& infoJson) - : ImageInfo(infoJson["thumbnail_url"_ls].toString(), + : ImageInfo(QUrl(infoJson["thumbnail_url"_ls].toString()), infoJson["thumbnail_info"_ls].toObject()) {} diff --git a/lib/events/eventcontent.h b/lib/events/eventcontent.h index e0e4a5db..e247adbf 100644 --- a/lib/events/eventcontent.h +++ b/lib/events/eventcontent.h @@ -177,7 +177,7 @@ namespace EventContent { using InfoT::InfoT; explicit UrlBasedContent(const QJsonObject& json) : TypedBase(json) - , InfoT(json["url"].toString(), json["info"].toObject(), + , InfoT(QUrl(json["url"].toString()), json["info"].toObject(), json["filename"].toString()) { // A small hack to facilitate links creation in QML. diff --git a/lib/events/roommemberevent.cpp b/lib/events/roommemberevent.cpp index 6f5d5a52..d093286c 100644 --- a/lib/events/roommemberevent.cpp +++ b/lib/events/roommemberevent.cpp @@ -40,7 +40,7 @@ MemberEventContent::MemberEventContent(const QJsonObject& json) : membership(fromJson<MembershipType>(json["membership"_ls])) , isDirect(json["is_direct"_ls].toBool()) , displayName(fromJson<Omittable<QString>>(json["displayname"_ls])) - , avatarUrl(fromJson<Omittable<QUrl>>(json["avatar_url"_ls])) + , avatarUrl(fromJson<Omittable<QString>>(json["avatar_url"_ls])) , reason(json["reason"_ls].toString()) { if (displayName) |