From 323f4886dcb99c419568802b96db88ddc9cba111 Mon Sep 17 00:00:00 2001 From: Antti Kokko Date: Thu, 4 Jan 2018 12:45:13 +0200 Subject: Add changes file for Qt 5.9.4 Change-Id: Iaf69bf3bc6370aa8d402a3309f6e2337a1af208a Reviewed-by: Shawn Rutledge Reviewed-by: Lars Knoll --- dist/changes-5.9.4 | 77 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 dist/changes-5.9.4 diff --git a/dist/changes-5.9.4 b/dist/changes-5.9.4 new file mode 100644 index 0000000000..c0e861a706 --- /dev/null +++ b/dist/changes-5.9.4 @@ -0,0 +1,77 @@ +Qt 5.9.4 is a bug-fix release. It maintains both forward and backward +compatibility (source and binary) with Qt 5.9.0. + +For more details, refer to the online documentation included in this +distribution. The documentation is also available online: + +http://doc.qt.io/qt-5/index.html + +The Qt version 5.9 series is binary compatible with the 5.8.x series. +Applications compiled for 5.8 will continue to run with 5.9. + +Some of the changes listed in this file include issue tracking numbers +corresponding to tasks in the Qt Bug Tracker: + +https://bugreports.qt.io/ + +Each of these identifiers can be entered in the bug tracker to obtain more +information about a particular change. + +**************************************************************************** +* Qt 5.9.4 Changes * +**************************************************************************** + +QtQml +----- + + - Added qt.qml.gc.statistics and qt.qml.gc.allocatorStats logging + categories for garbage collection statistics + - [QTBUG-56521][QTBUG-56532] Added private qmlUnregisterType(int) for + advanced use cases such as re-registering an enum, or cleaning up + when a plugin is unloaded + - [QTBUG-61209] Fixed handling of QML cache files during URL interception + - [QTBUG-63844] Fixed a crash in QMetaObject::activate() when using + a Loader to load items with animations + +QtQuick +------- + + - QQuickWindow: + * Added logging category qt.quick.window.transient to check detection of + transient windows declared inside other Items and Windows + + - QQuickWidget: + * [QTBUG-64241] Synthesized mouse events delivered via QQuickWidget + have QMouseEvent::source() set so they can be identified as synthesized + * [QTBUG-64548] Shortcut now works in QQuickWidget + * Fixed coordinate transformation in QInputMethodQueryEvent as delivered + to QQuickWidget + + - Input Handling: + * [QTBUG-53036] When an application is deactivated (applicationState() is + no longer ApplicationActive), it's treated the same as window deactivation. + Thus on mobile devices MouseAreas no longer get stuck in pressed state, etc. + * [QTBUG-61144] Fixed the regression that when a mouse-handling Item + or Control is used in a Flickable with a pressDelay, the delegate item + did not receive touchscreen taps (in the form of mouse clicks) + * [QTBUG-63026] Flickable no longer jumps when reversing the direction of + scrolling on a pixel-delta-capable trackpad + * [QTBUG-64249] When pressing one MouseArea via mouse, then tapping another + via touch, then releasing, the first MouseArea correctly gets released + + - Item Views: + * [QTBUG-46488] Refilling is restarted when necessary due to changing + the model in a delegate's Component.onCompleted() + * [QTBUG-50992] Fixed a bug which caused Qt Quick Controls to often be + "destroyed during incubation" during asynchronous creation + * [QTBUG-54859] Fixed a crash when items in a Repeater are moved around + during asynchronous creation + * [QTBUG-61537] Fixed incorrect delegate geometry due to model changes + during delegate creation + * [QTBUG-62864] Fixed incorrect ListView and GridView highlight position + while scrolling through delegates backed by a lazy-loading model + * [QTBUG-63743] Fixed a bug with clipping of items in a ScrollView + + - Other: + * [QTBUG-62913] AnimatedImage.frameCount now has a NOTIFY signal + * [QTBUG-65156] Fixed a memory leak by releasing textures during resizing -- cgit v1.2.3 From 2b8bc44a88490d359b986ecfbf7c71d8216daa4c Mon Sep 17 00:00:00 2001 From: Andy Shaw Date: Thu, 11 Jan 2018 13:21:05 +0100 Subject: Don't recreate QOpenGLContext when the application is sharing contexts Task-number: QTBUG-63304 Change-Id: Idfefb246a15166e04c0db0c894a705a7be2ecf67 Reviewed-by: Laszlo Agocs --- src/quickwidgets/qquickwidget.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/quickwidgets/qquickwidget.cpp b/src/quickwidgets/qquickwidget.cpp index df28ff964a..fd1ae52298 100644 --- a/src/quickwidgets/qquickwidget.cpp +++ b/src/quickwidgets/qquickwidget.cpp @@ -934,7 +934,7 @@ void QQuickWidget::createFramebufferObject() } QOpenGLContext *shareWindowContext = QWidgetPrivate::get(window())->shareContext(); - if (shareWindowContext && context->shareContext() != shareWindowContext) { + if (shareWindowContext && context->shareContext() != shareWindowContext && !qGuiApp->testAttribute(Qt::AA_ShareOpenGLContexts)) { context->setShareContext(shareWindowContext); context->setScreen(shareWindowContext->screen()); if (!context->create()) -- cgit v1.2.3 From 6b1682870c20a0fc86e0bb2ea8d63c3d1df1be86 Mon Sep 17 00:00:00 2001 From: Ulf Hermann Date: Wed, 17 Jan 2018 10:33:34 +0100 Subject: Blacklist test_move() in tst_qquickcustomaffector on win/gcc The test is unstable. Also, print the actual numbers if the fuzzyCompare QVERIFYs fail again. This way we can see better what is going on. Task-number: QTBUG-65819 Change-Id: I65368300498382f7bfebb25299280aa15e3a56ef Reviewed-by: Jani Heikkinen --- tests/auto/particles/qquickcustomaffector/BLACKLIST | 2 ++ .../qquickcustomaffector/tst_qquickcustomaffector.cpp | 15 ++++++++------- 2 files changed, 10 insertions(+), 7 deletions(-) create mode 100644 tests/auto/particles/qquickcustomaffector/BLACKLIST diff --git a/tests/auto/particles/qquickcustomaffector/BLACKLIST b/tests/auto/particles/qquickcustomaffector/BLACKLIST new file mode 100644 index 0000000000..0757641bcc --- /dev/null +++ b/tests/auto/particles/qquickcustomaffector/BLACKLIST @@ -0,0 +1,2 @@ +[test_move] +windows gcc developer-build diff --git a/tests/auto/particles/qquickcustomaffector/tst_qquickcustomaffector.cpp b/tests/auto/particles/qquickcustomaffector/tst_qquickcustomaffector.cpp index ee05fb29c9..cad3813e92 100644 --- a/tests/auto/particles/qquickcustomaffector/tst_qquickcustomaffector.cpp +++ b/tests/auto/particles/qquickcustomaffector/tst_qquickcustomaffector.cpp @@ -98,16 +98,17 @@ void tst_qquickcustomaffector::test_move() if (!d->stillAlive(system)) continue; //parameters no longer get set once you die - QVERIFY(myFuzzyCompare(d->curX(system), 50.0)); - QVERIFY(myFuzzyCompare(d->curY(system), 50.0)); - QVERIFY(myFuzzyCompare(d->curVX(system), 50.0)); - QVERIFY(myFuzzyCompare(d->curVY(system), 50.0)); - QVERIFY(myFuzzyCompare(d->curAX(), 50.0)); - QVERIFY(myFuzzyCompare(d->curAY(), 50.0)); + QVERIFY2(myFuzzyCompare(d->curX(system), 50.0), QByteArray::number(d->curX(system))); + QVERIFY2(myFuzzyCompare(d->curY(system), 50.0), QByteArray::number(d->curY(system))); + QVERIFY2(myFuzzyCompare(d->curVX(system), 50.0), QByteArray::number(d->curVX(system))); + QVERIFY2(myFuzzyCompare(d->curVY(system), 50.0), QByteArray::number(d->curVY(system))); + QVERIFY2(myFuzzyCompare(d->curAX(), 50.0), QByteArray::number(d->curAX())); + QVERIFY2(myFuzzyCompare(d->curAY(), 50.0), QByteArray::number(d->curAY())); QCOMPARE(d->lifeSpan, 0.5f); QCOMPARE(d->size, 32.f); QCOMPARE(d->endSize, 32.f); - QVERIFY(myFuzzyLEQ(d->t, ((qreal)system->timeInt/1000.0))); + QVERIFY2(myFuzzyLEQ(d->t, ((qreal)system->timeInt/1000.0)), + QString::fromLatin1("%1 <= %2 / 1000").arg(d->t).arg(system->timeInt).toUtf8()); } delete view; } -- cgit v1.2.3 From 317908e72a6ea0b4ca179690539cb352bbf60832 Mon Sep 17 00:00:00 2001 From: Ulf Hermann Date: Tue, 16 Jan 2018 14:29:40 +0100 Subject: Use localPos for windowPos when passing mouse events to QQuickWidget QQuickWidget thinks of itself as a toplevel window, so it cannot process the offsets in a parent window. Amends 41293196b4db1aa7a0c616af312875c484639644. Task-number: QTBUG-65800 Change-Id: I8c5dcb8f44a6cbdb58bcc956d8263e68d8180bec Reviewed-by: Shawn Rutledge Reviewed-by: Laszlo Agocs --- src/quickwidgets/qquickwidget.cpp | 18 +++++++------- .../auto/quickwidgets/qquickwidget/data/mouse.qml | 18 ++++++++++++++ .../quickwidgets/qquickwidget/tst_qquickwidget.cpp | 29 ++++++++++++++++++++++ 3 files changed, 56 insertions(+), 9 deletions(-) create mode 100644 tests/auto/quickwidgets/qquickwidget/data/mouse.qml diff --git a/src/quickwidgets/qquickwidget.cpp b/src/quickwidgets/qquickwidget.cpp index fd1ae52298..b15df88112 100644 --- a/src/quickwidgets/qquickwidget.cpp +++ b/src/quickwidgets/qquickwidget.cpp @@ -1246,11 +1246,11 @@ void QQuickWidget::mouseMoveEvent(QMouseEvent *e) Q_QUICK_INPUT_PROFILE(QQuickProfiler::Mouse, QQuickProfiler::InputMouseMove, e->localPos().x(), e->localPos().y()); - // Use the constructor taking localPos and screenPos. That puts localPos into the - // event's localPos and windowPos, and screenPos into the event's screenPos. This way - // the windowPos in e is ignored and is replaced by localPos. This is necessary - // because QQuickWindow thinks of itself as a top-level window always. - QMouseEvent mappedEvent(e->type(), e->localPos(), e->windowPos(), e->screenPos(), + // Put localPos into the event's localPos and windowPos, and screenPos into the + // event's screenPos. This way the windowPos in e is ignored and is replaced by + // localPos. This is necessary because QQuickWindow thinks of itself as a + // top-level window always. + QMouseEvent mappedEvent(e->type(), e->localPos(), e->localPos(), e->screenPos(), e->button(), e->buttons(), e->modifiers(), e->source()); QCoreApplication::sendEvent(d->offscreenWindow, &mappedEvent); e->setAccepted(mappedEvent.isAccepted()); @@ -1265,11 +1265,11 @@ void QQuickWidget::mouseDoubleClickEvent(QMouseEvent *e) // As the second mouse press is suppressed in widget windows we emulate it here for QML. // See QTBUG-25831 - QMouseEvent pressEvent(QEvent::MouseButtonPress, e->localPos(), e->windowPos(), e->screenPos(), + QMouseEvent pressEvent(QEvent::MouseButtonPress, e->localPos(), e->localPos(), e->screenPos(), e->button(), e->buttons(), e->modifiers(), e->source()); QCoreApplication::sendEvent(d->offscreenWindow, &pressEvent); e->setAccepted(pressEvent.isAccepted()); - QMouseEvent mappedEvent(e->type(), e->localPos(), e->windowPos(), e->screenPos(), + QMouseEvent mappedEvent(e->type(), e->localPos(), e->localPos(), e->screenPos(), e->button(), e->buttons(), e->modifiers(), e->source()); QCoreApplication::sendEvent(d->offscreenWindow, &mappedEvent); } @@ -1330,7 +1330,7 @@ void QQuickWidget::mousePressEvent(QMouseEvent *e) Q_QUICK_INPUT_PROFILE(QQuickProfiler::Mouse, QQuickProfiler::InputMousePress, e->button(), e->buttons()); - QMouseEvent mappedEvent(e->type(), e->localPos(), e->windowPos(), e->screenPos(), + QMouseEvent mappedEvent(e->type(), e->localPos(), e->localPos(), e->screenPos(), e->button(), e->buttons(), e->modifiers(), e->source()); QCoreApplication::sendEvent(d->offscreenWindow, &mappedEvent); e->setAccepted(mappedEvent.isAccepted()); @@ -1343,7 +1343,7 @@ void QQuickWidget::mouseReleaseEvent(QMouseEvent *e) Q_QUICK_INPUT_PROFILE(QQuickProfiler::Mouse, QQuickProfiler::InputMouseRelease, e->button(), e->buttons()); - QMouseEvent mappedEvent(e->type(), e->localPos(), e->windowPos(), e->screenPos(), + QMouseEvent mappedEvent(e->type(), e->localPos(), e->localPos(), e->screenPos(), e->button(), e->buttons(), e->modifiers(), e->source()); QCoreApplication::sendEvent(d->offscreenWindow, &mappedEvent); e->setAccepted(mappedEvent.isAccepted()); diff --git a/tests/auto/quickwidgets/qquickwidget/data/mouse.qml b/tests/auto/quickwidgets/qquickwidget/data/mouse.qml new file mode 100644 index 0000000000..5d1c6e8443 --- /dev/null +++ b/tests/auto/quickwidgets/qquickwidget/data/mouse.qml @@ -0,0 +1,18 @@ +import QtQuick 2.0 + +Rectangle { + width: 50 + height: 50 + + property bool wasClicked: false + property bool wasDoubleClicked: false + property bool wasMoved: false + + MouseArea { + anchors.fill: parent + hoverEnabled: true + onClicked: wasClicked = true + onDoubleClicked: wasDoubleClicked = true + onMouseXChanged: wasMoved = true + } +} diff --git a/tests/auto/quickwidgets/qquickwidget/tst_qquickwidget.cpp b/tests/auto/quickwidgets/qquickwidget/tst_qquickwidget.cpp index e4991a5f26..6c8d8191a5 100644 --- a/tests/auto/quickwidgets/qquickwidget/tst_qquickwidget.cpp +++ b/tests/auto/quickwidgets/qquickwidget/tst_qquickwidget.cpp @@ -62,6 +62,7 @@ private slots: void keyEvents(); void shortcuts(); void enterLeave(); + void mouseEventWindowPos(); }; @@ -433,6 +434,34 @@ void tst_qquickwidget::enterLeave() QTRY_VERIFY(!rootItem->property("hasMouse").toBool()); } +void tst_qquickwidget::mouseEventWindowPos() +{ + QWidget widget; + widget.resize(100, 100); + QQuickWidget *quick = new QQuickWidget(&widget); + quick->setSource(testFileUrl("mouse.qml")); + quick->move(50, 50); + widget.show(); + QVERIFY(QTest::qWaitForWindowExposed(&widget, 5000)); + QQuickItem *rootItem = quick->rootObject(); + QVERIFY(rootItem); + + QVERIFY(!rootItem->property("wasClicked").toBool()); + QVERIFY(!rootItem->property("wasDoubleClicked").toBool()); + QVERIFY(!rootItem->property("wasMoved").toBool()); + + QWindow *window = widget.windowHandle(); + QVERIFY(window); + + QTest::mouseMove(window, QPoint(60, 60)); + QTest::mouseClick(window, Qt::LeftButton, Qt::KeyboardModifiers(), QPoint(60, 60)); + QTRY_VERIFY(rootItem->property("wasClicked").toBool()); + QTest::mouseDClick(window, Qt::LeftButton, Qt::KeyboardModifiers(), QPoint(60, 60)); + QTRY_VERIFY(rootItem->property("wasDoubleClicked").toBool()); + QTest::mouseMove(window, QPoint(70, 70)); + QTRY_VERIFY(rootItem->property("wasMoved").toBool()); +} + QTEST_MAIN(tst_qquickwidget) #include "tst_qquickwidget.moc" -- cgit v1.2.3