Workaround a leak in KXmlGui

Authored by ervin on Jan 28 2016, 7:49 AM.

Description

Workaround a leak in KXmlGui

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.

Reviewers: bensi, franckarrecot, dfaure

Differential Revision: https://phabricator.kde.org/D921

Details

Committed
ervinFeb 8 2016, 9:07 PM
Differential Revision
D921: Workaround a leak in KXmlGui
Parents
R4:086a0a24c30f: Also force the time in the test
Branches
Unknown
Tags
Unknown