Silence code checker warning about unused std::unique_ptr::release

We don't need the pointer, as it's the same as "this", we just don't
want the event to own the object anymore.

Nevertheless, silence code checker warning about the unused return.

Amends 96ef0004111b47cec239846b169942bbc885c181.

Change-Id: I6a3c73e971f1b9e10f5754018a1fa5941dca6172
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit 920a490d659836785f03d51edc11da1711ade965)
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit bc2f4ace0ea4d98847218a9e2d2633efeccd28e1)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
Volker Hilsheimer 2025-04-14 09:28:11 +02:00
parent 983bb1f225
commit b93d9dc01a

View File

@ -76,7 +76,7 @@ void QSingleShotTimer::timerEvent(QTimerEvent *event)
{ {
if (event->id() == Qt::TimerId::Invalid) { if (event->id() == Qt::TimerId::Invalid) {
StartTimerEvent *startTimerEvent = static_cast<StartTimerEvent *>(event); StartTimerEvent *startTimerEvent = static_cast<StartTimerEvent *>(event);
startTimerEvent->timer.release(); Q_UNUSED(startTimerEvent->timer.release()); // it's the same as "this"
const QDeadlineTimer &deadline = startTimerEvent->deadline; const QDeadlineTimer &deadline = startTimerEvent->deadline;
if (deadline.hasExpired()) { if (deadline.hasExpired()) {
timerFinished(); timerFinished();