summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/windows/qwindowsguieventdispatcher.cpp
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@nokia.com>2012-07-23 16:56:11 +0200
committerQt by Nokia <qt-info@nokia.com>2012-07-23 19:57:07 +0200
commitbcb5e564ff302517156d881e57577f77bdc30f6e (patch)
tree6e02f8c513eb044bb1a4e449e762e3c8020688d6 /src/plugins/platforms/windows/qwindowsguieventdispatcher.cpp
parent0026b80cd2a484ad9d685ff5a4f89e6c9815f913 (diff)
WindowSystemInterface::sendWindowSystemEvents(): Remove unused parameter.
No need to pass the dispatcher. Get rid of Windows logic to maintain a stack of dispatcher associated with flags. Change-Id: Ic2daad4b6762a46fac3274937effc188af436c9a Reviewed-by: David Faure <faure@kde.org>
Diffstat (limited to 'src/plugins/platforms/windows/qwindowsguieventdispatcher.cpp')
-rw-r--r--src/plugins/platforms/windows/qwindowsguieventdispatcher.cpp39
1 files changed, 5 insertions, 34 deletions
diff --git a/src/plugins/platforms/windows/qwindowsguieventdispatcher.cpp b/src/plugins/platforms/windows/qwindowsguieventdispatcher.cpp
index dc8c432f27..2ebb3cefbd 100644
--- a/src/plugins/platforms/windows/qwindowsguieventdispatcher.cpp
+++ b/src/plugins/platforms/windows/qwindowsguieventdispatcher.cpp
@@ -64,35 +64,18 @@ QT_BEGIN_NAMESPACE
\ingroup qt-lighthouse-win
*/
-typedef QStack<QWindowsGuiEventDispatcher::DispatchContext> DispatchContextStack;
-
-Q_GLOBAL_STATIC(DispatchContextStack, dispatchContextStack)
-
QWindowsGuiEventDispatcher::QWindowsGuiEventDispatcher(QObject *parent) :
- QEventDispatcherWin32(parent)
-{
- setObjectName(QStringLiteral("QWindowsGuiEventDispatcher_0x") + QString::number((quintptr)this, 16));
- if (QWindowsContext::verboseEvents)
- qDebug("%s %s", __FUNCTION__, qPrintable(objectName()));
- dispatchContextStack()->push(DispatchContext(this, QEventLoop::AllEvents));
-}
-
-QWindowsGuiEventDispatcher::~QWindowsGuiEventDispatcher()
+ QEventDispatcherWin32(parent), m_flags(0)
{
- if (QWindowsContext::verboseEvents)
- qDebug("%s %s", __FUNCTION__, qPrintable(objectName()));
- if (!dispatchContextStack()->isEmpty())
- dispatchContextStack()->pop();
+ setObjectName(QStringLiteral("QWindowsGuiEventDispatcher"));
}
bool QWindowsGuiEventDispatcher::processEvents(QEventLoop::ProcessEventsFlags flags)
{
- DispatchContextStack &stack = *dispatchContextStack();
+ m_flags = flags;
if (QWindowsContext::verboseEvents > 2)
- qDebug(">%s %s %d", __FUNCTION__, qPrintable(objectName()), stack.size());
- stack.push(DispatchContext(this, flags));
+ qDebug(">%s %s %d", __FUNCTION__, qPrintable(objectName()), int(flags));
const bool rc = QEventDispatcherWin32::processEvents(flags);
- stack.pop();
if (QWindowsContext::verboseEvents > 2)
qDebug("<%s %s returns %d", __FUNCTION__, qPrintable(objectName()), rc);
return rc;
@@ -100,19 +83,7 @@ bool QWindowsGuiEventDispatcher::processEvents(QEventLoop::ProcessEventsFlags fl
void QWindowsGuiEventDispatcher::sendPostedEvents()
{
- QWindowsGuiEventDispatcher::DispatchContext context = currentDispatchContext();
- Q_ASSERT(context.first != 0);
- QWindowSystemInterface::sendWindowSystemEvents(context.first, context.second);
-}
-
-QWindowsGuiEventDispatcher::DispatchContext QWindowsGuiEventDispatcher::currentDispatchContext()
-{
- const DispatchContextStack &stack = *dispatchContextStack();
- if (stack.isEmpty()) {
- qWarning("%s: No dispatch context", __FUNCTION__);
- return DispatchContext(0, 0);
- }
- return stack.top();
+ QWindowSystemInterface::sendWindowSystemEvents(m_flags);
}
// Helpers for printing debug output for WM_* messages.