MockCompositor: Protect against race condition


The QList m_fractionalScales was being changed from both the main thread
and the dispatch thread. This lead to read-after-free AddressSanitizer
errors when running autotests. Using a DirectConnection makes sure that
both appending and removal happens in the same thread. This does not
fix a theoretical race condition in DefaultCompositor::fractionalScale().

Fixes: QTBUG-130627
Pick-to: 6.8
Change-Id: Ie73f80d08929bcfcbd9940acdb4f86233df013cb
Reviewed-by: David Edmundson <davidedmundson@kde.org>
commit14a7af25540a5531f1596cc21fcecdfa58216a54
parentd49fab406e847de4b6c11b68eb7ed83b24d2a004
authorPaul Olav Tvete <paul.tvete@qt.io>
committerPaul Olav Tvete <paul.tvete@qt.io>
commit timeMon, 11 Nov 2024 09:21:43 +0100