diff options
-rw-r--r-- | tests/auto/client/client/tst_client.cpp | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/tests/auto/client/client/tst_client.cpp b/tests/auto/client/client/tst_client.cpp index e244de7f..eb99b2e2 100644 --- a/tests/auto/client/client/tst_client.cpp +++ b/tests/auto/client/client/tst_client.cpp @@ -487,19 +487,21 @@ void tst_WaylandClient::dontCrashOnMultipleCommits() QRect rect(QPoint(), window->size()); - QBackingStore backingStore(window); - backingStore.resize(rect.size()); - backingStore.beginPaint(rect); - QPainter p(backingStore.paintDevice()); - p.fillRect(rect, Qt::magenta); - p.end(); - backingStore.endPaint(); - - backingStore.flush(rect); - backingStore.flush(rect); - backingStore.flush(rect); + { + QBackingStore backingStore(window); + backingStore.resize(rect.size()); + backingStore.beginPaint(rect); + QPainter p(backingStore.paintDevice()); + p.fillRect(rect, Qt::magenta); + p.end(); + backingStore.endPaint(); + + backingStore.flush(rect); + backingStore.flush(rect); + backingStore.flush(rect); - compositor->processWaylandEvents(); + compositor->processWaylandEvents(); + } delete window; |