diff options
-rw-r--r-- | cmake/QtInternalTargets.cmake | 1 | ||||
-rw-r--r-- | tests/auto/corelib/kernel/qobject/tst_qobject.cpp | 5 |
2 files changed, 6 insertions, 0 deletions
diff --git a/cmake/QtInternalTargets.cmake b/cmake/QtInternalTargets.cmake index 02be218ebe..4f3aaab919 100644 --- a/cmake/QtInternalTargets.cmake +++ b/cmake/QtInternalTargets.cmake @@ -140,6 +140,7 @@ if (ANDROID AND NOT CMAKE_HOST_WIN32) target_link_options(PlatformModuleInternal INTERFACE -fuse-ld=lld) endif() +target_compile_definitions(PlatformCommonInternal INTERFACE QT_NO_NARROWING_CONVERSIONS_IN_CONNECT) target_compile_definitions(PlatformCommonInternal INTERFACE $<$<NOT:$<CONFIG:Debug>>:QT_NO_DEBUG>) function(qt_internal_apply_bitcode_flags target) diff --git a/tests/auto/corelib/kernel/qobject/tst_qobject.cpp b/tests/auto/corelib/kernel/qobject/tst_qobject.cpp index 4023a3ae19..1630c0ede4 100644 --- a/tests/auto/corelib/kernel/qobject/tst_qobject.cpp +++ b/tests/auto/corelib/kernel/qobject/tst_qobject.cpp @@ -27,6 +27,11 @@ ** ****************************************************************************/ +// This test actually wants to practice narrowing conditions, so never define this. +#ifdef QT_NO_NARROWING_CONVERSIONS_IN_CONNECT +#undef QT_NO_NARROWING_CONVERSIONS_IN_CONNECT +#endif + #include <QTest> #include <QtTest/private/qpropertytesthelper_p.h> #include <QStringListModel> |