From 679807b50636e98c7f87dd39af6ca4ce3c6dd8ac Mon Sep 17 00:00:00 2001 From: Oliver Wolff Date: Tue, 18 Jun 2024 13:57:11 +0200 Subject: [PATCH] tst_qfuture::signalConnect: Fix failure condition for MSVC MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The test failure seems to be related to code optimizations and not to the c++ standard that is used. With a recent version of MSVC (>=19.40) the test fails on both x64 as well as ARM64 if the build configuration does code optimizations (aka we have a release build). Pick-to: 6.7 Fixes: QTBUG-126349 Change-Id: I01781ea5b20f80a6cbd7ccb284d30b5d078ad958 Reviewed-by: MÃ¥rten Nordheim (cherry picked from commit d8cb2044e3e86633c732f1f1b28926062b08b76c) Reviewed-by: Qt Cherry-pick Bot --- tests/auto/corelib/thread/qfuture/tst_qfuture.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/auto/corelib/thread/qfuture/tst_qfuture.cpp b/tests/auto/corelib/thread/qfuture/tst_qfuture.cpp index 4cb29c514a7..ae412fb2bdf 100644 --- a/tests/auto/corelib/thread/qfuture/tst_qfuture.cpp +++ b/tests/auto/corelib/thread/qfuture/tst_qfuture.cpp @@ -3915,7 +3915,7 @@ void tst_QFuture::signalConnect() { SenderObject sender; -#if defined(Q_CC_MSVC_ONLY) && (Q_CC_MSVC < 1940 || __cplusplus < 202002L) +#if defined(Q_CC_MSVC_ONLY) && (Q_CC_MSVC < 1940 || !defined(_DEBUG)) #define EXPECT_FUTURE_CONNECT_FAIL() QEXPECT_FAIL("", "QTBUG-101761, test fails on Windows/MSVC", Continue) #else QTest::ignoreMessage(QtWarningMsg, "QObject::connect: signal not found in SenderObject");