diff options
author | Laszlo Agocs <laszlo.agocs@digia.com> | 2013-10-02 14:20:06 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-10-07 19:09:37 +0200 |
commit | cf092abdfc888f19a607a43c9b4bac776b5c1f8e (patch) | |
tree | deaef143d4e310d73f0fbf7e839ddbd1c7cf2eb1 /src/gui/kernel/qplatformintegration.cpp | |
parent | 8a383c585f337320a203e26c505b594c949d59e5 (diff) |
QPA: Fix event dispatcher dependent operations in platform integration
999e5162ec3e86c9cb84c3ec95dfd0ba4b21277f breaks QPlatformIntegration
implementations that perform tasks in their constructor that rely on
the event dispatcher. For example creating a QSocketNotifier is not
possible anymore since the event dispatcher is created later on.
This is fixed by introducing an additional virtual in
QPlatformIntegration that gets called after createEventDispatcher().
Two broken platform plugins have been identified so far: eglfs is
creating socket notifiers to read events from input devices and xcb's
input context plugins may use dbus. Both are updated accordingly.
Task-number: QTBUG-33768
Change-Id: I5badb623958a52ab5314ff93dd7d60061f5df70a
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
Diffstat (limited to 'src/gui/kernel/qplatformintegration.cpp')
-rw-r--r-- | src/gui/kernel/qplatformintegration.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/gui/kernel/qplatformintegration.cpp b/src/gui/kernel/qplatformintegration.cpp index 3f93856349..22d6746ce0 100644 --- a/src/gui/kernel/qplatformintegration.cpp +++ b/src/gui/kernel/qplatformintegration.cpp @@ -291,6 +291,18 @@ QPaintEngine *QPlatformIntegration::createImagePaintEngine(QPaintDevice *paintDe } /*! + Performs initialization steps that depend on having an event dispatcher + available. Called after the event dispatcher has been created. + + Tasks that require an event dispatcher, for example creating socket notifiers, cannot be + performed in the constructor. Instead, they should be performed here. The default + implementation does nothing. +*/ +void QPlatformIntegration::initialize() +{ +} + +/*! Returns the platforms input context. The default implementation returns 0, implying no input method support. |