diff options
author | Alex Trotsenko <alex1973tr@gmail.com> | 2020-09-18 19:10:35 +0300 |
---|---|---|
committer | Alex Trotsenko <alex1973tr@gmail.com> | 2020-11-10 17:56:51 +0200 |
commit | aefd414ce2418bee5d6dacf9092f7a3949f02af8 (patch) | |
tree | e84181a5d423b98134ac878f6ac0787a7f477f53 /src/corelib/kernel/qabstracteventdispatcher.cpp | |
parent | 0bfb39da858606a837f38f3d406f041a3f3c179c (diff) |
QWinEventNotifier: unlink from event dispatcher
Instead of multiplexing all notifications into a single Qt event for
the event dispatcher, we can send 'WinEventAct' event directly for each
notifier which activated. This trick improves the performance (esp.
on a large number of events) and allows us to remove notifiers handling
from the event dispatcher completely.
As an alternative to sending Qt events, use of Windows' APC queue in
conjunction with waking up the Qt event loop from within the Windows
thread pool has been considered. However, that would lead to signal
emission asynchronous to the Qt event loop's operation, which is not
acceptable.
Thanks to Oswald Buddenhagen for the proposed idea.
[ChangeLog][QtCore][QAbstractEventDispatcher] The
{un}registerEventNotifier() member functions have been removed.
QWinEventNotifier is no longer needed to be registered in the
event dispatcher.
Change-Id: I140892fb909eaae0eabf2e07ebabcab78c43841c
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Diffstat (limited to 'src/corelib/kernel/qabstracteventdispatcher.cpp')
-rw-r--r-- | src/corelib/kernel/qabstracteventdispatcher.cpp | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/src/corelib/kernel/qabstracteventdispatcher.cpp b/src/corelib/kernel/qabstracteventdispatcher.cpp index b6947dc7dc..358a59d05b 100644 --- a/src/corelib/kernel/qabstracteventdispatcher.cpp +++ b/src/corelib/kernel/qabstracteventdispatcher.cpp @@ -460,30 +460,6 @@ bool QAbstractEventDispatcher::filterNativeEvent(const QByteArray &eventType, vo return false; } -/*! \fn bool QAbstractEventDispatcher::registerEventNotifier(QWinEventNotifier *notifier) - - This pure virtual method exists on windows only and has to be reimplemented by a Windows specific - event dispatcher implementation. \a notifier is the QWinEventNotifier instance to be registered. - - The method should return true if the registration of \a notifier was successful, otherwise false. - - QWinEventNotifier calls this method in it's constructor and there should never be a need to call this - method directly. - - \sa QWinEventNotifier, unregisterEventNotifier() -*/ - -/*! \fn bool QAbstractEventDispatcher::unregisterEventNotifier(QWinEventNotifier *notifier) - - This pure virtual method exists on windows only and has to be reimplemented by a Windows specific - event dispatcher implementation. \a notifier is the QWinEventNotifier instance to be unregistered. - - QWinEventNotifier calls this method in it's destructor and there should never be a need to call this - method directly. - - \sa QWinEventNotifier, registerEventNotifier() -*/ - /*! \fn void QAbstractEventDispatcher::awake() This signal is emitted after the event loop returns from a |