summaryrefslogtreecommitdiffstats
path: root/tests/manual/widgets/kernel
diff options
context:
space:
mode:
authorMarc Mutz <[email protected]>2025-07-04 18:03:41 +0200
committerMarc Mutz <[email protected]>2025-07-09 16:07:54 +0000
commit3f953283687353c6cb73e2e8bfedc3097604a57d (patch)
tree25bd92c64243d0b13d218e186450b149defac0ba /tests/manual/widgets/kernel
parent1d0f4aaff0b050106c1342e2958682fed60caa09 (diff)
QWeakPointer: don't let IfCompatible<X> make accidental SMFsHEADdev
The IfCompatible constraint did not exclude the case where is_same<X, T>, so it made accidental copy and move SMFs. This is a problem because the normal SMFs all work fine with a forward-declared T, but conversion construction and assignment inspects X, e.g. by going through QSharedPointer<X> or checking std::is_virtual_base_of, which require types to be complete. Hot-fix by excluding T from IfCompatible<X>. All functions that use this constraint are already also available as overloads for T, except the QObject private ctor, for which this patch therefore adds a new overload. Fixes the FTBFS described in QTBUG-138246, but not the bug itself, which is also about QSharedPointer and qxp::is_virtual_base_of. Amends 014d7ac65417ed9b5ffb85cca24d16564ff5005a. [ChangeLog][QtCore][QWeakPointer] Fixed a regression whereby the QWeakPointer<T> copy or move constructors and/or assignment operators may fail to compile for forward-declared (incomplete) T. Task-number: QTBUG-138246 Pick-to: 6.10 6.9 6.8 6.5 Change-Id: I0b098732cd7dbb373ff2b2dee8deaac3859127a5 Reviewed-by: Fabian Kosmale <[email protected]> Reviewed-by: Milian Wolff <[email protected]>
Diffstat (limited to 'tests/manual/widgets/kernel')
0 files changed, 0 insertions, 0 deletions