From a872a3a73c38fec3ec7c44971593a29982faaf8d Mon Sep 17 00:00:00 2001 From: Edward Welbourne Date: Thu, 6 Mar 2025 16:33:12 +0100 Subject: [PATCH] Narrow some #if-ery on QT_BUILD_INTERNAL to test more normally Only a small early part of tst_QTimeZone::utcTest() actually needed access to internal APIs, so only apply the #if-ery to that part. Pick-to: 6.8 6.5 5.15 Change-Id: Ifebd70005f87bbef5d03fa24fe33134fd802e2e5 Reviewed-by: Thiago Macieira (cherry picked from commit 92ec27e461ef3d3567cad11c5ca83368b985669d) Reviewed-by: Qt Cherry-pick Bot --- tests/auto/corelib/time/qtimezone/tst_qtimezone.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/auto/corelib/time/qtimezone/tst_qtimezone.cpp b/tests/auto/corelib/time/qtimezone/tst_qtimezone.cpp index acf8e80f775..ec527c4d311 100644 --- a/tests/auto/corelib/time/qtimezone/tst_qtimezone.cpp +++ b/tests/auto/corelib/time/qtimezone/tst_qtimezone.cpp @@ -1326,6 +1326,7 @@ void tst_QTimeZone::utcTest() QCOMPARE(tzp.daylightTimeOffset(0), 0); QCOMPARE(tzp.hasDaylightTime(), false); QCOMPARE(tzp.hasTransitions(), false); +#endif // QT_BUILD_INTERNAL // Test UTC accessor const QDateTime now = QDateTime::currentDateTime(); @@ -1386,7 +1387,6 @@ void tst_QTimeZone::utcTest() QCOMPARE(tz.offsetFromUtc(now), 123456); QCOMPARE(tz.standardTimeOffset(now), 123456); QCOMPARE(tz.daylightTimeOffset(now), 0); -#endif // QT_BUILD_INTERNAL } // Relies on local variable names: zone tzp and locale enUS.