Examples: fix UB calls into QElapsedTimer

Calling restart() without start() is illegal, so don't do that; use
start() instead.

Pick-to: 6.9 6.8 6.5
Change-Id: I2ff5151f588cb926ccecc3d9997615e63f36ee24
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
Giuseppe D'Angelo 2025-03-25 12:04:35 +01:00
parent ff14e6fe08
commit 029407117f
2 changed files with 2 additions and 2 deletions

View File

@ -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)

View File

@ -237,7 +237,7 @@ void Connection::processData()
writer.endMap();
break;
case Pong:
pongTime.restart();
pongTime.start();
break;
default:
break;