diff options
author | Sona Kurazyan <sona.kurazyan@qt.io> | 2019-06-26 12:48:21 +0200 |
---|---|---|
committer | Sona Kurazyan <sona.kurazyan@qt.io> | 2019-07-02 09:49:36 +0200 |
commit | 8c8eae279d57ff73b69620f5710b8290d6268051 (patch) | |
tree | 691fd40336447f6c5874e350a19f86810709a3af /tests/auto/widgets/widgets/qdatetimeedit | |
parent | c34242c679aaea6ee1badf6c1e5f274f925f5f50 (diff) |
Remove usages of deprecated APIs from QDateTime
- Replaced the usages of:
* QDateTime::toTime_t() -> QDateTime::toSecsSinceEpoch().
* QDateTime::fromTime_t() -> QDateTime::fromSecsSinceEpoch().
* QDate::shortDayName() -> QLocale::system().dayName().
* QTime by QElapsedTimer, where the deprecated methods of QTime
were used.
- Modified the tests for the deprecated methods to be enabled only
when the corresponding methods are enabled: when the deprecated
APIs are disabled, the tests will be also disabled, and the
compilation won't be broken.
Task-number: QTBUG-76491
Change-Id: I4d565db2329e580c567aae511696eb1efe120843
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'tests/auto/widgets/widgets/qdatetimeedit')
-rw-r--r-- | tests/auto/widgets/widgets/qdatetimeedit/tst_qdatetimeedit.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/auto/widgets/widgets/qdatetimeedit/tst_qdatetimeedit.cpp b/tests/auto/widgets/widgets/qdatetimeedit/tst_qdatetimeedit.cpp index c6f6900def..cd045e476c 100644 --- a/tests/auto/widgets/widgets/qdatetimeedit/tst_qdatetimeedit.cpp +++ b/tests/auto/widgets/widgets/qdatetimeedit/tst_qdatetimeedit.cpp @@ -3454,7 +3454,7 @@ void tst_QDateTimeEdit::timeSpec() } QVERIFY(edit.minimumTime() != min.time()); QVERIFY(edit.minimumDateTime().timeSpec() != min.timeSpec()); - QCOMPARE(edit.minimumDateTime().toTime_t(), min.toTime_t()); + QCOMPARE(edit.minimumDateTime().toSecsSinceEpoch(), min.toSecsSinceEpoch()); } else { QSKIP("Not tested in the GMT timezone"); } |