diff options
author | Edward Welbourne <edward.welbourne@qt.io> | 2019-04-11 12:02:17 +0200 |
---|---|---|
committer | Edward Welbourne <edward.welbourne@qt.io> | 2020-01-30 19:56:21 +0100 |
commit | 037369cc4d85c49e351c3df6544a398b61195656 (patch) | |
tree | 72679f5a745c6b057290f313545d7b279f62a96d /tests/auto | |
parent | 6a1df2d2060bfa346398f6125f33a4ff1b190a64 (diff) |
Deprecate QDateTime(const QDate &) in favor of QDate::startOfDay()
It needed re-implemented in terms of the new API (in case QTime(0, 0)
was skipped, on the date in question, by a spring-forwrd), which makes
it redundant (and supports choice of spec and zone or offset, which it
did not).
Change-Id: I1e3c3e794632c234f254be754ed6e4ebdaaaa6bc
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Diffstat (limited to 'tests/auto')
-rw-r--r-- | tests/auto/corelib/time/qdatetime/tst_qdatetime.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/auto/corelib/time/qdatetime/tst_qdatetime.cpp b/tests/auto/corelib/time/qdatetime/tst_qdatetime.cpp index 6aae91f62f..ec5f65ee56 100644 --- a/tests/auto/corelib/time/qdatetime/tst_qdatetime.cpp +++ b/tests/auto/corelib/time/qdatetime/tst_qdatetime.cpp @@ -2941,19 +2941,19 @@ void tst_QDateTime::fewDigitsInYear() const void tst_QDateTime::printNegativeYear() const { { - QDateTime date(QDate(-20, 10, 11)); + QDateTime date(QDate(-20, 10, 11).startOfDay()); QVERIFY(date.isValid()); QCOMPARE(date.toString(QLatin1String("yyyy")), QString::fromLatin1("-0020")); } { - QDateTime date(QDate(-3, 10, 11)); + QDateTime date(QDate(-3, 10, 11).startOfDay()); QVERIFY(date.isValid()); QCOMPARE(date.toString(QLatin1String("yyyy")), QString::fromLatin1("-0003")); } { - QDateTime date(QDate(-400, 10, 11)); + QDateTime date(QDate(-400, 10, 11).startOfDay()); QVERIFY(date.isValid()); QCOMPARE(date.toString(QLatin1String("yyyy")), QString::fromLatin1("-0400")); } |