Examples: fix UB calls into QElapsedTimer
Calling restart() without start() is illegal, so don't do that; use start() instead. Pick-to: 6.8 6.5 Change-Id: I2ff5151f588cb926ccecc3d9997615e63f36ee24 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit 029407117f0584aea7722ff7702c9f4b83fa9013) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
3b8a5859f8
commit
f24dcf7bdb
@ -81,7 +81,7 @@ void RenderThread::run()
|
||||
constexpr int Limit = 4;
|
||||
bool allBlack = true;
|
||||
|
||||
timer.restart();
|
||||
timer.start();
|
||||
|
||||
for (int y = -halfHeight; y < halfHeight; ++y) {
|
||||
if (restart)
|
||||
|
@ -237,7 +237,7 @@ void Connection::processData()
|
||||
writer.endMap();
|
||||
break;
|
||||
case Pong:
|
||||
pongTime.restart();
|
||||
pongTime.start();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
Loading…
x
Reference in New Issue
Block a user