summaryrefslogtreecommitdiffstats
path: root/src/widgets/doc/snippets/widgetdelegate.cpp
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@qt.io>2025-08-19 10:37:43 +0200
committerMarc Mutz <marc.mutz@qt.io>2025-08-20 10:24:55 +0000
commit7a1e7c88f087a1ccc7b6309c3a8e72376cbd37b6 (patch)
tree4a22dae102e26a9a2aece698f48af2ee8db82265 /src/widgets/doc/snippets/widgetdelegate.cpp
parent9bddf611fb803b14e3c46ea24dbab781d3b2e396 (diff)
QQuaternion: fix SiC in fromEulerAngles() overload set
Before ba21e89c2f7b3e162cffa8a716ca3d835b8c9bd4, fromEulerAngles({-90, 0, 0}) would call the QVector3D overload of fromEulerAngles(). After said commit, the call was ambiguous, because the unnamed braced initialization could init a QVector3D as well as a QQuaternion::EulerAngles. While this is technically allowed, because unnamed braced initializer arguments don't enjoy SC protection (otherwise a user passing {} would block any overload being added), we can, as Fabian pointed out, fix the SiC in this case by marking the QVector3D overload as Q_WEAK_OVERLOAD. We need to mark the old one, because that one is only conditionally available and because we want to default to the newer API. This changes the mangling of the function, which matters because this non-polymorphic class is needlessly exported (though pre-programmed to not be anymore in Qt 7), so we need to switch the Q_WEAK_OVERLOAD on and off for removed_api.cpp to maintain BC. Move the definition of the function into the class body because we don't have a Q_WEAK_OVERLOAD_IMPL to slap in front of the out-of-body definition. Amends ba21e89c2f7b3e162cffa8a716ca3d835b8c9bd4. [ChangeLog][QtGui][QQuaternion] Added fromEulerAngles() overload taking the new EulerAngles struct as an argument. Done-with: Fabian Kosmale <fabian.kosmale@qt.io> Task-number: QTBUG-138199 Change-Id: I64481b017073fb01e9a023e5dd47c8c66d4dcafc Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'src/widgets/doc/snippets/widgetdelegate.cpp')
0 files changed, 0 insertions, 0 deletions