Classes and structs used in Qt containers can get optimized handling if their
typeinfo is known. This patch adds the typeinfo to many types which are used
in Qt containers and where I understood the member types.
Details
- Reviewers
kfunk - Group Reviewers
KDevelop - Commits
- R32:8e74ec5d1b6e: Mark more classes & structs as Q_MOVABLE_TYPE/Q_PRIMITIVE_TYPE
No issues seen in two days usage.
Tests run as before.
Diff Detail
- Repository
- R32 KDevelop
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
which types didn't you understand? Also, if in doubt, you can use QTypeInfoMerger: https://code.woboq.org/qt5/qtbase/src/corelib/global/qtypeinfo.h.html#133
There are some types in duchain IIRC (sadly dropped any lists I had created manually only) which involve lots of other templated types, and I could not easily track down the involved types to check if there are any self-referencing ones involved (i.e. with pointers to its own internal data structures) which would prevent marking them movable.
The missing-typeinfo check from clazy has had far fewer hits than I found manually (possibly because it avoids being too clever when it comes to unknown types which could keep pointers to itself)?
So while the list of types in this patch is list is long, it sadly is incomplete as the patch was created manually based on some grep over the sources for types used with qlist/qvector/qmap and investigating each type manually.
Is there some more proper way for doing this? :)
Minor issues, rest LGTM.
kdevplatform/project/projectbuildsetmodel.h | ||
---|---|---|
93 | This one doesn't really make sense, no? ProjectBuildSetModel is a pointer based type and is not meant to be used as container value type. |