From 454a4ebb6701800384f638cd23813248c5e54b70 Mon Sep 17 00:00:00 2001 From: Morten Sorvig Date: Thu, 23 Jun 2011 10:44:15 +0200 Subject: [PATCH] Remove QEventDispatcherQPA inheritance support. QEventDispatcherQPA is now a small "leaf" class, there is no need to inherit from it or make it inherit another event dispatcher. --- .../eventdispatchers/qeventdispatcher_qpa.cpp | 20 +++----------------- .../eventdispatchers/qeventdispatcher_qpa_p.h | 21 ++------------------- 2 files changed, 5 insertions(+), 36 deletions(-) diff --git a/src/platformsupport/eventdispatchers/qeventdispatcher_qpa.cpp b/src/platformsupport/eventdispatchers/qeventdispatcher_qpa.cpp index 4dea1e5..bfadd8b 100644 --- a/src/platformsupport/eventdispatchers/qeventdispatcher_qpa.cpp +++ b/src/platformsupport/eventdispatchers/qeventdispatcher_qpa.cpp @@ -57,25 +57,11 @@ QT_BEGIN_NAMESPACE QT_USE_NAMESPACE -QEventDispatcherQPAPrivate::QEventDispatcherQPAPrivate() -{ - -} - -QEventDispatcherQPAPrivate::~QEventDispatcherQPAPrivate() -{ - -} QEventDispatcherQPA::QEventDispatcherQPA(QObject *parent) - : EVENTDISPATCHERBASE(*new QEventDispatcherQPAPrivate, parent) + : QEventDispatcherUNIX(parent) { } -QEventDispatcherQPA::QEventDispatcherQPA(EVENTDISPATCHERBASEPRIVATE &priv, QObject *parent) - : EVENTDISPATCHERBASE(priv, parent) -{ } - - QEventDispatcherQPA::~QEventDispatcherQPA() { } @@ -85,8 +71,8 @@ bool QEventDispatcherQPA::processEvents(QEventLoop::ProcessEventsFlags flags) bool didSendEvents = QWindowSystemInterface::sendWindowSystemEvents(this, flags); - if (EVENTDISPATCHERBASE::processEvents(flags)) { - EVENTDISPATCHERBASE::processEvents(flags); + if (QEventDispatcherUNIX::processEvents(flags)) { + QEventDispatcherUNIX::processEvents(flags); return true; } diff --git a/src/platformsupport/eventdispatchers/qeventdispatcher_qpa_p.h b/src/platformsupport/eventdispatchers/qeventdispatcher_qpa_p.h index b49510e..cb67701 100644 --- a/src/platformsupport/eventdispatchers/qeventdispatcher_qpa_p.h +++ b/src/platformsupport/eventdispatchers/qeventdispatcher_qpa_p.h @@ -54,28 +54,19 @@ // #include -#if defined(Q_OS_UNIX) -#include "private/qeventdispatcher_unix_p.h" -#define EVENTDISPATCHERBASE QEventDispatcherUNIX -#define EVENTDISPATCHERBASEPRIVATE QEventDispatcherUNIXPrivate -#elif defined(Q_OS_WIN) -#include "private/qeventdispatcher_win_p.h" -#define EVENTDISPATCHERBASE QEventDispatcherWin32 -#define EVENTDISPATCHERBASEPRIVATE QEventDispatcherWin32Private -#endif +#include QT_BEGIN_NAMESPACE class QEventDispatcherQPAPrivate; -class Q_GUI_EXPORT QEventDispatcherQPA : public EVENTDISPATCHERBASE +class Q_GUI_EXPORT QEventDispatcherQPA : public QEventDispatcherUNIX { Q_OBJECT Q_DECLARE_PRIVATE(QEventDispatcherQPA) public: explicit QEventDispatcherQPA(QObject *parent = 0); - QEventDispatcherQPA(EVENTDISPATCHERBASEPRIVATE &priv, QObject *parent); ~QEventDispatcherQPA(); bool processEvents(QEventLoop::ProcessEventsFlags flags); @@ -84,14 +75,6 @@ public: void flush(); }; -class Q_GUI_EXPORT QEventDispatcherQPAPrivate : public EVENTDISPATCHERBASEPRIVATE -{ - Q_DECLARE_PUBLIC(QEventDispatcherQPA) -public: - QEventDispatcherQPAPrivate(); - ~QEventDispatcherQPAPrivate(); -}; - QT_END_NAMESPACE #endif // QEVENTDISPATCHER_QPA_H -- 2.7.4