path: root/src/widgets/widgets/qabstractspinbox.cpp
diff options
authorTor Arne Vestbø <>2018-09-05 13:47:05 +0200
committerTor Arne Vestbø <>2019-01-09 18:10:54 +0000
commit68511d41d50b1a136fb0e74fdabfd362e0b21a1a (patch)
treebda554889a8d7d16d9b0bf40a67a1505c1a1a762 /src/widgets/widgets/qabstractspinbox.cpp
parent0330db86fdd42ef1be1354cdbbd6e0ffc21d9a80 (diff)
qWaitFor: Prevent being stuck in QCoreApplication::processEvents
When using the overload of QCoreApplication::processEvents that takes a maxtime argument, the function will keep processing events until there are no more events, or until it times out. The problem is that the function doesn't distinguish between events that were on the event queue when the function was called, and events generated by processing events as part of its own execution. If for example a widget calls update() in its paintEvent, the function will spin for the entire duration of maxtime. That doesn't work for qWaitFor, where we need to check the predicate between each pass, so we use the overload of processEvents that doesn't take a maxtime. That's fine, as we have our own timeout logic. Change-Id: I9738d7d0187c36d4a5ddfcd3fd075b0bd84583c4 Reviewed-by: Qt CI Bot <> Reviewed-by: Tor Arne Vestbø <>
Diffstat (limited to 'src/widgets/widgets/qabstractspinbox.cpp')
0 files changed, 0 insertions, 0 deletions