Initialize member variables properly
Move the initialization of default values to class definitions
and use braced initialization instead. This way, whenever a new
constructor is added, the variables will be initialized to the
correct default value even if someone forgot to include it in the
init-list. Additionally, this fix undefined behaviours in some
member variables as they were never initialized with default values.
Bitfields were left out because NSDMI of bitfields require C++20
Fixes: QTBUG-145072
Pick-to: 6.12
Change-Id: Ibe559a96a25105db4f179a6459f915c3ee119f7f
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
| commit | f37626a5b2cd688651eeb411c17a7451c5a44288 |
| parent | 76f95fbec828a004eef122d863b690eac79ddada |
| author | Hatem ElKharashy <hatem.elkharashy@qt.io> |
| committer | Hatem ElKharashy <hatem.elkharashy@qt.io> |
| commit time | Tue, 13 Oct 2026 08:13:26 +0000 |
- M src/plugins/iconengines/svgiconengine/qsvgiconengine.cpp
- M src/plugins/imageformats/svg/qsvgiohandler.cpp
- M src/svg/animation/qsvgabstractanimation.cpp
- M src/svg/animation/qsvgabstractanimation_p.h
- M src/svg/animation/qsvganimatedproperty_p.h
- M src/svg/animation/qsvganimator.cpp
- M src/svg/animation/qsvganimator_p.h
- M src/svg/css/qsvgcsshandler.cpp
- M src/svg/css/qsvgcsshandler_p.h
- M src/svg/css/qsvgcssproperties_p.h
- M src/svg/qsvgdebug.cpp
- M src/svg/qsvgdocument.cpp
- M src/svg/qsvgdocument_p.h
- M src/svg/qsvgfont_p.h
- M src/svg/qsvggenerator.cpp
- M src/svg/qsvggraphics_p.h
- M src/svg/qsvghandler.cpp
- M src/svg/qsvghandler_p.h
- M src/svg/qsvgnode.cpp
- M src/svg/qsvgnode_p.h
- M src/svg/qsvgrenderer.cpp
- M src/svg/qsvgstructure.cpp
- M src/svg/qsvgstructure_p.h
- M src/svg/qsvgstyle.cpp
- M src/svg/qsvgstyle_p.h
- M src/svgwidgets/qgraphicssvgitem.cpp
- M src/svgwidgets/qsvgwidget.cpp