diff options
author | Marc Mutz <marc.mutz@kdab.com> | 2019-08-15 21:43:16 +0200 |
---|---|---|
committer | Marc Mutz <marc.mutz@kdab.com> | 2019-08-17 08:15:34 +0200 |
commit | 412be2096cea12ca480cbbd419f3531a41dac3ae (patch) | |
tree | 0c031390ea6c668a648559d2e07b77b0615cff51 /tools | |
parent | efe0bec9468d75b768d1e26d2a8b440ade5ba632 (diff) |
QSGDepthStencilBufferManager: don't use toStrongRef().data()
It's an anti-pattern.
Even though we don't expect other threads to destroy the last QSP
while we use the pointer obtained from QWeakPointer, play it safe
and use QWeakPointer idiomatically: as a non-owning reference, to
be converted to an owning one for the duration of our use of the
payload object.
Add an assertion that explains why we don't expect expired weak_ptrs
here.
Amends 0f035c0ad79ca41a1473b64a4c0077e7085d3700.
Change-Id: Ia39ef5fa243e0e73110aae13da35f4f2ada73a73
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io>
Diffstat (limited to 'tools')
0 files changed, 0 insertions, 0 deletions