aboutsummaryrefslogtreecommitdiff
path: root/lib/converters.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/converters.h')
-rw-r--r--lib/converters.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/converters.h b/lib/converters.h
index 1e828393..7f78effe 100644
--- a/lib/converters.h
+++ b/lib/converters.h
@@ -163,6 +163,11 @@ namespace QMatrixClient
auto operator()(const QJsonValue& jv) const { return jv.toDouble(); }
};
+ template <> struct FromJson<float>
+ {
+ auto operator()(const QJsonValue& jv) const { return float(jv.toDouble()); }
+ };
+
template <> struct FromJson<qint64>
{
auto operator()(const QJsonValue& jv) const { return qint64(jv.toDouble()); }