[Development] Qt 5 types under consideration for deprecation / removal in Qt 6
annulen at yandex.ru
Wed May 29 15:16:37 CEST 2019
29.05.2019, 15:49, "drwho" <drwho at infidigm.net>:
> On 2019-05-29 6:53 a.m., Mutz, Marc via Development wrote:
>> == QSharedPointer / QWeakPointer -> std::shared_ptr/weak_ptr ==
>> Once they are stripped of their magic QObject handling and QObject
>> handling returned to QPointer proper, they don't do much other than
>> std::shared_ptr, except being less flexible and largely untested for
> so QEnableSharedFromThis::sharedFromThis() would return a std::shared_ptr?
You should use std::enable_shared_from_this instead.
> class Device : public QObject, public QEnableSharedFromThis<Device>
> void update(QSharedPointer<Device> device);
> in some method in Device....
> emit update(sharedFromThis());
> Development mailing list
> Development at qt-project.org
More information about the Development