diff options
author | Viktor Engelmann <viktor.engelmann@qt.io> | 2017-08-18 12:56:53 +0200 |
---|---|---|
committer | Viktor Engelmann <viktor.engelmann@qt.io> | 2017-08-22 08:03:32 +0000 |
commit | 25bb229aa707d5652cf4479a8c7008a02574f2e3 (patch) | |
tree | eaf9d1e395783d9f6ea9a92cbf96fb3b95991ed9 /examples/webengine | |
parent | 1ec53868363c41a4f08ca2660638da532eb56b10 (diff) |
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: Michal Klocek <michal.klocek@qt.io>
Diffstat (limited to 'examples/webengine')
0 files changed, 0 insertions, 0 deletions