The ctor refuses to be called with a nullptr painter, but a moved-from QPainterStateGuard object _will_ have a nullptr painter. An assert gives a slightly nicer error message than "nullptr deref". Extract Method verifyPainter() to not litter the executable with string literals for every one of the these functions (some compilers don't use the leeway extended to them by the standard to fold duplicate string literals). Found in API-review. Amends ec3a5f4994a2bafc65fa8e01fb0861219580f622. Pick-to: 6.9 Change-Id: I562e6a0ff5a4c8ce86418b998ed78c501441b61a Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> Reviewed-by: Axel Spoerl <axel.spoerl@qt.io> Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
…
…
Description
Languages
C++
84.3%
HTML
4.9%
C
3.9%
CMake
3.6%
Objective-C++
2%
Other
0.8%