autotests: Make testServerSideDecoration test more robust

The test fails sometimes with "Tried to add event to destroyed queue".
It does so because the event queue is not destroyed last. See also
33827bbdbe for more details.
This commit is contained in:
Vlad Zahorodnii 2023-09-25 10:46:32 +03:00
parent ff9a6cd3fa
commit 1d6ac05a8c

View file

@ -143,14 +143,16 @@ void TestServerSideDecoration::cleanup()
delete m_serverSideDecorationManager;
m_serverSideDecorationManager = nullptr;
}
if (m_queue) {
delete m_queue;
m_queue = nullptr;
}
if (m_registry) {
delete m_registry;
m_registry = nullptr;
}
if (m_queue) {
delete m_queue;
m_queue = nullptr;
}
if (m_thread) {
m_thread->quit();
m_thread->wait();