On 2018-10-31 16:46, Thiago Macieira wrote:
Qt6 won't be fully source-compatible. The idea is that we'll break it
to fix
things, but attempt to keep compatible as much as possible to avoid
death by a
thousand paper cuts.
Does this rule out some kind of smart pointer that would be used to hold
QObject*?
I've seen lots of commercial code bases in the past where QObject
inheriting classes are combined with QExplicitlySharedDataPointer -
while at the same time relying on having a parent in those QObjects.
Semantically:
- There's some class for which QObject benefits like Signals/Slots are
required
- They are strongly owned by some other QObject based entity
- A lot of code stores a reference to them (In terms of a QESDP), where
either:
- the reference _should_ be invalidated during destruction
- the existence of such reference (to a child) _should_ stop the
parent from destroying that child.
- The overhead of QPointer is not desirable
I know these requirements are kind of a paradox. But both variants of
this are a pattern, I find relatively often in customer's code bases.
I would really like to have an easy way to give such customers a "sane"
way forward.
Sascha
_______________________________________________
Development mailing list
[email protected]
http://lists.qt-project.org/mailman/listinfo/development