Fix ASAN crash at at startup with Gallery widgets example

It is not clear how this change fixes the issue. Maybe it is bad code
generation by the MSVC 2022 compiler?

Fixes: QTBUG-126702
Change-Id: I56f4be789aa3d1783d6305b59339984c99454bc7
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
(cherry picked from commit aa3e6ab27dacaef339997c85d3859bcf077b6db7)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
bb10
Jøger Hansegård 2024-06-26 19:47:19 +02:00 committed by Qt Cherry-pick Bot
parent fb79071e16
commit 1af3e2bd91
1 changed files with 4 additions and 2 deletions

View File

@ -57,7 +57,7 @@ QT_BEGIN_NAMESPACE
namespace {
// NOLINTNEXTLINE(cppcoreguidelines-virtual-class-destructor): this is not a base class
static constexpr struct : QMetaTypeModuleHelper
struct QVariantGuiHelper : QMetaTypeModuleHelper
{
#define QT_IMPL_METATYPEINTERFACE_GUI_TYPES(MetaTypeName, MetaTypeId, RealName) \
QT_METATYPE_INTERFACE_INIT(RealName),
@ -135,7 +135,9 @@ static constexpr struct : QMetaTypeModuleHelper
}
return false;
}
} qVariantGuiHelper;
};
static constexpr QVariantGuiHelper qVariantGuiHelper;
} // namespace used to hide QVariant handler