Skip to content

osd: Fix a crash when quitting from QML signal handler

ivan tkachenko requested to merge work/ratijas/clean-now-delete-later into master
kscreen_osd_service[9979]:
    Object 0x55a9840ff5c0 destroyed while one of its QML signal handlers is in progress.
    Most likely the object was deleted synchronously (use QObject::deleteLater() instead), or the application is running a nested event loop.
    This behavior is NOT supported!
    qrc:/qml/OsdSelector.qml:102: function() { [native code] }

Call to quit() should be posted to an event loop to avoid destroying Osd objects with their engines while a key press signal handler is still running. Additional clean up must be performed to ensure that a map does not contain dangling references, ans thus double call to hideOsd() won't cause another crash either.

Also, don't bother hiding individual OSD instances if we are about to quit anyway. That's what other code path with timer is [not] doing already.

CCBUG: 459368


Other changes in this branch:

osd: Optimize includes in C++ headers

osd: Remove unimplemented methods declarations

Amends b499deca

osd: Don't install qml sources, which are already baked in with qrc

Amends 731f5fa8

osd: Rewrite a comment which says opposite of what code is actually doing

Edited by ivan tkachenko

Merge request reports