Skip to content

Draft: Create helper to wrap the creation of self-managed KNotification instance

Following the discussion on the channel, this would be my idea that tries to go in the direction of avoiding the caller having to call new and then assuming the object will be automatically deleted. It is more a helper to document the code than anything else.

It doesn't solve the issue that the object may be dead after user calls sendEvent(). It does have the advantage that it doesn't break existing code. And also, the user may prefer not to use it, and that'd be fine...

If you think that's not the way to go, feel free to suggest alternatives :)

@tcanabrava @sune @vkrause

Edited by Tarcisio Fischer

Merge request reports