summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/tools/qtaggedpointer
Commit message (Collapse)AuthorAgeFilesLines
* Change QTaggedPointer API to be more similar to other smart pointers in QtSimon Hausmann2020-03-191-8/+8
| | | | | | | * Rename pointer() to data() Change-Id: I8ef3e552d45c9990fee4b7efa98e2d878ed2cf98 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Make it possible to use QTaggedPointer within classesSimon Hausmann2020-03-171-0/+28
| | | | | | | | | | | | | | A common pattern in declarative is to use the unused bits in linked list next pointers for additional information storage. The "next" pointer is typically then a tagged pointer of the containing class, which is not fully defined yet. Therefore alignof() can't be used at tagged pointer instantiation time. This patch delays the calls to alignment, etc. until the corresponding functions are used, as in principle the tagged pointer is just a quintptr and no additional information should be needed until operating on it. Change-Id: I87a3578ee921d471e1b60ed5903b549ef0610b97 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Introduce helper class QTaggedPointerTor Arne Vestbø2020-03-174-0/+417
Useful for attaching small bits of information in the alignment bits of a naked pointer. For use in the new property system as well as in qtdeclarative (where currently a similar class exists as private API). Change-Id: Idf9b93e714e15129f302e16425dbeda94bcd207b Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>