diff options
Diffstat (limited to 'converters.h')
-rw-r--r-- | converters.h | 6 |
1 files changed, 5 insertions, 1 deletions
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<const char*>(bytes)); +#if QT_VERSION < QT_VERSION_CHECK(5, 3, 0) + return QJsonValue(QLatin1String(bytes.constData())); +#else + return QJsonValue(bytes.constData()); +#endif } template <typename T> |