From 1796fb03406bc0a12a513218f6aaa34e9cd60734 Mon Sep 17 00:00:00 2001 From: Kitsune Ral Date: Thu, 7 Dec 2017 17:55:50 +0900 Subject: Fix compilation with Qt 5.2 --- converters.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/converters.h b/converters.h index 9b78eb37..00d1d339 100644 --- a/converters.h +++ b/converters.h @@ -46,7 +46,11 @@ namespace QMatrixClient inline QJsonValue toJson(const QByteArray& bytes) { - return QJsonValue(static_cast(bytes)); +#if QT_VERSION < QT_VERSION_CHECK(5, 3, 0) + return QJsonValue(QLatin1String(bytes.constData())); +#else + return QJsonValue(bytes.constData()); +#endif } template -- cgit v1.2.3