diff options
-rw-r--r-- | src/quick/scenegraph/qsgthreadedrenderloop.cpp | 4 | ||||
-rw-r--r-- | tests/auto/quick/qquickimage/data/qtbug_32513.qml | 63 | ||||
-rw-r--r-- | tests/auto/quick/qquickimage/tst_qquickimage.cpp | 10 |
3 files changed, 75 insertions, 2 deletions
diff --git a/src/quick/scenegraph/qsgthreadedrenderloop.cpp b/src/quick/scenegraph/qsgthreadedrenderloop.cpp index bfd9a2fb20..1e0d7c5776 100644 --- a/src/quick/scenegraph/qsgthreadedrenderloop.cpp +++ b/src/quick/scenegraph/qsgthreadedrenderloop.cpp @@ -535,12 +535,12 @@ void QSGRenderThread::sync() } } + QCoreApplication::sendPostedEvents(0, QEvent::DeferredDelete); + RLDEBUG(" Render: - unlocking after sync"); waitCondition.wakeOne(); mutex.unlock(); - - QCoreApplication::sendPostedEvents(0, QEvent::DeferredDelete); } diff --git a/tests/auto/quick/qquickimage/data/qtbug_32513.qml b/tests/auto/quick/qquickimage/data/qtbug_32513.qml new file mode 100644 index 0000000000..b6cbe33eec --- /dev/null +++ b/tests/auto/quick/qquickimage/data/qtbug_32513.qml @@ -0,0 +1,63 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 + +Item { + width: 200; height: 200 + + Image { + cache: false + + NumberAnimation on opacity { + loops: Animation.Infinite + from: 1; to: 0 + } + + SequentialAnimation on source { + loops: Animation.Infinite + PropertyAction { value: "green.png" } + PauseAnimation { duration: 100 } + PropertyAction { value: "pattern.png" } + PauseAnimation { duration: 100 } + } + } +} diff --git a/tests/auto/quick/qquickimage/tst_qquickimage.cpp b/tests/auto/quick/qquickimage/tst_qquickimage.cpp index 0804c7b900..8bdb9c9de5 100644 --- a/tests/auto/quick/qquickimage/tst_qquickimage.cpp +++ b/tests/auto/quick/qquickimage/tst_qquickimage.cpp @@ -99,6 +99,7 @@ private slots: void sourceSize_QTBUG_16389(); void nullPixmapPaint(); void imageCrash_QTBUG_22125(); + void imageCrash_QTBUG_32513(); void sourceSize_data(); void sourceSize(); void progressAndStatusChanges(); @@ -704,6 +705,15 @@ void tst_qquickimage::imageCrash_QTBUG_22125() QCoreApplication::processEvents(); } +void tst_qquickimage::imageCrash_QTBUG_32513() +{ + QQuickView view(testFileUrl("qtbug_32513.qml")); + view.show(); + QVERIFY(QTest::qWaitForWindowExposed(&view)); + QTest::qWait(1000); + // shouldn't crash when the image changes sources +} + void tst_qquickimage::sourceSize_data() { QTest::addColumn<int>("sourceWidth"); |