[Development] unique_ptr and Qt, Take 2
abbapoh at gmail.com
Fri May 3 19:58:30 CEST 2019
IMHO, it should be a Qt6 feature. It’s awesome.
However, I liked the idea (is it deprecated or what?) of a template method
template<typename T, typename Args…>
std::observer_ptr<QObject> qMakeChild(gsll::not_null<std::observer_ptr<QObject>> parent, Args… args)
With that method, you don’t need to implement stuff like
QLibrary::QLibrary(QParentPtr<QObject *> parent, const QString &fileName),
You just need to split ctor into safe and unsafe versions and deprecate unsafe.
Maybe I’m asking too much, but it would be nice get rid of raw pointers completely switching to pair std::unique_ptr/std::observer_ptr
> 3 мая 2019 г., в 19:22, Daniel Teske <qt at squorn.de> написал(а):
> So, who thinks that this is something that ought to be a Qt6 feature?
> And who wants to actually help make that happen?
> Development mailing list
> Development at qt-project.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Development