-
Suggestion
-
Resolution: Unresolved
-
Not Evaluated
-
None
-
None
-
PM Spotted
The `child->setParent(parent)` behavior is an implicit ownership transfer. Adding `void QObject::addChild(std::unique_ptr<QObject> child) { if (child)
{ child->setParent(this); child.release(); }}` would make this transfer explicit and much easier to be exception-safe.
- relates to
-
QTBUG-141134 Minimize plain new(): make_parented<QObject>
-
- Reported
-