Details
-
Technical task
-
Resolution: Fixed
-
P3: Somewhat important
-
214b92b00a2f9c1527401a1a20bfcc2b30e8efab
Description
As found in the parent task, use of QQmlGuard injects duplicate vtables into Qt libraries. See parent task for why this is a problem.
It's not immediately clear why the dtor needs to be virtual. There's one virtual function, yes, and I found a bunch of inheritors, but are there any polymorphic deleters? The one virtual function could be replaced by a function pointer (see QSlotObject for an implementation), saving the indirection through the vtable, and the duplication of it.
- QQuickDragGrabber::Item} doesn't need a polymorphic dtor, since it's always deleting the most-derived type (could be enforced by making it {{final).
- QQmlVMEVariantQObjectPtr is a bit tricky, because it's held by reference in its owning container (why?), but also doesn't seem to be used polymorphically
- QQuickStatePrivate::OperationGuard also doesn't seem to need a polymorphic dtor
- QQuickPackagePrivate::DataGuard is literally a copy of it
- finally, neither does QQmlAdaptorModel
Are there others?