diff options
author | Paul Lemire <paul.lemire@kdab.com> | 2016-01-21 09:39:39 +0100 |
---|---|---|
committer | Paul Lemire <paul.lemire@kdab.com> | 2016-01-22 14:29:38 +0000 |
commit | 5b9d76185e899082cfe3d989cb3f45029a259202 (patch) | |
tree | 20431c9b305a2b1868cd3405e257f1a99c29cb8e /src/core/aspects | |
parent | 86177b98e27a9d376e35039454986ff7de8f3104 (diff) |
QInputAspect: create EventSourceSetterHelper in main thread
Turns out that on initialize is called in the AspectThread.
Since event filters objects need to be created in the same thread
as the event source (the main thread), code has to be corrected.
Now the eventSourceHelper is created directly by the InputHandler when it is
created (as it's created in the main thread). Then onInitialize only takes
care of setting the eventFilterService which isn't available before.
Change-Id: I2cb18372337793230625f699a2ed51c7331af971
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
Diffstat (limited to 'src/core/aspects')
-rw-r--r-- | src/core/aspects/qabstractaspect.cpp | 8 | ||||
-rw-r--r-- | src/core/aspects/qaspectengine.cpp | 1 |
2 files changed, 9 insertions, 0 deletions
diff --git a/src/core/aspects/qabstractaspect.cpp b/src/core/aspects/qabstractaspect.cpp index 72ec7c502..fd4f3ec45 100644 --- a/src/core/aspects/qabstractaspect.cpp +++ b/src/core/aspects/qabstractaspect.cpp @@ -198,10 +198,18 @@ QVector<QAspectJobPtr> QAbstractAspectPrivate::jobsToExecute(qint64 time) return q->jobsToExecute(time); } +/*! + * + * Called in the QAspectThread context + */ void QAbstractAspect::onStartup() { } +/*! + * + * Called in the QAspectThread context + */ void QAbstractAspect::onShutdown() { } diff --git a/src/core/aspects/qaspectengine.cpp b/src/core/aspects/qaspectengine.cpp index 7eb26e1d6..11cbfc3e1 100644 --- a/src/core/aspects/qaspectengine.cpp +++ b/src/core/aspects/qaspectengine.cpp @@ -168,6 +168,7 @@ void QAspectEnginePrivate::shutdown() /*! * Registers a new \a aspect to the AspectManager. */ +// Called in the main thread void QAspectEngine::registerAspect(QAbstractAspect *aspect) { Q_D(QAspectEngine); |