https://bugs.kde.org/show_bug.cgi?id=451790
Arjen Hiemstra <ahiems...@heimr.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Latest Commit| |https://invent.kde.org/fram | |eworks/kdeclarative/commit/ | |fac27b49172fa3bbdfe3dbee0ce | |abe95b7c84b45 Status|ASSIGNED |RESOLVED --- Comment #8 from Arjen Hiemstra <ahiems...@heimr.nl> --- Git commit fac27b49172fa3bbdfe3dbee0ceabe95b7c84b45 by Arjen Hiemstra. Committed on 17/05/2022 at 09:20. Pushed by ahiemstra into branch 'master'. QmlObject: Use std::shared_ptr to properly track the lifetime of QQmlEngine The engine passed to QmlObject is potentially shared, either because it comes from QmlObjectSharedEngine or because the caller is already using it. Since raw pointers do not provide any information about that, deprecate the raw pointer constructors and replace them with a constructor taking a std::shared_ptr. This allows QmlObject to properly track if its the first user of the QQmlEngine and if so, call KDeclarative::setupEngine on it. It also allows it to know if it is the *last* user of the engine, and in that case properly cleanup the QNAM factory, without affecting the shared engine case. M +1 -1 src/kdeclarative/CMakeLists.txt M +33 -29 src/kdeclarative/qmlobject.cpp M +33 -0 src/kdeclarative/qmlobject.h M +8 -7 src/kdeclarative/qmlobjectsharedengine.cpp https://invent.kde.org/frameworks/kdeclarative/commit/fac27b49172fa3bbdfe3dbee0ceabe95b7c84b45 -- You are receiving this mail because: You are watching all bug changes.