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.