Add QWindowSystemInterface::windowSystemEventsQueued()

This removes the last use of QWindowSystemInterfacePrivate
from outside QtGui, so we can make that class non-exported
again.
This commit is contained in:
Morten Sorvig 2011-06-23 10:31:46 +02:00
parent 58d10c0bd7
commit 9988b12cc5
5 changed files with 9 additions and 3 deletions

View File

@ -303,4 +303,9 @@ bool QWindowSystemInterface::sendWindowSystemEvents(QAbstractEventDispatcher *ev
return (nevents > 0);
}
int QWindowSystemInterface::windowSystemEventsQueued()
{
return QWindowSystemInterfacePrivate::windowSystemEventsQueued();
}
QT_END_NAMESPACE

View File

@ -110,6 +110,7 @@ public:
// For event dispatcher implementations
static bool sendWindowSystemEvents(QAbstractEventDispatcher *eventDispatcher, QEventLoop::ProcessEventsFlags flags);
static int windowSystemEventsQueued();
};
QT_END_NAMESPACE

View File

@ -47,7 +47,7 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
class Q_GUI_EXPORT QWindowSystemInterfacePrivate {
class QWindowSystemInterfacePrivate {
public:
enum EventType {
Close,

View File

@ -63,7 +63,7 @@ static gboolean userEventSourcePrepare(GSource *s, gint *timeout)
Q_UNUSED(s)
Q_UNUSED(timeout)
return QWindowSystemInterfacePrivate::windowSystemEventsQueued() > 0;
return QWindowSystemInterface::windowSystemEventsQueued() > 0;
}
static gboolean userEventSourceCheck(GSource *source)

View File

@ -96,7 +96,7 @@ bool QEventDispatcherQPA::processEvents(QEventLoop::ProcessEventsFlags flags)
bool QEventDispatcherQPA::hasPendingEvents()
{
extern uint qGlobalPostedEventsCount(); // from qapplication.cpp
return qGlobalPostedEventsCount() || QWindowSystemInterfacePrivate::windowSystemEventsQueued();
return qGlobalPostedEventsCount() || QWindowSystemInterface::windowSystemEventsQueued();
}
void QEventDispatcherQPA::flush()