Skip to content

Commit

Permalink
tst_qfuture::signalConnect: Fix failure condition for MSVC
Browse files Browse the repository at this point in the history
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 6.8
Fixes: QTBUG-126349
Change-Id: I01781ea5b20f80a6cbd7ccb284d30b5d078ad958
Reviewed-by: Mårten Nordheim <[email protected]>
  • Loading branch information
owolff committed Jun 20, 2024
1 parent 672382c commit d8cb204
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/auto/corelib/thread/qfuture/tst_qfuture.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down

0 comments on commit d8cb204

Please sign in to comment.