summaryrefslogtreecommitdiffstats
path: root/src/gui/doc/snippets/code
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@qt.io>2025-07-31 08:09:52 +0200
committerMarc Mutz <marc.mutz@qt.io>2025-08-01 10:53:59 +0200
commit646c134e4cf0f91621c2f25679d35a4452555785 (patch)
treefd38dd2db25f4c5ce66085ef193358b414a13d23 /src/gui/doc/snippets/code
parent84b37e96fc8f20c8ffdb0aa0b3a2cd9b5d48fbf1 (diff)
QFuture: fix UB (uninit'ed member) in const_iterator default ctor
Coverity complained that the default ctor didn't initialize the iterator's data members, and it's correct, of course. What makes matters worse: by implementing the default constructor like that, we break the C++ guarantee that value-initialized iterators must compare equal. Fix by = default'ing the constructor. That leaves default-construction to establish only the partially-formed state, as before, but value-initialization now creates a well-formed object, ready for equality comparison. Add a test. Amends the start of the public history. Coverity-Id: 87769 Pick-to: 6.10 6.9 6.8 6.5 Change-Id: I4d7af36937946dd58d52aaafae4dd48a60c00cf0 Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/gui/doc/snippets/code')
0 files changed, 0 insertions, 0 deletions