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.
This commit is contained in:
Morten Sorvig 2011-06-23 10:44:15 +02:00
parent 9988b12cc5
commit 454a4ebb67
2 changed files with 5 additions and 36 deletions

View File

@ -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;
}

View File

@ -54,28 +54,19 @@
//
#include <QtCore/qglobal.h>
#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 <QtCore/private/qeventdispatcher_unix_p.h>
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