summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel/qeventdispatcher_win_p.h
diff options
context:
space:
mode:
authorAlex Trotsenko <alex1973tr@gmail.com>2020-09-18 19:10:35 +0300
committerAlex Trotsenko <alex1973tr@gmail.com>2020-11-10 17:56:51 +0200
commitaefd414ce2418bee5d6dacf9092f7a3949f02af8 (patch)
treee84181a5d423b98134ac878f6ac0787a7f477f53 /src/corelib/kernel/qeventdispatcher_win_p.h
parent0bfb39da858606a837f38f3d406f041a3f3c179c (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/qeventdispatcher_win_p.h')
-rw-r--r--src/corelib/kernel/qeventdispatcher_win_p.h13
1 files changed, 0 insertions, 13 deletions
diff --git a/src/corelib/kernel/qeventdispatcher_win_p.h b/src/corelib/kernel/qeventdispatcher_win_p.h
index a5c063e062..4637185563 100644
--- a/src/corelib/kernel/qeventdispatcher_win_p.h
+++ b/src/corelib/kernel/qeventdispatcher_win_p.h
@@ -60,7 +60,6 @@
QT_BEGIN_NAMESPACE
-class QWinEventNotifier;
class QEventDispatcherWin32Private;
// forward declaration
@@ -86,10 +85,6 @@ public:
bool unregisterTimers(QObject *object) override;
QList<TimerInfo> registeredTimers(QObject *object) const override;
- bool registerEventNotifier(QWinEventNotifier *notifier) override;
- void unregisterEventNotifier(QWinEventNotifier *notifier) override;
- void activateEventNotifiers();
-
int remainingTime(int timerId) override;
void wakeUp() override;
@@ -106,7 +101,6 @@ protected:
QEventDispatcherWin32(QEventDispatcherWin32Private &dd, QObject *parent = nullptr);
virtual void sendPostedEvents();
void doUnregisterSocketNotifier(QSocketNotifier *notifier);
- void doUnregisterEventNotifier(QWinEventNotifier *notifier);
private:
friend LRESULT QT_WIN_CALLBACK qt_internal_proc(HWND hwnd, UINT message, WPARAM wp, LPARAM lp);
@@ -156,7 +150,6 @@ class Q_CORE_EXPORT QEventDispatcherWin32Private : public QAbstractEventDispatch
public:
QEventDispatcherWin32Private();
~QEventDispatcherWin32Private();
- static QEventDispatcherWin32Private *get(QEventDispatcherWin32 *q) { return q->d_func(); }
QAtomicInt interrupt;
@@ -186,12 +179,6 @@ public:
bool closingDown = false;
- bool winEventNotifierListModified = false;
- QAtomicInt activateEventNotifiersPosted;
- QList<QWinEventNotifier *> winEventNotifierList;
- void postActivateEventNotifiers();
- void activateEventNotifier(QWinEventNotifier * wen);
-
QList<MSG> queuedUserInputEvents;
QList<MSG> queuedSocketEvents;
};