aboutsummaryrefslogtreecommitdiff
path: root/converters.h
diff options
context:
space:
mode:
authorKitsune Ral <Kitsune-Ral@users.sf.net>2018-03-24 15:25:40 +0900
committerKitsune Ral <Kitsune-Ral@users.sf.net>2018-03-24 16:25:54 +0900
commit47cb949973a05cea6fb3a13ffd19b6e07e7720ae (patch)
tree95c54ee17a7da4ad738ebeb6f85d86cec6ed14f5 /converters.h
parentde75f8f525c6dfe599580018d4a5dbb885dfa456 (diff)
downloadlibquotient-47cb949973a05cea6fb3a13ffd19b6e07e7720ae.tar.gz
libquotient-47cb949973a05cea6fb3a13ffd19b6e07e7720ae.zip
Work around a bug in MSVC leading to "ambiguous call" compilation error
Diffstat (limited to 'converters.h')
-rw-r--r--converters.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/converters.h b/converters.h
index f7d99f48..bba298e0 100644
--- a/converters.h
+++ b/converters.h
@@ -28,6 +28,9 @@ namespace QMatrixClient
inline QJsonValue toJson(const QJsonValue& val) { return val; }
inline QJsonObject toJson(const QJsonObject& o) { return o; }
inline QJsonArray toJson(const QJsonArray& arr) { return arr; }
+#ifdef _MSC_VER // MSVC gets lost and doesn't know which overload to use
+ inline QJsonValue toJson(const QString& s) { return s; }
+#endif
template <typename T>
inline QJsonArray toJson(const QVector<T>& vals)