aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/events/eventcontent.cpp2
-rw-r--r--lib/events/eventcontent.h2
-rw-r--r--lib/events/roommemberevent.cpp2
-rw-r--r--lib/jobs/basejob.cpp2
-rw-r--r--lib/room.cpp2
-rw-r--r--lib/ssosession.cpp2
6 files changed, 6 insertions, 6 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)
diff --git a/lib/jobs/basejob.cpp b/lib/jobs/basejob.cpp
index ada7337b..a0c88581 100644
--- a/lib/jobs/basejob.cpp
+++ b/lib/jobs/basejob.cpp
@@ -532,7 +532,7 @@ BaseJob::Status BaseJob::prepareError()
}
if (errCode == "M_CONSENT_NOT_GIVEN") {
- d->errorUrl = errorJson.value("consent_uri"_ls).toString();
+ d->errorUrl = QUrl(errorJson.value("consent_uri"_ls).toString());
return { UserConsentRequiredError };
}
if (errCode == "M_UNSUPPORTED_ROOM_VERSION"
diff --git a/lib/room.cpp b/lib/room.cpp
index 89ac17de..bc89464d 100644
--- a/lib/room.cpp
+++ b/lib/room.cpp
@@ -1974,7 +1974,7 @@ void Room::uploadFile(const QString& id, const QUrl& localFilename,
});
connect(job, &BaseJob::success, this, [this, id, localFilename, job] {
d->fileTransfers[id].status = FileTransferInfo::Completed;
- emit fileTransferCompleted(id, localFilename, job->contentUri());
+ emit fileTransferCompleted(id, localFilename, QUrl(job->contentUri()));
});
connect(job, &BaseJob::failure, this,
std::bind(&Private::failedTransfer, d, id, job->errorString()));
diff --git a/lib/ssosession.cpp b/lib/ssosession.cpp
index be701204..3c6ec48b 100644
--- a/lib/ssosession.cpp
+++ b/lib/ssosession.cpp
@@ -70,7 +70,7 @@ SsoSession::~SsoSession()
QUrl SsoSession::ssoUrl() const { return d->ssoUrl; }
-QUrl SsoSession::callbackUrl() const { return d->callbackUrl; }
+QUrl SsoSession::callbackUrl() const { return QUrl(d->callbackUrl); }
void SsoSession::Private::processCallback()
{