tst_qfuture::signalConnect: Fix failure condition for MSVC

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 <marten.nordheim@qt.io>
(cherry picked from commit d8cb2044e3e86633c732f1f1b28926062b08b76c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
Oliver Wolff 2024-06-18 13:57:11 +02:00 committed by Qt Cherry-pick Bot
parent 5c17246188
commit 679807b506

View File

@ -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");