diff options
author | Simon Hausmann <simon.hausmann@digia.com> | 2014-08-26 09:43:33 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@digia.com> | 2014-08-26 09:51:56 +0200 |
commit | e9e6f70d355499d551a26960d236644f92ea38af (patch) | |
tree | 542840d4b3b8ff82d6fab38c9ad2615d3592b793 /src/quick | |
parent | 916ced089f37d96ca8ef1cdb938791247bd44b72 (diff) | |
parent | eadc35f499edd25d5d1c5f803db1d61675c1cc2c (diff) |
Merge remote-tracking branch 'origin/5.3' into 5.4
Conflicts:
src/qml/qml/qqmlobjectcreator_p.h
Change-Id: I60858ddb46866a8fa1a8576bb05b412afeeb4e41
Diffstat (limited to 'src/quick')
-rw-r--r-- | src/quick/items/context2d/qquickcontext2d.cpp | 2 | ||||
-rw-r--r-- | src/quick/scenegraph/qsgthreadedrenderloop.cpp | 12 | ||||
-rw-r--r-- | src/quick/util/qquickstatechangescript.cpp | 2 |
3 files changed, 14 insertions, 2 deletions
diff --git a/src/quick/items/context2d/qquickcontext2d.cpp b/src/quick/items/context2d/qquickcontext2d.cpp index 228f0be3fe..28c84facb5 100644 --- a/src/quick/items/context2d/qquickcontext2d.cpp +++ b/src/quick/items/context2d/qquickcontext2d.cpp @@ -2808,7 +2808,7 @@ QV4::ReturnedValue QQuickJSContext2DPrototype::method_strokeText(QV4::CallContex \brief Provides a Context2D TextMetrics interface The TextMetrics object can be created by QtQuick::Context2D::measureText method. - See \l{http://www.w3.org/TR/2dcontext/#textmetrics}{W3C 2d context TexMetrics} for more details. + See \l{http://www.w3.org/TR/2dcontext/#textmetrics}{W3C 2d context TextMetrics} for more details. \sa Context2D::measureText \sa width diff --git a/src/quick/scenegraph/qsgthreadedrenderloop.cpp b/src/quick/scenegraph/qsgthreadedrenderloop.cpp index b69058a504..7bf1d759f7 100644 --- a/src/quick/scenegraph/qsgthreadedrenderloop.cpp +++ b/src/quick/scenegraph/qsgthreadedrenderloop.cpp @@ -1037,6 +1037,18 @@ void QSGThreadedRenderLoop::releaseResources(Window *w, bool inDestructor) w->thread->postEvent(new WMTryReleaseEvent(window, inDestructor, fallback)); w->thread->waitCondition.wait(&w->thread->mutex); delete fallback; + + // Avoid a shutdown race condition. + // If SG is invalidated and 'active' becomes false, the thread's run() + // method will exit. handleExposure() relies on QThread::isRunning() (because it + // potentially needs to start the thread again) and our mutex cannot be used to + // track the thread stopping, so we wait a few nanoseconds extra so the thread + // can exit properly. + if (!w->thread->active) { + qCDebug(QSG_LOG_RENDERLOOP) << " - waiting for render thread to exit" << w->window; + w->thread->wait(); + qCDebug(QSG_LOG_RENDERLOOP) << " - render thread finished" << w->window; + } } w->thread->mutex.unlock(); } diff --git a/src/quick/util/qquickstatechangescript.cpp b/src/quick/util/qquickstatechangescript.cpp index 89fa22205f..02a9507ce9 100644 --- a/src/quick/util/qquickstatechangescript.cpp +++ b/src/quick/util/qquickstatechangescript.cpp @@ -67,7 +67,7 @@ public: A StateChangeScript is run upon entering a state. You can optionally use ScriptAction to specify the point in the transition at which - the StateChangeScript should to be run. + the StateChangeScript should be run. \snippet qml/states/statechangescript.qml state and transition |