From 96d057e6a5138918c9f8b92ce3320042fa6417fc Mon Sep 17 00:00:00 2001 From: Erik Verbruggen Date: Wed, 7 Dec 2016 11:17:30 +0100 Subject: V4 Interpreter: reset the exception handler for every catch block If an exception handler consists of multiple basic-blocks, and is then followed by a finally block (for example: a catch block with a throw followed by a return, and then a subsequent finally block), then the finally block can be reached before the exception handler is reset by skipping the second block of the catch handler with a throw. As the finally block will then rethrow, and the old exception handler is still there, it will end in an endless loop. The fix is to reset the exception handler for every catch block. The problem occurred in ch12/12.14/S12.14_A13_T3 Change-Id: I968b62c6c2af30af32e2717a9ce85f852523dbe8 Reviewed-by: Simon Hausmann --- src/qml/compiler/qv4isel_moth.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/qml/compiler/qv4isel_moth.cpp b/src/qml/compiler/qv4isel_moth.cpp index ca6319ef3c..f2bd57ad8f 100644 --- a/src/qml/compiler/qv4isel_moth.cpp +++ b/src/qml/compiler/qv4isel_moth.cpp @@ -242,6 +242,11 @@ void InstructionSelection::run(int functionIndex) addInstruction(set); } exceptionHandler = _block->catchBlock; + } else if (_block->catchBlock == nullptr && _block->index() != 0 && _block->in.isEmpty()) { + exceptionHandler = nullptr; + Instruction::SetExceptionHandler set; + set.offset = 0; + addInstruction(set); } for (IR::Stmt *s : _block->statements()) { -- cgit v1.2.3 From 19f9cf8d2e3d9116aa19b1f988fc5490247add4c Mon Sep 17 00:00:00 2001 From: Venugopal Shivashankar Date: Thu, 8 Dec 2016 13:45:54 +0100 Subject: Calqlatr Example: Pass the third arg to the mapToItem() calls MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Apparently the mapToItem version used in the example requires at least three arguments, for some reason only two were provided, the item and the mouseX coordinate. Without the third argument, mouseY coordinate, the drag operation to move the display fails with warnings on the console. Task-number: QTBUG-57514 Change-Id: If1b16c27539bd90a2d20203dedc26f11ac2a0942 Reviewed-by: Shawn Rutledge Reviewed-by: Topi Reiniö Reviewed-by: Mitch Curtis --- examples/quick/demos/calqlatr/calqlatr.qml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/examples/quick/demos/calqlatr/calqlatr.qml b/examples/quick/demos/calqlatr/calqlatr.qml index 81f95907a6..017d819b01 100644 --- a/examples/quick/demos/calqlatr/calqlatr.qml +++ b/examples/quick/demos/calqlatr/calqlatr.qml @@ -128,6 +128,7 @@ Rectangle { height: parent.height MouseArea { + id: mouseInput property real startX: 0 property real oldP: 0 property bool rewind: false @@ -140,7 +141,7 @@ Rectangle { height: 50 onPositionChanged: { var reverse = startX > window.width / 2 - var mx = mapToItem(window, mouse.x).x + var mx = mapToItem(window, mouseInput.mouseX, mouseInput.mouseY).x var p = Math.abs((mx - startX) / (window.width - display.width)) if (p < oldP) rewind = reverse ? false : true @@ -149,7 +150,7 @@ Rectangle { controller.progress = reverse ? 1 - p : p oldP = p } - onPressed: startX = mapToItem(window, mouse.x).x + onPressed: startX = mapToItem(window, mouseInput.mouseX, mouseInput.mouseY).x onReleased: { if (rewind) controller.completeToBeginning() -- cgit v1.2.3 From 2d6070355ca690e096f7740f7409d3e6e0a44b68 Mon Sep 17 00:00:00 2001 From: Shawn Rutledge Date: Thu, 1 Dec 2016 13:02:34 +0100 Subject: rename QPointerUniqueId -> QPointingDeviceUniqueId MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Several people agreed that the name was confusing and that this one is better. Task-number: QTBUG-54616 Change-Id: Ie9d24fc6e233949be36c8b6ee2650080a8a3506e Reviewed-by: Sune Vuorela Reviewed-by: Jan Arve Sæther --- src/quick/items/qquickevents.cpp | 2 +- src/quick/items/qquickevents_p_p.h | 9 ++++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/quick/items/qquickevents.cpp b/src/quick/items/qquickevents.cpp index 9b49fcdf2a..a5497f4627 100644 --- a/src/quick/items/qquickevents.cpp +++ b/src/quick/items/qquickevents.cpp @@ -552,7 +552,7 @@ void QQuickEventTouchPoint::reset(const QTouchEvent::TouchPoint &tp, ulong times QQuickEventPoint::reset(tp.state(), tp.scenePos(), tp.id(), timestamp); m_rotation = tp.rotation(); m_pressure = tp.pressure(); -// m_uniqueId = tp.uniqueId(); + m_uniqueId = tp.uniqueId(); } /*! diff --git a/src/quick/items/qquickevents_p_p.h b/src/quick/items/qquickevents_p_p.h index 6179791413..d25b61d62e 100644 --- a/src/quick/items/qquickevents_p_p.h +++ b/src/quick/items/qquickevents_p_p.h @@ -302,8 +302,7 @@ class Q_QUICK_PRIVATE_EXPORT QQuickEventTouchPoint : public QQuickEventPoint Q_OBJECT Q_PROPERTY(qreal rotation READ rotation) Q_PROPERTY(qreal pressure READ pressure) -// TODO rename to QPointingDeviceUniqueId -// Q_PROPERTY(QPointerUniqueId uniqueId READ uniqueId) + Q_PROPERTY(QPointingDeviceUniqueId uniqueId READ uniqueId) public: QQuickEventTouchPoint(QQuickPointerTouchEvent *parent); @@ -312,12 +311,12 @@ public: qreal rotation() const { return m_rotation; } qreal pressure() const { return m_pressure; } -// QPointerUniqueId uniqueId() const { return m_uniqueId; } + QPointingDeviceUniqueId uniqueId() const { return m_uniqueId; } private: qreal m_rotation; qreal m_pressure; -// QPointerUniqueId m_uniqueId; + QPointingDeviceUniqueId m_uniqueId; Q_DISABLE_COPY(QQuickEventTouchPoint) }; @@ -555,7 +554,7 @@ QML_DECLARE_TYPE(QQuickMouseEvent) QML_DECLARE_TYPE(QQuickWheelEvent) QML_DECLARE_TYPE(QQuickCloseEvent) QML_DECLARE_TYPE(QQuickPointerDevice) -//QML_DECLARE_TYPE(QPointerUniqueId) +QML_DECLARE_TYPE(QPointingDeviceUniqueId) QML_DECLARE_TYPE(QQuickPointerEvent) #endif // QQUICKEVENTS_P_P_H -- cgit v1.2.3 From c66e69efa0b95b3c0220a4ec7e1f6ea72c8a160b Mon Sep 17 00:00:00 2001 From: Shawn Rutledge Date: Thu, 1 Dec 2016 13:05:26 +0100 Subject: change type of QQuickPointerDevice::uniqueId to QPointingDeviceUniqueId MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This will make it easier to change or extend further, in case some future device has some sort of unique serial number which does not fit in a quint64. Task-number: QTBUG-54616 Change-Id: I8f20b13d75b937fce6a66653476d0d25f2abf34b Reviewed-by: Jan Arve Sæther --- src/quick/items/qquickevents_p_p.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/quick/items/qquickevents_p_p.h b/src/quick/items/qquickevents_p_p.h index d25b61d62e..7b281623fe 100644 --- a/src/quick/items/qquickevents_p_p.h +++ b/src/quick/items/qquickevents_p_p.h @@ -450,7 +450,7 @@ class Q_QUICK_PRIVATE_EXPORT QQuickPointerDevice : public QObject Q_PROPERTY(int maximumTouchPoints READ maximumTouchPoints CONSTANT) Q_PROPERTY(int buttonCount READ buttonCount CONSTANT) Q_PROPERTY(QString name READ name CONSTANT) - Q_PROPERTY(qint64 uniqueId READ uniqueId CONSTANT) + Q_PROPERTY(QPointingDeviceUniqueId uniqueId READ uniqueId CONSTANT) public: enum DeviceType { @@ -497,7 +497,8 @@ public: QQuickPointerDevice(DeviceType devType, PointerType pType, Capabilities caps, int maxPoints, int buttonCount, const QString &name, qint64 uniqueId = 0) : m_deviceType(devType), m_pointerType(pType), m_capabilities(caps) - , m_maximumTouchPoints(maxPoints), m_buttonCount(buttonCount), m_name(name), m_uniqueId(uniqueId), m_event(nullptr) + , m_maximumTouchPoints(maxPoints), m_buttonCount(buttonCount), m_name(name) + , m_uniqueId(QPointingDeviceUniqueId::fromNumericId(uniqueId)), m_event(nullptr) { if (m_deviceType == Mouse) { m_event = new QQuickPointerMouseEvent; @@ -516,7 +517,7 @@ public: int maximumTouchPoints() const { return m_maximumTouchPoints; } int buttonCount() const { return m_buttonCount; } QString name() const { return m_name; } - qint64 uniqueId() const { return m_uniqueId; } + QPointingDeviceUniqueId uniqueId() const { return m_uniqueId; } QQuickPointerEvent *pointerEvent() const { return m_event; } static QQuickPointerDevice *touchDevice(QTouchDevice *d); @@ -531,7 +532,7 @@ private: int m_maximumTouchPoints; int m_buttonCount; QString m_name; - qint64 m_uniqueId; + QPointingDeviceUniqueId m_uniqueId; // the device-specific event instance which is reused during event delivery QQuickPointerEvent *m_event; -- cgit v1.2.3 From 884d06db09bc6179baa3add42ff4ef5f3cd0e523 Mon Sep 17 00:00:00 2001 From: Jani Heikkinen Date: Wed, 30 Nov 2016 13:58:46 +0200 Subject: Add changes file for 5.8.0 Change-Id: I29311143b04cdd4d6a13980ccb57b7867bcf9c53 Reviewed-by: Robin Burchell --- dist/changes-5.8.0 | 172 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 172 insertions(+) create mode 100644 dist/changes-5.8.0 diff --git a/dist/changes-5.8.0 b/dist/changes-5.8.0 new file mode 100644 index 0000000000..2fa4173c2e --- /dev/null +++ b/dist/changes-5.8.0 @@ -0,0 +1,172 @@ +Qt 5.8 introduces many new features and improvements as well as bugfixes +over the 5.7.x series. 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.8 series is binary compatible with the 5.7.x series. +Applications compiled for 5.7 will continue to run with 5.8. + +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. + +**************************************************************************** +* General * +**************************************************************************** + - [QTBUG-54982] Add qmlRegisterUncreatableMetaObject convenience function + needed to register Q_NAMESPACE QMetaObjects. + +**************************************************************************** +* Important Behavior Changes * +**************************************************************************** + + - [QTBUG-52012] When the engine looks for QML modules / extension + plugins in statically linked applications, the plugins are not + instantiated in the qml loader thread anymore. For this to work + however it is necessary for plugins to use + Q_PLUGIN_METADATA(IID_QQmlExtensionInterface_iid) in their class + declaration instead of hardcoding the interface id as a string literal. + + - A JS null value converted to a QVariant now has type + QMetaType::Nullptr rather than QMetaType::VoidStar. + + - To improve the start-up time and reduce memory consumption, the QML engine + attempts to cache the code and data structures generated during loading of + .qml and .js files. Cache files are - if possible - written to disk in the + directory next to the source file with the .qmlc/.jsc extension. If that + is not possible, they are written to QStandardPaths::CacheLocation. + + +**************************************************************************** +* Library * +**************************************************************************** + +QtQml +----- + + - [QTBUG-53412] Fix mapping of null JS values to null SQL values instead + of empty strings. + - [QTBUG-53794] Fix crash when using the "with" statement with an + expression that throws an exception. + - [QTBUG-54589] Fix assertion when deleting properties of JS objects + - [QTBUG-54360] Added exit(int retCode) method to the Qt global object. An + application can call Qt.exit to specify a return code of the engine. + - QQmlXMLHttpRequest: + * [QTBUG-38175] QQmlXMLHttpRequest now supports the PATCH method in HTTP + requests. + - Fix reading of enum properties from gadgets / value types when the + enum was registered with qRegisterMetaType(). + - Fixed support for using namespaces in property types, signal parameter names + and list types + - Fixed support for declaring default properties of type list + + +QtQuick +------- + + - QQuickWindow: + * The relevant child item is now sent a hover event when the window + receives a QEnterEvent, making sure hovering is recognized without + waiting for mouse movement. + - [QTBUG-50298] Added Qt.application.font property. + - QQuickWidget now properly repaints text on high-DPI screen changes. + - [QTBUG-54238] qt.scenegraph.info logging category got renamed to + qt.scenegraph.general. + - ShaderEffect with OpenGL now supports reading GLSL shader sources from + local files and from the resource system. Whenever a fragmentShader or + vertexShader property is a valid such URL, the value is treated as a + file specification instead of actual source code. + - The threaded scene graph renderer does not sleep up to one vsync + interval before the first frame anymore. + - [QTBUG-48723] Added properties to access color values for the HSV and + HSL color models to the basic QML color type. + - MouseArea no longer thinks it's pressed when it does not accept the + press event. When a press event is not accepted, MouseArea also no + longer receives a cancel event. + - Touch events are now delivered in a well defined order: New touch points + are delivered first to items under the finger which was first touching + the screen. Then to items that are under the second finger and finally + to common ancestors. This means that items that are "on top" will get a + chance to grab touch points before any items in the background. + - [QTBUG-39888] Fix crash with QQuickItems created via JavaScript being + garbage collected sometimes when they're not assigned to a window. + + - Drag: + * [QTBUG-37366] Added imageSource property to attached Drag object: this + allows drag sources to specify the pixmap to be drawn next to the + mouse cursor when starting a drag and drop operation. + + - Important Behavior Changes: + * [QTBUG-54133] QQuickWidget now follows the same behavior as + QQuickWindow when it comes to the persistent scenegraph setting + controlled by QQuickWindow::setPersistentSceneGraph(). In earlier + releases the setting was ignored and the scenegraph was torn down on + every hide event. This is not the case anymore. + * [QTBUG-54133] QQuickWidget now behaves identically to QOpenGLWidget + when it comes to handling window changes when reparenting the widget + into a hierarchy belonging to another top-level widget. Previously the + OpenGL context always got destroyed and recreated in order to ensure + texture resource sharing with the new top-level widget. From now on + this is only true when when AA_ShareOpenGLContexts it not set. + + - LayoutMirroring: + * [QTBUG-55517] Made it possible to attach LayoutMirroring to a Window. + + - MouseArea: + * [QTBUG-40475][QTBUG-42194][QTBUG-33982][QTBUG-42578][QTBUG-52537] + Hover state is now updated once per frame. This means that + MouseArea::containsMouse property will now be correct even if the + mouse is not moving, but items move under the cursor. Likewise the + mouse position properties and positionChanged signal will act as if + the mouse had moved. + + - QQuickItem: + * [QTBUG-31861] Fixed issue with mouse button events being sent even + when they were disabled by setAcceptedMouseButtons. + + - QQuickWindow: + * QQuickWindow::sendEvent() is deprecated. Use + QCoreApplication::sendEvent() directly instead. + + - ShaderEffect: + * Add new mesh type BorderImageMesh. BorderImageMesh provides an + optimized way to use BorderImage-type images with ShaderEffect. + + - Text: + * [QTBUG-52389] Fixed clipping of glyphs that extend beyond font's em + square. + * [QTBUG-54723] Fixed a performance regression when rendering a rich + text item with scaled images. + * [QTBUG-43133] Fixed placement of flowing text objects in the start of + a right-to-left block. + + + +QML Elements +------------ + + - Added a LoggingCategory type and added support for it to the console + object + + - Binding: + * Add delayed property to Binding as a way to avoid potentially expensive + or unexpected intermediate values. + + - Text, TextEdit, TextInput: + * Added "hintingPreference" property + + - Platform Specific Changes: + * [Windows][QTBUG-45321] Worked around an issue with fonts that have corrupt + cmap tables. + +QtTest +------ + + - TestCase: + * [QTBUG-19708] Added tryVerify() function to allow verification of + asynchronous conditions that can't be tested using tryCompare(). -- cgit v1.2.3