Workaround a leak in KXmlGui
ClosedPublic

Authored by ervin on Feb 8 2016, 9:07 PM.

Details

Summary

startupFunc() in KXmlGui creates a KCheckAcceleratorsInitializer without
passing it a parent. It then calls deleteLater() on itself from a slot
invoked with a QueuedConnection. Unfortunately this assumes the event
loop is running which won't always happen in test cases.

This is a leak spotted by ASAN/LSAN. This commit works around it by
running the event loop twice to give a chance for the
KCheckAcceleratorsInitializer to delete itself.

Diff Detail

Repository
R4 Zanshin
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
ervin updated this revision to Diff 2234.Feb 8 2016, 9:07 PM
ervin retitled this revision from to Workaround a leak in KXmlGui.
ervin updated this object.
ervin edited the test plan for this revision. (Show Details)
ervin added reviewers: bensi, franckarrecot, dfaure.
bensi accepted this revision.Feb 9 2016, 8:06 AM
bensi edited edge metadata.
This revision is now accepted and ready to land.Feb 9 2016, 8:06 AM
This revision was automatically updated to reflect the committed changes.