summaryrefslogtreecommitdiffstats
path: root/tests/benchmarks/corelib/time
diff options
context:
space:
mode:
authorEdward Welbourne <edward.welbourne@qt.io>2022-09-26 18:35:44 +0200
committerEdward Welbourne <edward.welbourne@qt.io>2022-12-10 06:39:33 +0100
commit8c8d6ff7b6e2e6b1b673051685f1499ae4d65e05 (patch)
treeb17be6e3a2e1ac84ca36e5d528e3e79ce037c128 /tests/benchmarks/corelib/time
parent074a4e16a3899652247714fc18881e97e4fcdaed (diff)
Deprecate QDateTime methods using plain Qt::TimeSpec
As foreshadowed when QDateTime adapted to route all QTimeSpec use through QTimeZone, this commit deprecates the old API in favor of the newly more capable QTimeZone-based API. Fixes: QTBUG-108199 Change-Id: I9a3f9f94d4a5d8cc229db72b3e4731a9e318a076 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'tests/benchmarks/corelib/time')
-rw-r--r--tests/benchmarks/corelib/time/qdatetime/tst_bench_qdatetime.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/benchmarks/corelib/time/qdatetime/tst_bench_qdatetime.cpp b/tests/benchmarks/corelib/time/qdatetime/tst_bench_qdatetime.cpp
index 3ba5b5fb9f..1213f3b133 100644
--- a/tests/benchmarks/corelib/time/qdatetime/tst_bench_qdatetime.cpp
+++ b/tests/benchmarks/corelib/time/qdatetime/tst_bench_qdatetime.cpp
@@ -31,8 +31,10 @@ private Q_SLOTS:
void toMSecsSinceEpochTz();
void setDate();
void setTime();
+#if QT_DEPRECATED_SINCE(6, 9)
void setTimeSpec();
void setOffsetFromUtc();
+#endif
void setMSecsSinceEpoch();
void setMSecsSinceEpochTz();
void toString();
@@ -42,8 +44,10 @@ private Q_SLOTS:
void addDaysTz();
void addMSecs();
void addMSecsTz();
+#if QT_DEPRECATED_SINCE(6, 9)
void toTimeSpec();
void toOffsetFromUtc();
+#endif
void daysTo();
void msecsTo();
void equivalent();
@@ -228,6 +232,9 @@ void tst_QDateTime::setTime()
}
}
+#if QT_DEPRECATED_SINCE(6, 9)
+QT_WARNING_PUSH
+QT_WARNING_DISABLE_DEPRECATED
void tst_QDateTime::setTimeSpec()
{
const auto list = daily(JULIAN_DAY_2010, JULIAN_DAY_2020);
@@ -245,6 +252,8 @@ void tst_QDateTime::setOffsetFromUtc()
test.setOffsetFromUtc(3600);
}
}
+QT_WARNING_POP
+#endif // 6.9 deprecation
void tst_QDateTime::setMSecsSinceEpoch()
{
@@ -333,6 +342,9 @@ void tst_QDateTime::addMSecsTz()
}
}
+#if QT_DEPRECATED_SINCE(6, 9)
+QT_WARNING_PUSH
+QT_WARNING_DISABLE_DEPRECATED
void tst_QDateTime::toTimeSpec()
{
const auto list = daily(JULIAN_DAY_2010, JULIAN_DAY_2020);
@@ -350,6 +362,8 @@ void tst_QDateTime::toOffsetFromUtc()
test.toOffsetFromUtc(3600);
}
}
+QT_WARNING_POP
+#endif
void tst_QDateTime::daysTo()
{