aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2018-02-17 14:00:49 +0100
committerQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2018-02-17 14:00:49 +0100
commit383ab3faad26f5dcaf56388315b2f9783b9f58ec (patch)
tree27fd0c95a6168544c141f447871f0595be22dcdb
parentcf142cd637620e2af6ede46c4f2cefe0206d6159 (diff)
parent97d1db53394077b5e5c159f5eb14af5e3ddb9158 (diff)
Merge remote-tracking branch 'origin/5.11' into dev
-rw-r--r--dist/changes-5.10.1109
-rw-r--r--src/qml/compiler/qv4codegen.cpp2
-rw-r--r--src/qml/jsruntime/qv4arraydata.cpp2
-rw-r--r--src/qml/jsruntime/qv4sparsearray.cpp1
-rw-r--r--src/qml/jsruntime/qv4sparsearray_p.h2
-rw-r--r--src/quick/items/qquickwindow.cpp7
-rw-r--r--tests/auto/cmake/CMakeLists.txt11
-rw-r--r--tests/auto/cmake/qtquickcompiler/CMakeLists.txt14
-rw-r--r--tests/auto/cmake/qtquickcompiler/main.cpp9
-rw-r--r--tests/auto/cmake/qtquickcompiler/main.qml4
-rw-r--r--tests/auto/cmake/qtquickcompiler/qqc_test.qrc6
-rw-r--r--tests/auto/quick/pointerhandlers/flickableinterop/tst_flickableinterop.cpp14
-rw-r--r--tools/qmlcachegen/Qt5QuickCompilerConfig.cmake73
-rw-r--r--tools/qmlcachegen/qmlcachegen.pro5
14 files changed, 254 insertions, 5 deletions
diff --git a/dist/changes-5.10.1 b/dist/changes-5.10.1
new file mode 100644
index 0000000000..cbd9869476
--- /dev/null
+++ b/dist/changes-5.10.1
@@ -0,0 +1,109 @@
+Qt 5.10.1 is a bug-fix release. It maintains both forward and backward
+compatibility (source and binary) with Qt 5.10.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.10 series is binary compatible with the 5.9.x series.
+Applications compiled for 5.9 will continue to run with 5.10.
+
+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.
+
+This release contains all fixes included in the Qt 5.9.4 release.
+
+****************************************************************************
+* Important Behavior Changes *
+****************************************************************************
+
+* A type that can be used for object declaration in QML must start with an
+ uppercase letter (this has always been the convention). Registration of
+ type names beginning with lowercase characters is now explicitly disallowed.
+
+****************************************************************************
+* Qt 5.10.1 Changes *
+****************************************************************************
+
+QtQml
+-----
+
+ - [QTBUG-65924] Fixed namespaced builds with -no-qml-debug
+ - [QTBUG-65624] Fixed a crash with simple qsTr() bindings on var properties
+ - [QTBUG-36773] A qmldir file can be provided via a custom schema
+ - [QTBUG-64798] Property alias syntax error no longer causes a crash
+ - [QTBUG-44153] Fixed a crash when a property alias points to a deleted object
+ - [QTBUG-47321][QTBUG-51995][QTBUG-60344] We now avoid temporarily invalid
+ bindings (such as "Cannot read property of null") while unloading a Loader
+ - [QTBUG-66067] Fixed a bug with negative-valued enum values in singletons
+
+ - QML profiler:
+ * [QTBUG-64674] Re-enabled QML memory profiling
+ * [QTBUG-65190] QML profiler tracks signals globally to prevent duplication
+
+ - Platform Specific Changes:
+ * Fixed compilation on QNX 7.0
+ * Enabled x86-64 JIT for QNX
+ * Enabled ARM64 JIT for QNX
+
+QtQuick
+-------
+
+ - [QTBUG-50992] Fixed bugs related to deferred property bindings to avoid
+ item view delegate objects being destroyed during incubation or failing
+ to be created. This fixes a lot of related bugs in QtQuick Controls 2.
+ - [QTBUG-64548][QTBUG-62990][QTBUG-64367] Shortcut works in QQuickWidget
+ and QQuickRenderControl scenes
+ - [QTBUG-65789] An Image with an SVG source uses the SVG renderer to do
+ animorphic scaling sharply
+ - [QTBUG-64616] Fixed a bug with TextInput validators allowing invalid characters
+ - [QTBUG-52944] When a Loader loads a Window, its transient parent will now
+ be set to the Loader's window (i.e. the window manager should place it on top).
+ - Improved support for compressed textures
+
+ - Software rendering:
+ * [QTBUG-62867] Fixed bad clipping caused by incorrect background coordinates
+
+ - Item Views:
+ * [QTBUG-49218] Fixed an off-by-one layout error in GridView
+ * [QTBUG-64311] Fixed the removal transition animation when the last item
+ of a GridView or ListView is removed
+
+ - Shapes:
+ * [QTBUG-64951] Some rendering performance improvements; added
+ qt.shape.time.sync logging category
+ * [QTBUG-65173] Shapes work correctly in static builds
+ * [QTBUG-63105] Invisible Shapes can be used with OpacityMask and other
+ Qt Graphical Effects
+
+ - Pointer Handlers:
+ * [QTBUG-64692] Pointer Handlers receive events in the reverse of
+ declaration order, just as Items receive events in top-down Z order
+ * [QTBUG-65003] TapHandler consistently emits the canceled signal when
+ its passive or exclusive grab is taken over by another handler or item
+ * [QTBUG-64848] One pinch gesture cannot pinch two PinchHandlers at the
+ same time; to that end, we now test the target item's bounds correctly
+ when delivering native gesture events from trackpads
+ * A Pointer Handler with only a passive grab cannot prevent delivery to
+ other handlers by accepting all the points in the pointer event.
+ This enables Handlers to cooperatively modify behavior of existing controls.
+ * TapHandler.gesturePolicy is now DragThreshold by default (rather than
+ ReleaseWithinBounds), because this makes it easier for a TapHandler to
+ add additional onTapped behavior to existing controls. The reason is
+ that the DragThreshold policy only requires a passive grab, not an exclusive
+ grab, so it doesn't interfere with the pre-existing event delivery.
+ * Fixed a bug with target item translation in DragHandler
+ * Added plugins.qmltyles so that syntax highlighting and completion work
+ in Qt Creator
+ * Various improvements in the tests/manual/pointer manual tests
+
+ - Platform Specific Changes:
+ * [QTBUG-61882][QTBUG-65519] Fixed rendering of emoji on macOS
+ * [QTBUG-65663] Fixed re-rendering of window when dragged to a screen
+ with a different devicePixelRatio on macOS
diff --git a/src/qml/compiler/qv4codegen.cpp b/src/qml/compiler/qv4codegen.cpp
index 677032bb2b..5f0d7395f7 100644
--- a/src/qml/compiler/qv4codegen.cpp
+++ b/src/qml/compiler/qv4codegen.cpp
@@ -202,6 +202,7 @@ Codegen::Reference Codegen::unop(UnaryOperation op, const Reference &expr)
} else {
// intentionally fall-through: the result is never used, so it's equivalent to
// "expr += 1", which is what a pre-increment does as well.
+ Q_FALLTHROUGH();
}
case PreIncrement: {
Reference e = expr.asLValue();
@@ -227,6 +228,7 @@ Codegen::Reference Codegen::unop(UnaryOperation op, const Reference &expr)
} else {
// intentionally fall-through: the result is never used, so it's equivalent to
// "expr -= 1", which is what a pre-decrement does as well.
+ Q_FALLTHROUGH();
}
case PreDecrement: {
Reference e = expr.asLValue();
diff --git a/src/qml/jsruntime/qv4arraydata.cpp b/src/qml/jsruntime/qv4arraydata.cpp
index 9b7251f3d0..5e971c8e9b 100644
--- a/src/qml/jsruntime/qv4arraydata.cpp
+++ b/src/qml/jsruntime/qv4arraydata.cpp
@@ -227,8 +227,8 @@ void ArrayData::realloc(Object *o, Type newType, uint requested, bool enforceAtt
sparse->values.values[i].setEmpty();
lastFree = &sparse->values.values[i].rawValueRef();
}
- storeValue(lastFree, UINT_MAX);
}
+ storeValue(lastFree, UINT_MAX);
Q_ASSERT(Value::fromReturnedValue(sparse->sparse->freeList).isEmpty());
// ### Could explicitly free the old data
diff --git a/src/qml/jsruntime/qv4sparsearray.cpp b/src/qml/jsruntime/qv4sparsearray.cpp
index b7be66bc31..f295e74adc 100644
--- a/src/qml/jsruntime/qv4sparsearray.cpp
+++ b/src/qml/jsruntime/qv4sparsearray.cpp
@@ -395,6 +395,7 @@ void SparseArray::freeTree(SparseArrayNode *root, int alignment)
SparseArray::SparseArray()
: numEntries(0)
{
+ freeList = Primitive::emptyValue(UINT_MAX).asReturnedValue();
header.p = 0;
header.left = 0;
header.right = 0;
diff --git a/src/qml/jsruntime/qv4sparsearray_p.h b/src/qml/jsruntime/qv4sparsearray_p.h
index 6dca1e1a34..ca6abcda89 100644
--- a/src/qml/jsruntime/qv4sparsearray_p.h
+++ b/src/qml/jsruntime/qv4sparsearray_p.h
@@ -151,7 +151,7 @@ struct Q_QML_EXPORT SparseArray
SparseArray(const SparseArray &other);
- ReturnedValue freeList = 0;
+ ReturnedValue freeList;
private:
SparseArray &operator=(const SparseArray &other);
diff --git a/src/quick/items/qquickwindow.cpp b/src/quick/items/qquickwindow.cpp
index 6fda6ab6c6..adf977fe9a 100644
--- a/src/quick/items/qquickwindow.cpp
+++ b/src/quick/items/qquickwindow.cpp
@@ -1764,6 +1764,8 @@ void QQuickWindowPrivate::deliverMouseEvent(QQuickPointerMouseEvent *pointerEven
QVector<QQuickItem *> targetItems = pointerTargets(contentItem, point->scenePosition(), false, false);
for (QQuickItem *item : targetItems) {
QQuickItemPrivate *itemPrivate = QQuickItemPrivate::get(item);
+ if (!itemPrivate->extra.isAllocated() || itemPrivate->extra->pointerHandlers.isEmpty())
+ continue;
pointerEvent->localize(item);
if (!sendFilteredPointerEvent(pointerEvent, item)) {
if (itemPrivate->handlePointerEvent(pointerEvent, true)) // avoid re-delivering to grabbers
@@ -2302,10 +2304,9 @@ void QQuickWindowPrivate::deliverPointerEvent(QQuickPointerEvent *event)
if (event->asPointerMouseEvent()) {
deliverMouseEvent(event->asPointerMouseEvent());
// failsafe: never allow any kind of grab to persist after release
- QQuickItem *grabber = q->mouseGrabberItem();
- if (event->isReleaseEvent() && event->buttons() == Qt::NoButton && grabber) {
+ if (event->isReleaseEvent() && event->buttons() == Qt::NoButton) {
event->clearGrabbers();
- sendUngrabEvent(grabber, false);
+ sendUngrabEvent(q->mouseGrabberItem(), false);
}
} else if (event->asPointerTouchEvent()) {
deliverTouchEvent(event->asPointerTouchEvent());
diff --git a/tests/auto/cmake/CMakeLists.txt b/tests/auto/cmake/CMakeLists.txt
index 4b9fbe75ac..4d4d8e3db7 100644
--- a/tests/auto/cmake/CMakeLists.txt
+++ b/tests/auto/cmake/CMakeLists.txt
@@ -15,3 +15,14 @@ test_module_includes(
)
expect_pass(test_plugins)
+
+add_test(qtquickcompiler ${CMAKE_CTEST_COMMAND}
+ --build-and-test
+ "${CMAKE_CURRENT_SOURCE_DIR}/qtquickcompiler/"
+ "${CMAKE_CURRENT_BINARY_DIR}/qtquickcompiler"
+ --build-config "${CMAKE_BUILD_TYPE}"
+ --build-generator ${CMAKE_GENERATOR}
+ --build-makeprogram ${CMAKE_MAKE_PROGRAM}
+ --build-project qqc_test
+ --build-options "-DCMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH}" ${BUILD_OPTIONS_LIST}
+)
diff --git a/tests/auto/cmake/qtquickcompiler/CMakeLists.txt b/tests/auto/cmake/qtquickcompiler/CMakeLists.txt
new file mode 100644
index 0000000000..6dee1e25dc
--- /dev/null
+++ b/tests/auto/cmake/qtquickcompiler/CMakeLists.txt
@@ -0,0 +1,14 @@
+
+cmake_minimum_required(VERSION 2.8)
+project(qqc_test)
+
+find_package(Qt5Qml 5.0.0 REQUIRED)
+find_package(Qt5Gui 5.0.0 REQUIRED)
+find_package(Qt5QuickCompiler)
+
+set(CMAKE_CXXFLAGS "${CMAKE_CXXFLAGS} ${Qt5Core_EXECUTABLE_COMPILE_FLAGS}")
+
+qtquick_compiler_add_resources(RESOURCES qqc_test.qrc)
+
+add_executable(qqc_test "${CMAKE_CURRENT_SOURCE_DIR}/main.cpp" ${RESOURCES})
+target_link_libraries(qqc_test Qt5::Gui Qt5::Qml)
diff --git a/tests/auto/cmake/qtquickcompiler/main.cpp b/tests/auto/cmake/qtquickcompiler/main.cpp
new file mode 100644
index 0000000000..47fc709c0a
--- /dev/null
+++ b/tests/auto/cmake/qtquickcompiler/main.cpp
@@ -0,0 +1,9 @@
+
+#include <QtGui>
+#include <QtQml>
+
+int main(int argc, char **argv)
+{
+ QGuiApplication app(argc, argv);
+ return app.exec();
+}
diff --git a/tests/auto/cmake/qtquickcompiler/main.qml b/tests/auto/cmake/qtquickcompiler/main.qml
new file mode 100644
index 0000000000..1f146d89c3
--- /dev/null
+++ b/tests/auto/cmake/qtquickcompiler/main.qml
@@ -0,0 +1,4 @@
+import QtQml 2.0
+QtObject {
+ property bool success: 42
+}
diff --git a/tests/auto/cmake/qtquickcompiler/qqc_test.qrc b/tests/auto/cmake/qtquickcompiler/qqc_test.qrc
new file mode 100644
index 0000000000..f128b7004b
--- /dev/null
+++ b/tests/auto/cmake/qtquickcompiler/qqc_test.qrc
@@ -0,0 +1,6 @@
+<!DOCTYPE RCC><RCC version="1.0">
+<qresource>
+<file>./main.qml</file>
+<file>./main.cpp</file>
+</qresource>
+</RCC>
diff --git a/tests/auto/quick/pointerhandlers/flickableinterop/tst_flickableinterop.cpp b/tests/auto/quick/pointerhandlers/flickableinterop/tst_flickableinterop.cpp
index 7862d72db8..c0b34f8246 100644
--- a/tests/auto/quick/pointerhandlers/flickableinterop/tst_flickableinterop.cpp
+++ b/tests/auto/quick/pointerhandlers/flickableinterop/tst_flickableinterop.cpp
@@ -544,6 +544,20 @@ void tst_FlickableInterop::mouseDragFlickableBehindItemWithHandlers()
QCOMPARE(originP1 + QPoint(3*dragThreshold, 0), p1);
}
QTest::mouseRelease(window, Qt::LeftButton, Qt::NoModifier, p1);
+ // wait until flickable stops
+ QTRY_COMPARE(flickable->isMoving(), false);
+
+ // After the mouse button has been released, move the mouse and ensure that nothing is moving
+ // because of that (this tests if all grabs are released when the mouse button is released).
+ p1 = rect->mapToScene(rect->clipRect().center()).toPoint();
+ originP1 = p1;
+ for (int i = 0; i < 3; ++i) {
+ p1 += QPoint(dragThreshold, 0);
+ QTest::mouseMove(window, p1);
+ QQuickTouchUtils::flush(window);
+ }
+ QCOMPARE(flickable->isMoving(), false);
+ QCOMPARE(originP1, rect->mapToScene(rect->clipRect().center()).toPoint());
}
QTEST_MAIN(tst_FlickableInterop)
diff --git a/tools/qmlcachegen/Qt5QuickCompilerConfig.cmake b/tools/qmlcachegen/Qt5QuickCompilerConfig.cmake
new file mode 100644
index 0000000000..6fe1662995
--- /dev/null
+++ b/tools/qmlcachegen/Qt5QuickCompilerConfig.cmake
@@ -0,0 +1,73 @@
+include(CMakeParseArguments)
+
+function(QTQUICK_COMPILER_DETERMINE_OUTPUT_FILENAME outvariable filename)
+ file(RELATIVE_PATH relpath ${CMAKE_CURRENT_SOURCE_DIR} ${filename})
+ string(REPLACE ".qml" "_qml" relpath ${relpath})
+ string(REPLACE ".js" "_js" relpath ${relpath})
+ string(REPLACE "/" "_" relpath ${relpath})
+ set(${outvariable} ${CMAKE_CURRENT_BINARY_DIR}/${relpath}.cpp PARENT_SCOPE)
+endfunction()
+
+function(QTQUICK_COMPILER_ADD_RESOURCES outfiles)
+ set(options)
+ set(oneValueArgs)
+ set(multiValueArgs OPTIONS)
+
+ cmake_parse_arguments(_RCC "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
+
+ find_package(Qt5 COMPONENTS Qml Core)
+
+ set(compiler_path "${_qt5Core_install_prefix}/bin/qmlcachegen")
+
+ get_target_property(rcc_path ${Qt5Core_RCC_EXECUTABLE} IMPORTED_LOCATION)
+
+ set(rcc_files ${_RCC_UNPARSED_ARGUMENTS})
+ set(rcc_options ${_RCC_OPTIONS})
+ set(filtered_rcc_files)
+ set(compiler_output)
+ set(rcc_files_with_compilation_units)
+ set(loader_flags)
+
+ foreach(_resource ${rcc_files})
+ get_filename_component(resource_base ${_resource} NAME_WE)
+ set(new_resource_file ${CMAKE_CURRENT_BINARY_DIR}/${resource_base}_qmlcache.qrc)
+
+ get_filename_component(input_resource ${_resource} ABSOLUTE)
+
+ execute_process(COMMAND ${compiler_path} -filter-resource-file ${input_resource} -o ${new_resource_file} OUTPUT_VARIABLE remaining_files)
+ if(remaining_files)
+ list(APPEND filtered_rcc_files ${new_resource_file})
+ list(APPEND loader_flags "--resource-file-mapping=${_resource}=${new_resource_file}")
+ else()
+ list(APPEND loader_flags "--resource-file-mapping=${_resource}")
+ endif()
+
+ set(rcc_file_with_compilation_units)
+
+ exec_program(${rcc_path} ARGS -list ${input_resource} OUTPUT_VARIABLE rcc_contents)
+ string(REGEX REPLACE "[\r\n]+" ";" rcc_contents ${rcc_contents})
+ foreach(it ${rcc_contents})
+ get_filename_component(extension ${it} EXT)
+ if("x${extension}" STREQUAL "x.qml" OR "x${extension}" STREQUAL "x.js" OR "x${extension}" STREQUAL "x.ui.qml")
+ qtquick_compiler_determine_output_filename(output_file ${it})
+ add_custom_command(OUTPUT ${output_file} COMMAND ${compiler_path} ARGS --resource=${input_resource} ${it} -o ${output_file} DEPENDS ${it})
+ list(APPEND compiler_output ${output_file})
+ set(rcc_file_with_compilation_units ${input_resource})
+ endif()
+ endforeach()
+
+ if(rcc_file_with_compilation_units)
+ list(APPEND rcc_files_with_compilation_units ${rcc_file_with_compilation_units})
+ endif()
+ endforeach()
+
+ if(rcc_files_with_compilation_units)
+ set(loader_source ${CMAKE_CURRENT_BINARY_DIR}/qmlcache_loader.cpp)
+ add_custom_command(OUTPUT ${loader_source} COMMAND ${compiler_path} ARGS ${loader_flags} ${rcc_files_with_compilation_units} -o ${loader_source} DEPENDS ${rcc_files_with_compilation_units})
+ list(APPEND compiler_output ${loader_source})
+ endif()
+
+ qt5_add_resources(output_resources ${filtered_rcc_files} OPTIONS ${options})
+ set(${outfiles} ${output_resources} ${compiler_output} PARENT_SCOPE)
+endfunction()
+
diff --git a/tools/qmlcachegen/qmlcachegen.pro b/tools/qmlcachegen/qmlcachegen.pro
index 1b76833b5a..391f0c3889 100644
--- a/tools/qmlcachegen/qmlcachegen.pro
+++ b/tools/qmlcachegen/qmlcachegen.pro
@@ -14,6 +14,11 @@ build_integration.path = $$[QT_HOST_DATA]/mkspecs/features
prefix_build: INSTALLS += build_integration
else: COPIES += build_integration
+cmake_build_integration.files = Qt5QuickCompilerConfig.cmake
+cmake_build_integration.path = $$[QT_INSTALL_LIBS]/cmake/Qt5QuickCompiler
+prefix_build: INSTALLS += cmake_build_integration
+else: COPIES += cmake_build_integration
+
QMAKE_TARGET_DESCRIPTION = QML Cache Generator
load(qt_tool)