aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt2
-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
7 files changed, 7 insertions, 7 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ce2463bf..29dea14a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -262,7 +262,7 @@ file(GLOB_RECURSE api_SRCS ${add_CONFIGURE_DEPENDS} ${FULL_CSAPI_DIR}/*.cpp)
set(tests_SRCS tests/quotest.cpp)
add_library(${PROJECT_NAME} ${lib_SRCS} ${api_SRCS})
-target_compile_definitions(${PROJECT_NAME} PRIVATE QT_NO_JAVA_STYLE_ITERATORS)
+target_compile_definitions(${PROJECT_NAME} PRIVATE QT_NO_JAVA_STYLE_ITERATORS QT_NO_URL_CAST_FROM_STRING QT_NO_CAST_TO_ASCII)
if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.16.0"
AND NOT CMAKE_CXX_COMPILER_ID STREQUAL GNU) # https://bugzilla.redhat.com/show_bug.cgi?id=1721553
target_precompile_headers(${PROJECT_NAME} PRIVATE lib/converters.h)
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()
{