diff options
| author | Marc Mutz <marc.mutz@qt.io> | 2025-06-03 10:03:01 +0200 |
|---|---|---|
| committer | Marc Mutz <marc.mutz@qt.io> | 2025-06-04 23:22:45 +0200 |
| commit | e51675b891d2a4c64dda0094be0c84070833b82a (patch) | |
| tree | b860a166100cdb73ce2048bb96658c31a382182f /src/corelib/serialization/qdatastream.cpp | |
| parent | a4850d0e0f42229afe2af10cee5794d0de70416c (diff) | |
QWaylandGLContext: init fields in default ctor
Coverity complains that the =default'ed default ctor leaves
m_decorationsContext and m_api uninitialized, which is true.
To fix, use NSDMI for the former.
For m_api, initialize it in the default constructor's member
initializer list, because the default value is closely related to the
other constructor's choice of value¹, and so should be more proximal
to the other constructor's initialization of m_api (which is
dynamic). Using NSDMI for m_api would also remove tooling's ability to
detect faults in the other constructor.
¹ I had to track into QSurfaceFormat to verify which of the possible
values is the correct one (= the one that gets mapped from
DefaultSurfaceFormat by the switch in the other QWaylandGLContext
ctor).
Amends 7c0a96785fee4fea8ef1452166b1dde88957445c.
Pick-to: 6.10
Task-number: QTBUG-110758
Coverity-Id: 481857
Change-Id: I837d0a3a63bd6e2948ef1c9757e250bfba7dd957
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Diffstat (limited to 'src/corelib/serialization/qdatastream.cpp')
0 files changed, 0 insertions, 0 deletions
