aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKitsune Ral <Kitsune-Ral@users.sf.net>2017-12-07 17:55:50 +0900
committerKitsune Ral <Kitsune-Ral@users.sf.net>2017-12-07 17:55:50 +0900
commit1796fb03406bc0a12a513218f6aaa34e9cd60734 (patch)
treec4d50636eac91b8a3d10a0ef77ff07a915be2050
parent6453ab3ea9a2781940d60e49bc28c38db0fbac79 (diff)
downloadlibquotient-1796fb03406bc0a12a513218f6aaa34e9cd60734.tar.gz
libquotient-1796fb03406bc0a12a513218f6aaa34e9cd60734.zip
Fix compilation with Qt 5.2
-rw-r--r--converters.h6
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>