summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@digia.com>2012-09-26 14:15:39 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2012-09-26 19:54:19 +0200
commitc4e736cf9d0ff9cecfa03c1e6386957c7de706da (patch)
tree40fb086f84cab70f7ca850e8d0008c8f87cdb0b3 /src/gui
parentaad58ac87e371129ee61168effd9daa491b476ab (diff)
Fix events being processed on application start
Commit ef2efafcc6b28791df6258fa1c5d565090a9577a introduced a call to QWindowSystemInterface::sendWindowSystemEvents() in QGuiApplicationPrivate::init(), which in its implementation ends up calling sendPostedEvents() before flushing and processing any pending (internal) window system events. This patch changes the call in init() to use QWindowSystemInterface::flushWindowSystemEvents() instead, which is more gentle in that regard. The provided unit test verifies that no posted events are processed during the execution of the QGuiApplication constructor while at the same time verifying what the original changed tried to do: Allow a generic plugin to provide window system specific defaults that are implemented using the event queue of QWindowSystemInterface. Task-number: QTBUG-26886 Change-Id: I129a907c00d947df60fe1a02efc67857580fce24 Reviewed-by: David Faure <faure@kde.org>
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/kernel/qguiapplication.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/kernel/qguiapplication.cpp b/src/gui/kernel/qguiapplication.cpp
index 8659c4c1f6..419403d938 100644
--- a/src/gui/kernel/qguiapplication.cpp
+++ b/src/gui/kernel/qguiapplication.cpp
@@ -905,7 +905,7 @@ void QGuiApplicationPrivate::init()
is_app_running = true;
init_plugins(pluginList);
- QWindowSystemInterface::sendWindowSystemEvents(QEventLoop::AllEvents);
+ QWindowSystemInterface::flushWindowSystemEvents();
}
extern void qt_cleanupFontDatabase();