diff options
| author | Morten Johan Sørvig <morten.sorvig@qt.io> | 2020-10-14 12:57:30 +0200 |
|---|---|---|
| committer | Morten Johan Sørvig <morten.sorvig@qt.io> | 2020-10-22 22:58:11 +0000 |
| commit | 007d207a8c2409f10a586c309d8498d576a69f52 (patch) | |
| tree | aabca4fa6e44c5fa297c88815e6bb88ef74007a2 /src/sql/doc/snippets/sqldatabase | |
| parent | 48758816db9983c2b51db486aacff0e51e91daac (diff) | |
qWaitFor: check predicate before sleeping
Return immediately if processing events caused the
predicate to become true.
This gives us a nice speedup on tests with call
qWaitForWindowExposed() or qWaitForWindowActive(),
for example tst_QGraphicsView::itemsInRect_cosmeticAdjust:
cocoa 1164ms -> 825ms ~30% decrease
offscreen 296ms -> 15ms ~95% decrease
Change-Id: Ifbab0ca662c082e7dfb609d0cb4bc1161709067b
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/sql/doc/snippets/sqldatabase')
0 files changed, 0 insertions, 0 deletions
