From eedb715ece5beabd1db731d0d003cf8112360f7c 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] Pick-to: 6.6 Change-Id: I8f3ce163ccc5408cac39fffd178dc618f1a8f034 Reviewed-by: Samuel Gaist --- 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 fb313d4968..cf5955902a 100644 --- a/src/corelib/global/qtenvironmentvariables.cpp +++ b/src/corelib/global/qtenvironmentvariables.cpp @@ -408,7 +408,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);