From 5306eac755bd8dd8d6f9e894fa0d5d70e783e5df Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Fri, 13 Oct 2023 13:54:05 -0700 Subject: [PATCH] qTzName: suppress warning that tzname is deprecated with UCRT Use the pre-existing MSVC code path, which uses UCRT. warning: 'tzname' is deprecated: Only provided for source compatibility; this variable might not always be accurate when linking to UCRT. [-Wdeprecated-declarations] Change-Id: I8f3ce163ccc5408cac39fffd178dc618f1a8f034 Reviewed-by: Samuel Gaist (cherry picked from commit eedb715ece5beabd1db731d0d003cf8112360f7c) Reviewed-by: Qt Cherry-pick Bot --- src/corelib/global/qtenvironmentvariables.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/corelib/global/qtenvironmentvariables.cpp b/src/corelib/global/qtenvironmentvariables.cpp index 47fc8f7eecc..9e2ffe54a9d 100644 --- a/src/corelib/global/qtenvironmentvariables.cpp +++ b/src/corelib/global/qtenvironmentvariables.cpp @@ -404,7 +404,7 @@ QString qTzName(int dstIndex) { char name[512]; bool ok; -#if defined(Q_CC_MSVC) +#if defined(_UCRT) // i.e., MSVC and MinGW-UCRT size_t s = 0; { const auto locker = qt_scoped_lock(environmentMutex);