aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmllocale.cpp
diff options
context:
space:
mode:
authorEdward Welbourne <edward.welbourne@qt.io>2022-08-19 17:03:26 +0200
committerEdward Welbourne <edward.welbourne@qt.io>2022-12-11 14:13:09 +0100
commitf01de8f397d855c1aa8d80e5f9c858897a9b11b1 (patch)
tree65ae84f328eded18287545669fcedf2239c2e3ed /src/qml/qml/qqmllocale.cpp
parent326145fcb8cc27d2b937d97531c1bd24aedc5b92 (diff)
Route Qt::TimeSpec usage via QTimeZone
QTimeZone now packages Qt::TimeSpec details, unifying QDateTime APIs. Task-number: QTBUG-108199 Change-Id: I4a6bfaa213ec6db2fb357d20c7cd59e8c58ad103 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src/qml/qml/qqmllocale.cpp')
-rw-r--r--src/qml/qml/qqmllocale.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/qml/qml/qqmllocale.cpp b/src/qml/qml/qqmllocale.cpp
index a34fad4901..a7eeb3b4d7 100644
--- a/src/qml/qml/qqmllocale.cpp
+++ b/src/qml/qml/qqmllocale.cpp
@@ -5,6 +5,7 @@
#include <private/qqmlcontext_p.h>
#include <QtCore/qnumeric.h>
#include <QtCore/qdatetime.h>
+#include <QtCore/qtimezone.h>
#include <private/qlocale_p.h>
#include <private/qlocale_data_p.h>
@@ -277,7 +278,7 @@ ReturnedValue QQmlDateExtension::method_fromLocaleDateString(const QV4::Function
QLocale locale;
QString dateString = s->toQString();
QDate date = locale.toDate(dateString);
- RETURN_RESULT(engine->newDateObject(date.startOfDay(Qt::UTC)));
+ RETURN_RESULT(engine->newDateObject(date.startOfDay(QTimeZone::UTC)));
}
}
@@ -304,7 +305,7 @@ ReturnedValue QQmlDateExtension::method_fromLocaleDateString(const QV4::Function
dt = r->d()->locale->toDate(dateString, enumFormat);
}
- RETURN_RESULT(engine->newDateObject(dt.startOfDay(Qt::UTC)));
+ RETURN_RESULT(engine->newDateObject(dt.startOfDay(QTimeZone::UTC)));
}
ReturnedValue QQmlDateExtension::method_timeZoneUpdated(const QV4::FunctionObject *b, const QV4::Value *, const QV4::Value *, int argc)