Commit 25bb229a authored by Viktor Engelmann's avatar Viktor Engelmann
Browse files

Emit loadProgress only between loadStarted and loadFinished


We now track the values we send to the loadProgress signal. We store
the last value in a new int WebContentsDelegateQt::m_lastLoadProgress
and only send values that are >= m_lastLoadProgress to ensure
monotonicity.
A value < 0 indicates that no loading is going on. Only on loadStarted
it is set to 0 (and a loadProgress is emitted with progress 0) and
on loadFinished, it is set to -1 (and a loadProgress is emitted with
progress 100).
This way, we ensure that you first get a loadStarted signal, at least
two loadProgress signals (0 and 100) and a loadFinished signal
AND all loadProgress signals come in a monotonous order.

Task-number: QTBUG-57839
Task-number: QTBUG-61815
Change-Id: I219d3bffbd5691adb892a11b79647ba9e1ed248e
Reviewed-by: default avatarMichal Klocek <michal.klocek@qt.io>
parent 1ec53868
Showing with 34 additions and 12 deletions
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment