Looking at the implementation of deleteLater:
{
     QCoreApplication::postEvent(this, new QDeferredDeleteEvent());
}

It seems to me you can achieve what you want without modifying the
implementation of deleteLater(), and instead making an event filter on
QCoreApplication for QDeferredDeleteEvent.


On Thu, May 5, 2016 at 12:09 PM, Sean Donnelly <[email protected]>
wrote:

> In our application we maintain a UI Inventory via a named object cache.
> When an object is destroyed we remove it from our cache and when the name
> is changed we also update our cache.
>
>
>
> However when an object is scheduled for deletion via
> QObject::deleteLater() the object remains in our cache until it’s actually
> deleted.
>
>
>
> I have two proposals:
>
>
>
> 1.       Could deleteLater() send a signal so that we can update our
> cache immediately and not find that UI object which is about to be deleted.
>
> 2.       Could deleteLater() set a property to know the object is in an
> “about to be deleted state”. That way our UI Inventory could be updated to
> ignore these objects.
>
>
>
> Thanks,
>
> Sean
>
>
>
> _______________________________________________
> Development mailing list
> [email protected]
> http://lists.qt-project.org/mailman/listinfo/development
>
>
_______________________________________________
Development mailing list
[email protected]
http://lists.qt-project.org/mailman/listinfo/development

Reply via email to