Add QWindowSystemInterface::windowSystemEventsQueued()
authorMorten Sorvig <morten.sorvig@nokia.com>
Thu, 23 Jun 2011 08:31:46 +0000 (10:31 +0200)
committerMorten Sorvig <morten.sorvig@nokia.com>
Thu, 23 Jun 2011 09:04:21 +0000 (11:04 +0200)
This removes the last use of QWindowSystemInterfacePrivate
from outside QtGui, so we can make that class non-exported
again.

src/gui/kernel/qwindowsysteminterface_qpa.cpp
src/gui/kernel/qwindowsysteminterface_qpa.h
src/gui/kernel/qwindowsysteminterface_qpa_p.h
src/platformsupport/eventdispatchers/qeventdispatcher_glib.cpp
src/platformsupport/eventdispatchers/qeventdispatcher_qpa.cpp

index 6b2b2d5..cde46ac 100644 (file)
@@ -303,4 +303,9 @@ bool QWindowSystemInterface::sendWindowSystemEvents(QAbstractEventDispatcher *ev
     return (nevents > 0);
 }
 
+int QWindowSystemInterface::windowSystemEventsQueued()
+{
+    return QWindowSystemInterfacePrivate::windowSystemEventsQueued();
+}
+
 QT_END_NAMESPACE
index 17d8f83..07963b6 100644 (file)
@@ -110,6 +110,7 @@ public:
 
     // For event dispatcher implementations
     static bool sendWindowSystemEvents(QAbstractEventDispatcher *eventDispatcher, QEventLoop::ProcessEventsFlags flags);
+    static int windowSystemEventsQueued();
 };
 
 QT_END_NAMESPACE
index 5c9a6b0..912ac87 100644 (file)
@@ -47,7 +47,7 @@ QT_BEGIN_HEADER
 
 QT_BEGIN_NAMESPACE
 
-class Q_GUI_EXPORT QWindowSystemInterfacePrivate {
+class QWindowSystemInterfacePrivate {
 public:
     enum EventType {
         Close,
index 3d28ea2..a56e4c2 100644 (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)
index db20797..4dea1e5 100644 (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()