Skip to content

Commit c75a341

Browse files
committed
Minor fixes.
1 parent 9d90613 commit c75a341

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

source/base/threading/asio_event_dispatcher.cc

+5-4
Original file line numberDiff line numberDiff line change
@@ -165,9 +165,10 @@ bool AsioEventDispatcher::unregisterTimers(QObject* object)
165165
}
166166
}
167167

168-
if (removed)
169-
asyncWaitForNextTimer();
168+
if (!removed)
169+
return false;
170170

171+
asyncWaitForNextTimer();
171172
return true;
172173
}
173174

@@ -283,7 +284,7 @@ asio::io_context& AsioEventDispatcher::ioContext()
283284

284285
//--------------------------------------------------------------------------------------------------
285286
// static
286-
#if defined(Q_OS_WIN)
287+
#if defined(Q_OS_WINDOWS)
287288
void AsioEventDispatcher::eventCallback(PVOID parameter, BOOLEAN /* timer_or_wait_fired */)
288289
{
289290
QWinEventNotifier* notifier = reinterpret_cast<QWinEventNotifier*>(parameter);
@@ -295,7 +296,7 @@ void AsioEventDispatcher::eventCallback(PVOID parameter, BOOLEAN /* timer_or_wai
295296

296297
emit notifier->activated(notifier->handle(), {});
297298
}
298-
#endif // defined(Q_OS_WIN)
299+
#endif // defined(Q_OS_WINDOWS)
299300

300301
//--------------------------------------------------------------------------------------------------
301302
void AsioEventDispatcher::asyncWaitForNextTimer()

0 commit comments

Comments
 (0)