MockCompositor: Fix potential race condition


The list m_viewports is being accessed from both the main thread
and the dispatch thread. This has not been observed to cause any
errors, but is a potential source of test instability. Using a
DirectConnection makes sure that both appending and removal
happens in the same thread.

Task-number: QTBUG-130627
Pick-to: 6.8
Change-Id: Iee6941d8794119e679a485778f0be5c40df27069
Reviewed-by: David Edmundson <davidedmundson@kde.org>
commit88f94bdbea19725b3c1a09e1f868c14dff286f53
parentaefff17a6612f5cb4e022c701960ca96d03e53f9
authorPaul Olav Tvete <paul.tvete@qt.io>
committerPaul Olav Tvete <paul.tvete@qt.io>
commit timeMon, 11 Nov 2024 13:09:24 +0100