aboutsummaryrefslogtreecommitdiff
path: root/lib/converters.h
diff options
context:
space:
mode:
authorAlexey Rusakov <Kitsune-Ral@users.sf.net>2022-06-18 21:26:43 +0200
committerAlexey Rusakov <Kitsune-Ral@users.sf.net>2022-06-18 21:26:43 +0200
commit6b355d1aa87072143e09ea5269e8cf465318a64f (patch)
tree5de8b227d319e8c677ef4ea3d7931233a808bd5a /lib/converters.h
parent2dd85770cbfd6d9c7506757f25765c05ef74987d (diff)
downloadlibquotient-6b355d1aa87072143e09ea5269e8cf465318a64f.tar.gz
libquotient-6b355d1aa87072143e09ea5269e8cf465318a64f.zip
Drop pre-Qt 5.15 code
Diffstat (limited to 'lib/converters.h')
-rw-r--r--lib/converters.h10
1 files changed, 1 insertions, 9 deletions
diff --git a/lib/converters.h b/lib/converters.h
index da30cae6..c985fd60 100644
--- a/lib/converters.h
+++ b/lib/converters.h
@@ -188,15 +188,7 @@ inline QDateTime fromJson(const QJsonValue& jv)
return QDateTime::fromMSecsSinceEpoch(fromJson<qint64>(jv), Qt::UTC);
}
-inline QJsonValue toJson(const QDate& val) {
- return toJson(
-#if QT_VERSION < QT_VERSION_CHECK(5, 14, 0)
- QDateTime(val)
-#else
- val.startOfDay()
-#endif
- );
-}
+inline QJsonValue toJson(const QDate& val) { return toJson(val.startOfDay()); }
template <>
inline QDate fromJson(const QJsonValue& jv)
{