diffstat of debian/ for qtdeclarative-opensource-src_5.10.1-2 qtdeclarative-opensource-src_5.11.0-0astra2 changelog | 44 control | 29 libqt5qml5.symbols | 2 libqt5quick5.symbols | 2 libqt5quickparticles5.symbols | 2 libqt5quicktest5.symbols | 2 libqt5quickwidgets5.symbols | 2 patches/5.11.1/0001-Use-Los-Angeles-to-represent-PST8PDT-not-Vancouver.patch | 49 patches/5.11.1/0002-Build-fix-for-no-feature-testlib.patch | 48 patches/5.11.1/0003-Make-QPacketProtocol-independent-of-Qml.patch | 413 +++ patches/5.11.1/0005-Make-QtQmlDebug-independent-of-QtQml.patch | 1214 ++++++++++ patches/5.11.1/0006-Use-different-buffer-for-indices-and-vertices-only-i.patch | 383 +++ patches/5.11.1/0007-Make-the-shared-test-code-independent-of-QtQml.patch | 310 ++ patches/5.11.1/0008-Fix-QQuickListViewPrivate-snapItemAt-for-lists-with-.patch | 130 + patches/5.11.1/0009-Make-the-test-pass-on-my-high-resolution-screen.patch | 27 patches/5.11.1/0010-Add-handling-of-device-pixel-ratio-to-animated-sprit.patch | 275 ++ patches/5.11.1/0011-Enable-JIT-on-INTEGRITY-ARM64.patch | 151 + patches/5.11.1/0012-Fix-JIT-build-on-INTEGRITY-ARM64.patch | 560 ++++ patches/5.11.1/0013-Clarify-ownership-around-QQmlEngine-setNAMF.patch | 48 patches/5.11.1/0014-Fix-crash-when-using-drag-with-Drag.Automatic.patch | 72 patches/5.11.1/0015-QQmlDelegateModel-provide-better-warnings.patch | 51 patches/5.11.1/0016-Normalize-URL-before-loading-types.patch | 169 + patches/5.11.1/0017-Fix-qmlInfo-and-friends-for-anonymous-components.patch | 83 patches/5.11.1/0018-QQmlDelegateModel-include-QQDMIncubationTask-errors-.patch | 53 patches/5.11.1/0019-Add-We-mean-it-to-qqmlprofilerclientdefinitions_p.h.patch | 36 patches/5.11.1/0021-Tests-Silence-Clang-warnings.patch | 93 patches/5.11.1/0022-Doc-add-Best-Practices-for-QML-and-Qt-Quick-to-best-.patch | 29 patches/5.11.1/0023-Fix-QML-context-leak-with-visual-data-model-and-list.patch | 113 patches/5.11.1/0024-QQuickItem-Guard-against-null-deref-in-transformatio.patch | 98 patches/5.11.1/0025-Fix-Hidpi-BorderImage-in-software-renderer.patch | 66 patches/5.11.1/0027-Fix-loading-of-composite-singletons-from-resources.patch | 158 + patches/5.11.1/0028-Fix-crash-when-changing-the-source-of-AnimatedImage-.patch | 118 patches/5.11.1/0030-Fix-build-without-features.xmlstreamwriter.patch | 27 patches/5.11.1/0031-Fix-build-without-features.quick-path.patch | 27 patches/5.11.1/0032-Fix-build-without-features.quick-shadereffect.patch | 27 patches/5.11.1/0033-Fix-build-without-features.timezone.patch | 28 patches/5.11.1/0034-Fix-.import-within-.js-files-with-CONFIG-qtquickcomp.patch | 216 + patches/5.11.1/0035-Fix-bug-where-Ungrab-event-was-not-sent.patch | 110 patches/5.11.1/0036-Fix-TestCaseCollector-fails-to-initialize-component-.patch | 45 patches/5.11.1/0037-MouseArea-set-pressed-state-to-Qt-NoButton-not-nullp.patch | 30 patches/5.11.1/0038-Fix-build-without-features.gestures.patch | 239 + patches/5.11.1/0039-Fix-for-input-method-commit-that-ends-with-newline.patch | 54 patches/5.11.1/0040-Pass-the-arguments-correctly-to-QRadialGradient.patch | 32 patches/5.11.1/0041-setGrabberItem-consistently-call-touchUngrabEvent-or.patch | 68 patches/5.11.1/0043-Doc-link-to-integration-flowchart-in-Interacting-wit.patch | 35 patches/5.11.1/0044-Ensure-we-restore-QML-defined-enums.patch | 107 patches/5.11.1/0045-Fix-crash-when-modifying-objects-used-as-prototypes.patch | 75 patches/5.11.1/0046-Fix-crash-when-incubating-objects-with-non-existent-.patch | 117 patches/5.11.1/0047-Fix-change-of-sign-warning.patch | 33 patches/5.11.1/0048-On-network-redirects-update-finalUrl-not-url.patch | 202 + patches/5.11.1/0049-V4-debugger-Allow-retrieval-of-non-CallContext-scope.patch | 251 ++ patches/5.11.1/0052-Fix-crash-when-modifying-list-model-in-worker-thread.patch | 53 patches/5.11.1/0053-Fix-build-for-Android-with-android-clang.patch | 40 patches/5.11.1/0054-QML-Debugger-Don-t-crash-when-encoding-JSON-data.patch | 211 + patches/5.11.1/0055-Remove-old-pre-QFileSystemEngine-rewrite-code.patch | 41 patches/5.11.1/0056-Fix-a-crash-in-the-modulus-operation.patch | 61 patches/5.11.1/0057-Formals-come-after-locals-in-the-CallContext.patch | 98 patches/5.11.1/0058-V4-Set-argumentsCanEscape-when-debugging.patch | 72 patches/5.11.1/0060-Fix-subrect-of-mismatched-dpr-sprite-image.patch | 56 patches/5.11.1/0064-Tooling-Fix-integer-range-checks.patch | 80 patches/disableopengltests.patch | 2 patches/rbt-autload-translations.patch | 31 patches/rbt-disable-user-qml-caches-by-default.patch | 28 patches/rbt-fix-crash-on-vivante.patch | 25 patches/rbt-jsc-loading.patch | 18 patches/rbt-qmlc-only-support.patch | 45 patches/rbt-qmlc-resources-and-save.patch | 71 patches/rbt-qmlc-tr.patch | 15 patches/rbt-settings-filename.patch | 217 + patches/series | 69 qml-module-qt-labs-sharedimage.install | 1 qtdeclarative5-dev.install | 2 rules | 10 73 files changed, 7754 insertions(+), 45 deletions(-) diff -Nru qtdeclarative-opensource-src-5.10.1/debian/changelog qtdeclarative-opensource-src-5.11.0/debian/changelog --- qtdeclarative-opensource-src-5.10.1/debian/changelog 2018-02-20 14:37:32.000000000 +0000 +++ qtdeclarative-opensource-src-5.11.0/debian/changelog 2018-06-18 10:57:26.000000000 +0000 @@ -1,3 +1,47 @@ +qtdeclarative-opensource-src (5.11.0-0astra2) unstable; urgency=medium + + * Apply backported patches + + -- Alexander Volkov Mon, 18 Jun 2018 13:57:26 +0300 + +qtdeclarative-opensource-src (5.11.0-0astra1) unstable; urgency=medium + + * New upstream release + * Bump ABI to 5-11-0 (control + *.symbols) + * Disable patches: + - fix_test_remove_qlibraryinfo.patch + - Do-not-make-lack-of-SSE2-support-on-x86-32-fatal.patch + - disable_jit_on_mips.patch + * Remove 0001-FolderListModel-add-status-property.patch + (applied in upstream) + * rules: dh_missing -> dh_install + * Update install files + + -- Alexander Volkov Mon, 21 May 2018 13:58:05 +0300 + +qtdeclarative-opensource-src (5.10.1-2astra2) unstable; urgency=medium + + * Apply rbt-settings-filename.patch from YatmanovDA + + -- Alexander Volkov Mon, 02 Apr 2018 14:45:47 +0300 + +qtdeclarative-opensource-src (5.10.1-2astra1) unstable; urgency=medium + + * Remove Build-Depends-Indep + * Remove doc packages + * rules: Don't build docs (remove indep targets) + * debhelper (>= 10) instead of (>= 10.9.2~) + * Apply rbt patches: + - rbt-fix-crash-on-vivante.patch + - rbt-qmlc-resources-and-save.patch + - rbt-qmlc-only-support.patch + - rbt-qmlc-tr.patch + - rbt-autload-translations.patch + - rbt-disable-user-qml-caches-by-default.patch + - 0001-FolderListModel-add-status-property.patch + + -- Alexander Volkov Wed, 21 Feb 2018 15:59:48 +0300 + qtdeclarative-opensource-src (5.10.1-2) experimental; urgency=medium * Make qml-module-qttest depend on qml-module-qtquick-window2, diff -Nru qtdeclarative-opensource-src-5.10.1/debian/control qtdeclarative-opensource-src-5.11.0/debian/control --- qtdeclarative-opensource-src-5.10.1/debian/control 2018-02-20 14:37:32.000000000 +0000 +++ qtdeclarative-opensource-src-5.11.0/debian/control 2018-05-21 10:58:05.000000000 +0000 @@ -8,7 +8,7 @@ Timo Jyrinki , Dmitry Shachnev , Simon Quigley -Build-Depends: debhelper (>= 10.9.2~), +Build-Depends: debhelper (>= 10), dpkg-dev (>= 1.17.14), libgl1-mesa-dri, libqt5opengl5-dev (>= 5.10.1+dfsg~), @@ -18,15 +18,13 @@ qtbase5-private-dev (>= 5.10.1+dfsg~), xauth, xvfb -Build-Depends-Indep: qtbase5-doc-html (>= 5.10.1+dfsg~) , - qttools5-dev-tools (>= 5.10.1~) Standards-Version: 4.1.3 Homepage: http://qt-project.org/ Vcs-Git: https://salsa.debian.org/qt-kde-team/qt/qtdeclarative.git Vcs-Browser: https://salsa.debian.org/qt-kde-team/qt/qtdeclarative Package: libqt5qml5 -Provides: qtdeclarative-abi-5-10-1 +Provides: qtdeclarative-abi-5-11-0 Architecture: any Multi-Arch: same Pre-Depends: ${misc:Pre-Depends} @@ -353,26 +351,3 @@ is its rich set of widgets that provide standard GUI functionality. . This package contains Qt 5 declarative examples. - -Package: qtdeclarative5-doc -Build-Profiles: -Architecture: all -Section: doc -Depends: ${misc:Depends} -Description: Qt 5 declarative documentation - Qt is a cross-platform C++ application framework. Qt's primary feature - is its rich set of widgets that provide standard GUI functionality. - . - This package contains the documentation for the Qt 5 declarative libraries. - -Package: qtdeclarative5-doc-html -Build-Profiles: -Architecture: all -Section: doc -Depends: ${misc:Depends} -Description: Qt 5 declarative HTML documentation - Qt is a cross-platform C++ application framework. Qt's primary feature - is its rich set of widgets that provide standard GUI functionality. - . - This package contains the HTML documentation for the Qt 5 declarative - libraries. diff -Nru qtdeclarative-opensource-src-5.10.1/debian/libqt5qml5.symbols qtdeclarative-opensource-src-5.11.0/debian/libqt5qml5.symbols --- qtdeclarative-opensource-src-5.10.1/debian/libqt5qml5.symbols 2018-02-20 14:37:32.000000000 +0000 +++ qtdeclarative-opensource-src-5.11.0/debian/libqt5qml5.symbols 2018-05-21 10:58:05.000000000 +0000 @@ -1,6 +1,6 @@ # SymbolsHelper-Confirmed: 5.10.1 amd64 armel armhf i386 mips mipsel ppc64 ppc64el s390x sh4 libQt5Qml.so.5 libqt5qml5 #MINVER# -| libqt5qml5 #MINVER#, qtdeclarative-abi-5-10-1 +| libqt5qml5 #MINVER#, qtdeclarative-abi-5-11-0 Qt_5.0@Qt_5.0 5.6.0~beta Qt_5.10@Qt_5.10 5.10.0 Qt_5.1@Qt_5.1 5.6.0~beta diff -Nru qtdeclarative-opensource-src-5.10.1/debian/libqt5quick5.symbols qtdeclarative-opensource-src-5.11.0/debian/libqt5quick5.symbols --- qtdeclarative-opensource-src-5.10.1/debian/libqt5quick5.symbols 2018-02-20 14:37:32.000000000 +0000 +++ qtdeclarative-opensource-src-5.11.0/debian/libqt5quick5.symbols 2018-05-21 10:58:05.000000000 +0000 @@ -1,6 +1,6 @@ # SymbolsHelper-Confirmed: 5.10.1 amd64 libQt5Quick.so.5 libqt5quick5 #MINVER# -| libqt5quick5 #MINVER#, qtdeclarative-abi-5-10-1 +| libqt5quick5 #MINVER#, qtdeclarative-abi-5-11-0 Qt_5.0@Qt_5.0 5.6.0~beta Qt_5.10@Qt_5.10 5.10.0 Qt_5.1@Qt_5.1 5.6.0~beta diff -Nru qtdeclarative-opensource-src-5.10.1/debian/libqt5quickparticles5.symbols qtdeclarative-opensource-src-5.11.0/debian/libqt5quickparticles5.symbols --- qtdeclarative-opensource-src-5.10.1/debian/libqt5quickparticles5.symbols 2018-02-20 14:37:32.000000000 +0000 +++ qtdeclarative-opensource-src-5.11.0/debian/libqt5quickparticles5.symbols 2018-05-21 10:58:05.000000000 +0000 @@ -1,6 +1,6 @@ # SymbolsHelper-Confirmed: 5.10.0 amd64 i386 libQt5QuickParticles.so.5 libqt5quickparticles5 #MINVER# -| libqt5quickparticles5 #MINVER#, qtdeclarative-abi-5-10-1 +| libqt5quickparticles5 #MINVER#, qtdeclarative-abi-5-11-0 Qt_5_PRIVATE_API@Qt_5_PRIVATE_API 5.6.0~beta 1 _ZN18QQuickParticleData10extendLifeEfP20QQuickParticleSystem@Qt_5_PRIVATE_API 5.7.0 1 _ZN18QQuickParticleData5cloneERKS_@Qt_5_PRIVATE_API 5.7.0 1 diff -Nru qtdeclarative-opensource-src-5.10.1/debian/libqt5quicktest5.symbols qtdeclarative-opensource-src-5.11.0/debian/libqt5quicktest5.symbols --- qtdeclarative-opensource-src-5.10.1/debian/libqt5quicktest5.symbols 2018-02-20 14:37:32.000000000 +0000 +++ qtdeclarative-opensource-src-5.11.0/debian/libqt5quicktest5.symbols 2018-05-21 10:58:05.000000000 +0000 @@ -1,6 +1,6 @@ # SymbolsHelper-Confirmed: 5.10.0 amd64 i386 libQt5QuickTest.so.5 libqt5quicktest5 #MINVER# -| libqt5quicktest5 #MINVER#, qtdeclarative-abi-5-10-1 +| libqt5quicktest5 #MINVER#, qtdeclarative-abi-5-11-0 Qt_5.0@Qt_5.0 5.6.0~beta Qt_5.10@Qt_5.10 5.10.0 Qt_5.1@Qt_5.1 5.6.0~beta diff -Nru qtdeclarative-opensource-src-5.10.1/debian/libqt5quickwidgets5.symbols qtdeclarative-opensource-src-5.11.0/debian/libqt5quickwidgets5.symbols --- qtdeclarative-opensource-src-5.10.1/debian/libqt5quickwidgets5.symbols 2018-02-20 14:37:32.000000000 +0000 +++ qtdeclarative-opensource-src-5.11.0/debian/libqt5quickwidgets5.symbols 2018-05-21 10:58:05.000000000 +0000 @@ -1,6 +1,6 @@ # SymbolsHelper-Confirmed: 5.10.0 amd64 i386 libQt5QuickWidgets.so.5 libqt5quickwidgets5 #MINVER# -| libqt5quickwidgets5 #MINVER#, qtdeclarative-abi-5-10-1 +| libqt5quickwidgets5 #MINVER#, qtdeclarative-abi-5-11-0 Qt_5.0@Qt_5.0 5.6.0~beta Qt_5.10@Qt_5.10 5.10.0 Qt_5.1@Qt_5.1 5.6.0~beta diff -Nru qtdeclarative-opensource-src-5.10.1/debian/patches/5.11.1/0001-Use-Los-Angeles-to-represent-PST8PDT-not-Vancouver.patch qtdeclarative-opensource-src-5.11.0/debian/patches/5.11.1/0001-Use-Los-Angeles-to-represent-PST8PDT-not-Vancouver.patch --- qtdeclarative-opensource-src-5.10.1/debian/patches/5.11.1/0001-Use-Los-Angeles-to-represent-PST8PDT-not-Vancouver.patch 1970-01-01 00:00:00.000000000 +0000 +++ qtdeclarative-opensource-src-5.11.0/debian/patches/5.11.1/0001-Use-Los-Angeles-to-represent-PST8PDT-not-Vancouver.patch 2018-06-18 10:48:22.000000000 +0000 @@ -0,0 +1,49 @@ +From fb20d2f7b149725b0fcc8e5bbb377cd6dababc9b Mon Sep 17 00:00:00 2001 +From: Edward Welbourne +Date: Thu, 19 Apr 2018 18:29:30 +0200 +Subject: [PATCH 01/65] Use Los Angeles to represent PST8PDT, not Vancouver + +This amends commit 2b8b7a162be52f8cd6c2bc39f498a1ddfb59dd68. + +The very last test (15.9.5.43-0-8) in the ES test-suite relies on +constructing a time *just* outside the valid range, to provoke (and +check it gets) a RangeError. However, it uses the current time-zone +offset in computing this; and the local time -> UTC conversion in the +Date constructor uses the zone information for the zone at the given +time. The TZ db uses each zone's local mean solar time for the period +before a formal zone was introduced; and Vancouver is further West +than the nominal meridian for its zone. The test code throws in an +hour's correction in case it's run in daylight-saving time, which +would put the test time, when run during standard time, an hour (and a +millisecond, rather than just the millisecond) outside the valid Date +range, so as to ensure it's still a ms outside when the test is run +during DST. However, the 12m28s mean solar offset overcomes the 1ms +and puts the time back in range durign DST (but still 47m32.001s +outside during standard time, which is why this problem only surfaced +when North America entered summer time). Fortunately, Los Angeles is +further East than the meridian in question, and uses the same zone. + +Task-number: QTBUG-67010 +Change-Id: I58fd7bf14366ebe5842b8abd7e6802c9c78ca27e +Reviewed-by: Lars Knoll +Reviewed-by: Simon Hausmann +--- + tests/auto/qml/ecmascripttests/test262.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/tests/auto/qml/ecmascripttests/test262.py b/tests/auto/qml/ecmascripttests/test262.py +index ae4c54df9..e055c7a8e 100755 +--- a/tests/auto/qml/ecmascripttests/test262.py ++++ b/tests/auto/qml/ecmascripttests/test262.py +@@ -555,7 +555,7 @@ def Main(): + # Uncomment the next line for more logging info. + #logging.basicConfig(level=logging.DEBUG) + # Some date tests rely on being run in pacific time and the USA's locale: +- os.environ["TZ"] = "America/Vancouver" ++ os.environ["TZ"] = "America/Los_Angeles" # it *matters* that this is (7m8s) *East* of PST's nominal meridian ! + os.environ["LANG"] = "en_US.UTF-8" + os.environ["LC_TIME"] = "en_US.UTF-8" + parser = BuildOptions() +-- +2.17.0 + diff -Nru qtdeclarative-opensource-src-5.10.1/debian/patches/5.11.1/0002-Build-fix-for-no-feature-testlib.patch qtdeclarative-opensource-src-5.11.0/debian/patches/5.11.1/0002-Build-fix-for-no-feature-testlib.patch --- qtdeclarative-opensource-src-5.10.1/debian/patches/5.11.1/0002-Build-fix-for-no-feature-testlib.patch 1970-01-01 00:00:00.000000000 +0000 +++ qtdeclarative-opensource-src-5.11.0/debian/patches/5.11.1/0002-Build-fix-for-no-feature-testlib.patch 2018-06-18 10:48:22.000000000 +0000 @@ -0,0 +1,48 @@ +From 8f1ba6faffc921842c6c97e18941852f3acef0af Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Pasi=20Pet=C3=A4j=C3=A4j=C3=A4rvi?= +Date: Mon, 12 Feb 2018 13:22:57 +0200 +Subject: [PATCH 02/65] Build fix for -no-feature-testlib + +Task-number: QTBUG-66609 +Change-Id: I6d96b14299f7d764414f6482b7b9b003611d8344 +Reviewed-by: Oswald Buddenhagen +--- + src/imports/imports.pro | 4 ++-- + src/src.pro | 4 ++-- + 2 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/src/imports/imports.pro b/src/imports/imports.pro +index 5d7e43488..56975a89f 100644 +--- a/src/imports/imports.pro ++++ b/src/imports/imports.pro +@@ -17,9 +17,9 @@ qtHaveModule(quick) { + handlers \ + layouts \ + qtquick2 \ +- window \ +- testlib ++ window + ++ qtHaveModule(testlib): SUBDIRS += testlib + qtConfig(systemsemaphore): SUBDIRS += sharedimage + qtConfig(quick-particles): \ + SUBDIRS += particles +diff --git a/src/src.pro b/src/src.pro +index ff0e1e99b..5177dfc74 100644 +--- a/src/src.pro ++++ b/src/src.pro +@@ -8,9 +8,9 @@ SUBDIRS += \ + + qtHaveModule(gui):qtConfig(animation) { + SUBDIRS += \ +- quick \ +- qmltest ++ quick + ++ qtConfig(testlib): SUBDIRS += qmltest + qtConfig(quick-particles): \ + SUBDIRS += particles + qtHaveModule(widgets): SUBDIRS += quickwidgets +-- +2.17.0 + diff -Nru qtdeclarative-opensource-src-5.10.1/debian/patches/5.11.1/0003-Make-QPacketProtocol-independent-of-Qml.patch qtdeclarative-opensource-src-5.11.0/debian/patches/5.11.1/0003-Make-QPacketProtocol-independent-of-Qml.patch --- qtdeclarative-opensource-src-5.10.1/debian/patches/5.11.1/0003-Make-QPacketProtocol-independent-of-Qml.patch 1970-01-01 00:00:00.000000000 +0000 +++ qtdeclarative-opensource-src-5.11.0/debian/patches/5.11.1/0003-Make-QPacketProtocol-independent-of-Qml.patch 2018-06-18 10:57:26.000000000 +0000 @@ -0,0 +1,413 @@ +From 15202d33cdb2874c185d2307fa9a5c0b47c55711 Mon Sep 17 00:00:00 2001 +From: Ulf Hermann +Date: Mon, 23 Apr 2018 10:50:09 +0200 +Subject: [PATCH 03/65] Make QPacketProtocol independent of Qml + +Just because we need a data stream version for QQmlDebugPacket, we don't +need to add such a huge dependency. Using a template here adds some +boiler plate to all users of QQmlDebugPacket, but this is worth it. + +Task-number: QTBUG-60996 +Change-Id: Ibade8757e28ac772942129c22c8721b504da3aee +Reviewed-by: Simon Hausmann +--- + .../packetprotocol/packetprotocol.pro | 4 ++-- + ...qmldebugpacket_p.h => qversionedpacket_p.h} | 18 ++++++++---------- + .../qmldbg_debugger/qqmlenginedebugservice.cpp | 5 ++++- + .../qmldbg_debugger/qv4debugservice.cpp | 4 +++- + .../qmldbg_inspector/globalinspector.cpp | 5 ++++- + .../qmldbg_messages/qdebugmessageservice.cpp | 4 +++- + .../qmldbg_native/qqmlnativedebugconnector.cpp | 2 +- + .../qqmlnativedebugservice.cpp | 4 +++- + .../qqmlenginecontrolservice.cpp | 5 ++++- + .../qmldbg_profiler/qqmlprofileradapter.cpp | 2 +- + .../qmldbg_profiler/qqmlprofilerservice.cpp | 1 - + .../qmldbg_profiler/qqmlprofilerservice.h | 3 +++ + .../qmldbg_profiler/qv4profileradapter.h | 3 ++- + .../qquickprofileradapter.cpp | 5 ++++- + .../qmldbg_server/qqmldebugserver.cpp | 3 ++- + 15 files changed, 44 insertions(+), 24 deletions(-) + rename src/plugins/qmltooling/packetprotocol/{qqmldebugpacket_p.h => qversionedpacket_p.h} (83%) + +--- a/src/plugins/qmltooling/packetprotocol/packetprotocol.pro ++++ b/src/plugins/qmltooling/packetprotocol/packetprotocol.pro +@@ -1,11 +1,11 @@ + TARGET = QtPacketProtocol +-QT = core-private qml-private ++QT = core-private + CONFIG += static internal_module + + HEADERS = \ + qpacketprotocol_p.h \ + qpacket_p.h \ +- qqmldebugpacket_p.h ++ qversionedpacket_p.h + + SOURCES = \ + qpacketprotocol.cpp \ +--- a/src/plugins/qmltooling/packetprotocol/qqmldebugpacket_p.h ++++ /dev/null +@@ -1,71 +0,0 @@ +-/**************************************************************************** +-** +-** Copyright (C) 2016 The Qt Company Ltd. +-** Contact: https://www.qt.io/licensing/ +-** +-** This file is part of the QtQml module 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 The Qt Company. For licensing terms +-** and conditions see https://www.qt.io/terms-conditions. For further +-** information use the contact form at https://www.qt.io/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 3 as published by the Free Software +-** Foundation and appearing in the file LICENSE.LGPL3 included in the +-** packaging of this file. Please review the following information to +-** ensure the GNU Lesser General Public License version 3 requirements +-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. +-** +-** GNU General Public License Usage +-** Alternatively, this file may be used under the terms of the GNU +-** General Public License version 2.0 or (at your option) the GNU General +-** Public license version 3 or any later version approved by the KDE Free +-** Qt Foundation. The licenses are as published by the Free Software +-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 +-** included in the packaging of this file. Please review the following +-** information to ensure the GNU General Public License requirements will +-** be met: https://www.gnu.org/licenses/gpl-2.0.html and +-** https://www.gnu.org/licenses/gpl-3.0.html. +-** +-** $QT_END_LICENSE$ +-** +-****************************************************************************/ +- +-#ifndef QQMLDEBUGPACKET_P_H +-#define QQMLDEBUGPACKET_P_H +- +-#include "qpacket_p.h" +- +-#include +-#include +- +-// +-// W A R N I N G +-// ------------- +-// +-// This file is not part of the Qt API. It exists purely as an +-// implementation detail. This header file may change from version to +-// version without notice, or even be removed. +-// +-// We mean it. +-// +- +-QT_BEGIN_NAMESPACE +- +-// QPacket with a fixed data stream version, centrally set by QQmlDebugServer +-class QQmlDebugPacket : public QPacket +-{ +-public: +- QQmlDebugPacket() : QPacket(QQmlDebugConnector::dataStreamVersion()) {} +- QQmlDebugPacket(const QByteArray &ba) : QPacket(QQmlDebugConnector::dataStreamVersion(), ba) {} +-}; +- +-QT_END_NAMESPACE +- +-#endif // QQMLDEBUGPACKET_P_H +--- /dev/null ++++ b/src/plugins/qmltooling/packetprotocol/qversionedpacket_p.h +@@ -0,0 +1,69 @@ ++/**************************************************************************** ++** ++** Copyright (C) 2016 The Qt Company Ltd. ++** Contact: https://www.qt.io/licensing/ ++** ++** This file is part of the QtQml module 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 The Qt Company. For licensing terms ++** and conditions see https://www.qt.io/terms-conditions. For further ++** information use the contact form at https://www.qt.io/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 3 as published by the Free Software ++** Foundation and appearing in the file LICENSE.LGPL3 included in the ++** packaging of this file. Please review the following information to ++** ensure the GNU Lesser General Public License version 3 requirements ++** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. ++** ++** GNU General Public License Usage ++** Alternatively, this file may be used under the terms of the GNU ++** General Public License version 2.0 or (at your option) the GNU General ++** Public license version 3 or any later version approved by the KDE Free ++** Qt Foundation. The licenses are as published by the Free Software ++** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 ++** included in the packaging of this file. Please review the following ++** information to ensure the GNU General Public License requirements will ++** be met: https://www.gnu.org/licenses/gpl-2.0.html and ++** https://www.gnu.org/licenses/gpl-3.0.html. ++** ++** $QT_END_LICENSE$ ++** ++****************************************************************************/ ++ ++#ifndef QVERSIONEDPACKET_P_H ++#define QVERSIONEDPACKET_P_H ++ ++#include "qpacket_p.h" ++ ++// ++// W A R N I N G ++// ------------- ++// ++// This file is not part of the Qt API. It exists purely as an ++// implementation detail. This header file may change from version to ++// version without notice, or even be removed. ++// ++// We mean it. ++// ++ ++QT_BEGIN_NAMESPACE ++ ++// QPacket with a fixed data stream version, centrally set by some Connector ++template ++class QVersionedPacket : public QPacket ++{ ++public: ++ QVersionedPacket(const QByteArray &ba) : QPacket(Connector::dataStreamVersion(), ba) {} ++ QVersionedPacket() : QPacket(Connector::dataStreamVersion()) {} ++}; ++ ++QT_END_NAMESPACE ++ ++#endif // QVERSIONEDPACKET_P_H +--- a/src/plugins/qmltooling/qmldbg_debugger/qqmlenginedebugservice.cpp ++++ b/src/plugins/qmltooling/qmldbg_debugger/qqmlenginedebugservice.cpp +@@ -56,10 +56,13 @@ + #include + #include + #include +-#include ++#include ++#include + + QT_BEGIN_NAMESPACE + ++using QQmlDebugPacket = QVersionedPacket; ++ + QQmlEngineDebugServiceImpl::QQmlEngineDebugServiceImpl(QObject *parent) : + QQmlEngineDebugService(2, parent), m_watch(new QQmlWatcher(this)), m_statesDelegate(nullptr) + { +--- a/src/plugins/qmltooling/qmldbg_debugger/qv4debugservice.cpp ++++ b/src/plugins/qmltooling/qmldbg_debugger/qv4debugservice.cpp +@@ -45,7 +45,7 @@ + #include + #include + #include +-#include ++#include + + #include + #include +@@ -70,6 +70,8 @@ + class V8CommandHandler; + class UnknownV8CommandHandler; + ++using QQmlDebugPacket = QVersionedPacket; ++ + int QV4DebugServiceImpl::sequence = 0; + + class V8CommandHandler +--- a/src/plugins/qmltooling/qmldbg_inspector/globalinspector.cpp ++++ b/src/plugins/qmltooling/qmldbg_inspector/globalinspector.cpp +@@ -44,7 +44,8 @@ + #include + #include + #include +-#include ++#include ++#include + + #include + +@@ -63,6 +64,8 @@ + + QT_BEGIN_NAMESPACE + ++using QQmlDebugPacket = QVersionedPacket; ++ + const char REQUEST[] = "request"; + const char RESPONSE[] = "response"; + const char EVENT[] = "event"; +--- a/src/plugins/qmltooling/qmldbg_messages/qdebugmessageservice.cpp ++++ b/src/plugins/qmltooling/qmldbg_messages/qdebugmessageservice.cpp +@@ -40,10 +40,12 @@ + #include "qdebugmessageservice.h" + + #include +-#include ++#include + + QT_BEGIN_NAMESPACE + ++using QQmlDebugPacket = QVersionedPacket; ++ + void DebugMessageHandler(QtMsgType type, const QMessageLogContext &ctxt, + const QString &buf) + { +--- a/src/plugins/qmltooling/qmldbg_native/qqmlnativedebugconnector.cpp ++++ b/src/plugins/qmltooling/qmldbg_native/qqmlnativedebugconnector.cpp +@@ -40,7 +40,7 @@ + #include "qqmlnativedebugconnector.h" + + #include +-#include ++#include + + #include + #include +--- a/src/plugins/qmltooling/qmldbg_nativedebugger/qqmlnativedebugservice.cpp ++++ b/src/plugins/qmltooling/qmldbg_nativedebugger/qqmlnativedebugservice.cpp +@@ -49,7 +49,7 @@ + #include + #include + #include +-#include ++#include + #include + + #include +@@ -65,6 +65,8 @@ + + QT_BEGIN_NAMESPACE + ++using QQmlDebugPacket = QVersionedPacket; ++ + class BreakPoint + { + public: +--- a/src/plugins/qmltooling/qmldbg_profiler/qqmlenginecontrolservice.cpp ++++ b/src/plugins/qmltooling/qmldbg_profiler/qqmlenginecontrolservice.cpp +@@ -38,11 +38,14 @@ + ****************************************************************************/ + + #include "qqmlenginecontrolservice.h" +-#include ++#include ++#include + #include + + QT_BEGIN_NAMESPACE + ++using QQmlDebugPacket = QVersionedPacket; ++ + QQmlEngineControlServiceImpl::QQmlEngineControlServiceImpl(QObject *parent) : + QQmlEngineControlService(1, parent) + { +--- a/src/plugins/qmltooling/qmldbg_profiler/qqmlprofileradapter.cpp ++++ b/src/plugins/qmltooling/qmldbg_profiler/qqmlprofileradapter.cpp +@@ -38,8 +38,8 @@ + ****************************************************************************/ + + #include "qqmlprofileradapter.h" ++#include "qqmlprofilerservice.h" + +-#include + #include + + QT_BEGIN_NAMESPACE +--- a/src/plugins/qmltooling/qmldbg_profiler/qqmlprofilerservice.cpp ++++ b/src/plugins/qmltooling/qmldbg_profiler/qqmlprofilerservice.cpp +@@ -43,7 +43,6 @@ + #include "qqmlprofilerservicefactory.h" + + #include +-#include + #include + + #include +--- a/src/plugins/qmltooling/qmldbg_profiler/qqmlprofilerservice.h ++++ b/src/plugins/qmltooling/qmldbg_profiler/qqmlprofilerservice.h +@@ -56,6 +56,8 @@ + #include + #include + #include ++#include ++#include + + #include + #include +@@ -70,6 +72,7 @@ + QT_BEGIN_NAMESPACE + + class QUrl; ++using QQmlDebugPacket = QVersionedPacket; + + class QQmlProfilerServiceImpl : + public QQmlConfigurableDebugService, +--- a/src/plugins/qmltooling/qmldbg_profiler/qv4profileradapter.h ++++ b/src/plugins/qmltooling/qmldbg_profiler/qv4profileradapter.h +@@ -51,9 +51,10 @@ + // We mean it. + // + ++#include "qqmlprofilerservice.h" ++ + #include + #include +-#include + + #include + #include +--- a/src/plugins/qmltooling/qmldbg_quickprofiler/qquickprofileradapter.cpp ++++ b/src/plugins/qmltooling/qmldbg_quickprofiler/qquickprofileradapter.cpp +@@ -40,12 +40,15 @@ + #include "qquickprofileradapter.h" + + #include +-#include ++#include ++#include + #include + #include + + QT_BEGIN_NAMESPACE + ++using QQmlDebugPacket = QVersionedPacket; ++ + QQuickProfilerAdapter::QQuickProfilerAdapter(QObject *parent) : + QQmlAbstractProfilerAdapter(parent), next(0) + { +--- a/src/plugins/qmltooling/qmldbg_server/qqmldebugserver.cpp ++++ b/src/plugins/qmltooling/qmldbg_server/qqmldebugserver.cpp +@@ -47,7 +47,7 @@ + #include + #include + #include +-#include ++#include + + #include + #include +@@ -83,6 +83,7 @@ + Q_QML_DEBUG_PLUGIN_LOADER(QQmlDebugServerConnection) + + const int protocolVersion = 1; ++using QQmlDebugPacket = QVersionedPacket; + + class QQmlDebugServerImpl; + class QQmlDebugServerThread : public QThread +--- /dev/null ++++ b/include/QtPacketProtocol/5.11.0/QtPacketProtocol/private/qversionedpacket_p.h +@@ -0,0 +1 @@ ++#include "../../../../../src/plugins/qmltooling/packetprotocol/qversionedpacket_p.h" diff -Nru qtdeclarative-opensource-src-5.10.1/debian/patches/5.11.1/0005-Make-QtQmlDebug-independent-of-QtQml.patch qtdeclarative-opensource-src-5.11.0/debian/patches/5.11.1/0005-Make-QtQmlDebug-independent-of-QtQml.patch --- qtdeclarative-opensource-src-5.10.1/debian/patches/5.11.1/0005-Make-QtQmlDebug-independent-of-QtQml.patch 1970-01-01 00:00:00.000000000 +0000 +++ qtdeclarative-opensource-src-5.11.0/debian/patches/5.11.1/0005-Make-QtQmlDebug-independent-of-QtQml.patch 2018-06-18 10:57:26.000000000 +0000 @@ -0,0 +1,1214 @@ +From 03739f2150d59248fb2c4b688c6352182f630f3e Mon Sep 17 00:00:00 2001 +From: Ulf Hermann +Date: Mon, 23 Apr 2018 12:23:42 +0200 +Subject: [PATCH 05/65] Make QtQmlDebug independent of QtQml + +This means QtQmlDebug needs its own qqmlprofilerdefintions.h. This is a +good thing because this way we notice if we change the definitions in an +incompatible way. The test uses QtQmlDebug after all. Also, +qqmldebugserviceinterfaces_p.h is not available anymore, which means the +service names have to be spelled out. This, also, is beneficial as it +prevents us from accidentally changing the names. + +In the context of QmlDebug we don't need to namespace the profiler +definitions, either. This simplifies some code. + +Task-number: QTBUG-60996 +Change-Id: Ibb39e48c9b758687d68b8ce4431f45eb26939a09 +Reviewed-by: Simon Hausmann +--- + src/qml/debugger/qqmlprofilerdefinitions_p.h | 27 ---- + src/qmldebug/qmldebug.pro | 5 +- + src/qmldebug/qqmlenginecontrolclient.cpp | 3 +- + src/qmldebug/qqmlprofilerclient.cpp | 1 - + src/qmldebug/qqmlprofilerclient_p.h | 4 +- + src/qmldebug/qqmlprofilerclient_p_p.h | 6 +- + .../qqmlprofilerclientdefinitions_p.h | 152 ++++++++++++++++++ + src/qmldebug/qqmlprofilerevent_p.h | 4 +- + src/qmldebug/qqmlprofilereventtype.cpp | 26 ++- + src/qmldebug/qqmlprofilereventtype_p.h | 5 +- + src/qmldebug/qqmlprofilertypedevent.cpp | 91 ++++++----- + .../tst_qqmlprofilerservice.cpp | 84 +++++----- + tools/qmlprofiler/qmlprofiler.pro | 2 +- + tools/qmlprofiler/qmlprofilerapplication.cpp | 5 +- + tools/qmlprofiler/qmlprofilerclient.h | 2 +- + tools/qmlprofiler/qmlprofilerdata.cpp | 110 ++++++------- + tools/qmlprofiler/qmlprofilerdata.h | 6 +- + 17 files changed, 329 insertions(+), 204 deletions(-) + create mode 100644 src/qmldebug/qqmlprofilerclientdefinitions_p.h + +--- a/src/qml/debugger/qqmlprofilerdefinitions_p.h ++++ b/src/qml/debugger/qqmlprofilerdefinitions_p.h +@@ -96,11 +96,6 @@ + MaximumRangeType + }; + +- enum BindingType { +- QmlBinding, +- MaximumBindingType +- }; +- + enum PixmapEventType { + PixmapSizeKnown, + PixmapReferenceCountChanged, +@@ -129,8 +124,6 @@ + NumGUIThreadFrameTypes = MaximumSceneGraphFrameType - NumRenderThreadFrameTypes + }; + +- typedef QV4::Profiling::MemoryType MemoryType; +- + enum ProfileFeature { + ProfileJavaScript, + ProfileMemory, +@@ -162,26 +155,6 @@ + + MaximumInputEventType + }; +- +- static ProfileFeature featureFromRangeType(RangeType range) +- { +- switch (range) { +- case Painting: +- return ProfilePainting; +- case Compiling: +- return ProfileCompiling; +- case Creating: +- return ProfileCreating; +- case Binding: +- return ProfileBinding; +- case HandlingSignal: +- return ProfileHandlingSignal; +- case Javascript: +- return ProfileJavaScript; +- default: +- return MaximumProfileFeature; +- } +- } + }; + + QT_END_NAMESPACE +--- a/src/qmldebug/qmldebug.pro ++++ b/src/qmldebug/qmldebug.pro +@@ -1,5 +1,5 @@ + TARGET = QtQmlDebug +-QT = core-private network packetprotocol-private qml-private ++QT = core-private network packetprotocol-private + CONFIG += static internal_module + + load(qt_module) +@@ -28,4 +28,5 @@ + qqmlprofilereventlocation_p.h \ + qqmlprofilereventreceiver_p.h \ + qqmlprofilereventtype_p.h \ +- qqmlprofilertypedevent_p.h ++ qqmlprofilertypedevent_p.h \ ++ qqmlprofilerclientdefinitions_p.h +--- a/src/qmldebug/qqmlenginecontrolclient.cpp ++++ b/src/qmldebug/qqmlenginecontrolclient.cpp +@@ -41,7 +41,6 @@ + #include "qqmlenginecontrolclient_p_p.h" + #include "qqmldebugconnection_p.h" + +-#include + #include + + QT_BEGIN_NAMESPACE +@@ -142,7 +141,7 @@ + } + + QQmlEngineControlClientPrivate::QQmlEngineControlClientPrivate(QQmlDebugConnection *connection) : +- QQmlDebugClientPrivate(QQmlEngineControlService::s_key, connection) ++ QQmlDebugClientPrivate(QLatin1String("EngineControl"), connection) + { + } + +--- a/src/qmldebug/qqmlprofilerclient.cpp ++++ b/src/qmldebug/qqmlprofilerclient.cpp +@@ -39,7 +39,6 @@ + + #include "qqmlprofilerclient_p_p.h" + #include "qqmldebugconnection_p.h" +-#include + + QT_BEGIN_NAMESPACE + +--- a/src/qmldebug/qqmlprofilerclient_p.h ++++ b/src/qmldebug/qqmlprofilerclient_p.h +@@ -43,8 +43,8 @@ + #include "qqmldebugclient_p.h" + #include "qqmlprofilereventlocation_p.h" + #include "qqmlprofilereventreceiver_p.h" ++#include "qqmlprofilerclientdefinitions_p.h" + +-#include + #include + + // +@@ -61,7 +61,7 @@ + QT_BEGIN_NAMESPACE + + class QQmlProfilerClientPrivate; +-class QQmlProfilerClient : public QQmlDebugClient, public QQmlProfilerDefinitions ++class QQmlProfilerClient : public QQmlDebugClient + { + Q_OBJECT + Q_DECLARE_PRIVATE(QQmlProfilerClient) +--- a/src/qmldebug/qqmlprofilerclient_p_p.h ++++ b/src/qmldebug/qqmlprofilerclient_p_p.h +@@ -45,10 +45,10 @@ + #include "qqmlenginecontrolclient_p.h" + #include "qqmlprofilerclient_p.h" + #include "qqmlprofilertypedevent_p.h" +- +-#include ++#include "qqmlprofilerclientdefinitions_p.h" + + #include ++#include + + // + // W A R N I N G +@@ -63,7 +63,7 @@ + + QT_BEGIN_NAMESPACE + +-class QQmlProfilerClientPrivate : public QQmlDebugClientPrivate, public QQmlProfilerDefinitions { ++class QQmlProfilerClientPrivate : public QQmlDebugClientPrivate { + Q_DECLARE_PUBLIC(QQmlProfilerClient) + public: + QQmlProfilerClientPrivate(QQmlDebugConnection *connection, +--- /dev/null ++++ b/src/qmldebug/qqmlprofilerclientdefinitions_p.h +@@ -0,0 +1,152 @@ ++/**************************************************************************** ++** ++** Copyright (C) 2018 The Qt Company Ltd. ++** Contact: https://www.qt.io/licensing/ ++** ++** This file is part of the QtQml module 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 The Qt Company. For licensing terms ++** and conditions see https://www.qt.io/terms-conditions. For further ++** information use the contact form at https://www.qt.io/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 3 as published by the Free Software ++** Foundation and appearing in the file LICENSE.LGPL3 included in the ++** packaging of this file. Please review the following information to ++** ensure the GNU Lesser General Public License version 3 requirements ++** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. ++** ++** GNU General Public License Usage ++** Alternatively, this file may be used under the terms of the GNU ++** General Public License version 2.0 or (at your option) the GNU General ++** Public license version 3 or any later version approved by the KDE Free ++** Qt Foundation. The licenses are as published by the Free Software ++** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 ++** included in the packaging of this file. Please review the following ++** information to ensure the GNU General Public License requirements will ++** be met: https://www.gnu.org/licenses/gpl-2.0.html and ++** https://www.gnu.org/licenses/gpl-3.0.html. ++** ++** $QT_END_LICENSE$ ++** ++****************************************************************************/ ++ ++#ifndef QQMLPROFILERCLIENTDEFINITIONS_P_H ++#define QQMLPROFILERCLIENTDEFINITIONS_P_H ++ ++#include ++ ++QT_BEGIN_NAMESPACE ++ ++enum Message { ++ Event, ++ RangeStart, ++ RangeData, ++ RangeLocation, ++ RangeEnd, ++ Complete, // end of transmission ++ PixmapCacheEvent, ++ SceneGraphFrame, ++ MemoryAllocation, ++ DebugMessage, ++ ++ MaximumMessage ++}; ++ ++enum EventType { ++ FramePaint, ++ Mouse, ++ Key, ++ AnimationFrame, ++ EndTrace, ++ StartTrace, ++ ++ MaximumEventType ++}; ++ ++enum RangeType { ++ Painting, ++ Compiling, ++ Creating, ++ Binding, //running a binding ++ HandlingSignal, //running a signal handler ++ Javascript, ++ ++ MaximumRangeType ++}; ++ ++enum PixmapEventType { ++ PixmapSizeKnown, ++ PixmapReferenceCountChanged, ++ PixmapCacheCountChanged, ++ PixmapLoadingStarted, ++ PixmapLoadingFinished, ++ PixmapLoadingError, ++ ++ MaximumPixmapEventType ++}; ++ ++enum SceneGraphFrameType { ++ SceneGraphRendererFrame, // Render Thread ++ SceneGraphAdaptationLayerFrame, // Render Thread ++ SceneGraphContextFrame, // Render Thread ++ SceneGraphRenderLoopFrame, // Render Thread ++ SceneGraphTexturePrepare, // Render Thread ++ SceneGraphTextureDeletion, // Render Thread ++ SceneGraphPolishAndSync, // GUI Thread ++ SceneGraphWindowsRenderShow, // Unused ++ SceneGraphWindowsAnimations, // GUI Thread ++ SceneGraphPolishFrame, // GUI Thread ++ ++ MaximumSceneGraphFrameType, ++ NumRenderThreadFrameTypes = SceneGraphPolishAndSync, ++ NumGUIThreadFrameTypes = MaximumSceneGraphFrameType - NumRenderThreadFrameTypes ++}; ++ ++enum MemoryType { ++ HeapPage, ++ LargeItem, ++ SmallItem ++}; ++ ++enum ProfileFeature { ++ ProfileJavaScript, ++ ProfileMemory, ++ ProfilePixmapCache, ++ ProfileSceneGraph, ++ ProfileAnimations, ++ ProfilePainting, ++ ProfileCompiling, ++ ProfileCreating, ++ ProfileBinding, ++ ProfileHandlingSignal, ++ ProfileInputEvents, ++ ProfileDebugMessages, ++ ++ MaximumProfileFeature ++}; ++ ++enum InputEventType { ++ InputKeyPress, ++ InputKeyRelease, ++ InputKeyUnknown, ++ ++ InputMousePress, ++ InputMouseRelease, ++ InputMouseMove, ++ InputMouseDoubleClick, ++ InputMouseWheel, ++ InputMouseUnknown, ++ ++ MaximumInputEventType ++}; ++ ++QT_END_NAMESPACE ++ ++#endif // QQMLPROFILERCLIENTDEFINITIONS_P_H +--- a/src/qmldebug/qqmlprofilerevent_p.h ++++ b/src/qmldebug/qqmlprofilerevent_p.h +@@ -40,7 +40,7 @@ + #ifndef QQMLPROFILEREVENT_P_H + #define QQMLPROFILEREVENT_P_H + +-#include ++#include "qqmlprofilerclientdefinitions_p.h" + + #include + #include +@@ -63,7 +63,7 @@ + + QT_BEGIN_NAMESPACE + +-struct QQmlProfilerEvent : public QQmlProfilerDefinitions { ++struct QQmlProfilerEvent { + QQmlProfilerEvent() : + m_timestamp(-1), m_typeIndex(-1), m_dataType(Inline8Bit), m_dataLength(0) + {} +--- a/src/qmldebug/qqmlprofilereventtype.cpp ++++ b/src/qmldebug/qqmlprofilereventtype.cpp +@@ -38,6 +38,7 @@ + ****************************************************************************/ + + #include "qqmlprofilereventtype_p.h" ++#include "qqmlprofilerclientdefinitions_p.h" + + #include + +@@ -49,8 +50,8 @@ + quint8 rangeType; + stream >> type.m_displayName >> type.m_data >> type.m_location >> message >> rangeType + >> type.m_detailType; +- type.m_message = static_cast(message); +- type.m_rangeType = static_cast(rangeType); ++ type.m_message = static_cast(message); ++ type.m_rangeType = static_cast(rangeType); + return stream; + } + +@@ -61,7 +62,7 @@ + << type.m_detailType; + } + +-QQmlProfilerDefinitions::ProfileFeature QQmlProfilerEventType::feature() const ++ProfileFeature QQmlProfilerEventType::feature() const + { + switch (m_message) { + case Event: { +@@ -84,7 +85,24 @@ + case DebugMessage: + return ProfileDebugMessages; + default: +- return featureFromRangeType(m_rangeType); ++ break; ++ } ++ ++ switch (m_rangeType) { ++ case Painting: ++ return ProfilePainting; ++ case Compiling: ++ return ProfileCompiling; ++ case Creating: ++ return ProfileCreating; ++ case Binding: ++ return ProfileBinding; ++ case HandlingSignal: ++ return ProfileHandlingSignal; ++ case Javascript: ++ return ProfileJavaScript; ++ default: ++ return MaximumProfileFeature; + } + } + +--- a/src/qmldebug/qqmlprofilereventtype_p.h ++++ b/src/qmldebug/qqmlprofilereventtype_p.h +@@ -41,8 +41,7 @@ + #define QQMLPROFILEREVENTTYPE_P_H + + #include "qqmlprofilereventlocation_p.h" +- +-#include ++#include "qqmlprofilerclientdefinitions_p.h" + + #include + #include +@@ -61,7 +60,7 @@ + + QT_BEGIN_NAMESPACE + +-class QQmlProfilerEventType : public QQmlProfilerDefinitions { ++class QQmlProfilerEventType { + public: + QQmlProfilerEventType(Message message = MaximumMessage, RangeType rangeType = MaximumRangeType, + int detailType = -1, +--- a/src/qmldebug/qqmlprofilertypedevent.cpp ++++ b/src/qmldebug/qqmlprofilertypedevent.cpp +@@ -38,6 +38,8 @@ + ****************************************************************************/ + + #include "qqmlprofilertypedevent_p.h" ++#include "qqmlprofilerclientdefinitions_p.h" ++ + #include + + QT_BEGIN_NAMESPACE +@@ -50,15 +52,15 @@ + + stream >> time >> messageType; + +- if (messageType < 0 || messageType > QQmlProfilerDefinitions::MaximumMessage) +- messageType = QQmlProfilerDefinitions::MaximumMessage; ++ if (messageType < 0 || messageType > MaximumMessage) ++ messageType = MaximumMessage; + +- QQmlProfilerDefinitions::RangeType rangeType = QQmlProfilerDefinitions::MaximumRangeType; ++ RangeType rangeType = MaximumRangeType; + if (!stream.atEnd()) { + stream >> subtype; +- rangeType = static_cast(subtype); +- if (rangeType < 0 || rangeType > QQmlProfilerDefinitions::MaximumRangeType) +- rangeType = QQmlProfilerDefinitions::MaximumRangeType; ++ rangeType = static_cast(subtype); ++ if (rangeType < 0 || rangeType > MaximumRangeType) ++ rangeType = MaximumRangeType; + } else { + subtype = -1; + } +@@ -68,13 +70,13 @@ + event.serverTypeId = 0; + + switch (messageType) { +- case QQmlProfilerDefinitions::Event: { ++ case Event: { + event.type = QQmlProfilerEventType( +- static_cast(messageType), +- QQmlProfilerDefinitions::MaximumRangeType, subtype); ++ static_cast(messageType), ++ MaximumRangeType, subtype); + switch (subtype) { +- case QQmlProfilerDefinitions::StartTrace: +- case QQmlProfilerDefinitions::EndTrace: { ++ case StartTrace: ++ case EndTrace: { + QVarLengthArray engineIds; + while (!stream.atEnd()) { + qint32 id; +@@ -84,7 +86,7 @@ + event.event.setNumbers, qint32>(engineIds); + break; + } +- case QQmlProfilerDefinitions::AnimationFrame: { ++ case AnimationFrame: { + qint32 frameRate, animationCount; + qint32 threadId; + stream >> frameRate >> animationCount; +@@ -96,11 +98,9 @@ + event.event.setNumbers({frameRate, animationCount, threadId}); + break; + } +- case QQmlProfilerDefinitions::Mouse: +- case QQmlProfilerDefinitions::Key: +- int inputType = (subtype == QQmlProfilerDefinitions::Key +- ? QQmlProfilerDefinitions::InputKeyUnknown +- : QQmlProfilerDefinitions::InputMouseUnknown); ++ case Mouse: ++ case Key: ++ int inputType = (subtype == Key ? InputKeyUnknown : InputMouseUnknown); + if (!stream.atEnd()) + stream >> inputType; + qint32 a = -1; +@@ -116,13 +116,13 @@ + + break; + } +- case QQmlProfilerDefinitions::Complete: { ++ case Complete: { + event.type = QQmlProfilerEventType( +- static_cast(messageType), +- QQmlProfilerDefinitions::MaximumRangeType, subtype); ++ static_cast(messageType), ++ MaximumRangeType, subtype); + break; + } +- case QQmlProfilerDefinitions::SceneGraphFrame: { ++ case SceneGraphFrame: { + QVarLengthArray params; + qint64 param; + +@@ -132,41 +132,40 @@ + } + + event.type = QQmlProfilerEventType( +- static_cast(messageType), +- QQmlProfilerDefinitions::MaximumRangeType, subtype); ++ static_cast(messageType), ++ MaximumRangeType, subtype); + event.event.setNumbers, qint64>(params); + break; + } +- case QQmlProfilerDefinitions::PixmapCacheEvent: { ++ case PixmapCacheEvent: { + qint32 width = 0, height = 0, refcount = 0; + QString filename; + stream >> filename; +- if (subtype == QQmlProfilerDefinitions::PixmapReferenceCountChanged +- || subtype == QQmlProfilerDefinitions::PixmapCacheCountChanged) { ++ if (subtype == PixmapReferenceCountChanged || subtype == PixmapCacheCountChanged) { + stream >> refcount; +- } else if (subtype == QQmlProfilerDefinitions::PixmapSizeKnown) { ++ } else if (subtype == PixmapSizeKnown) { + stream >> width >> height; + refcount = 1; + } + + event.type = QQmlProfilerEventType( +- static_cast(messageType), +- QQmlProfilerDefinitions::MaximumRangeType, subtype, ++ static_cast(messageType), ++ MaximumRangeType, subtype, + QQmlProfilerEventLocation(filename, 0, 0)); + event.event.setNumbers({width, height, refcount}); + break; + } +- case QQmlProfilerDefinitions::MemoryAllocation: { ++ case MemoryAllocation: { + qint64 delta; + stream >> delta; + + event.type = QQmlProfilerEventType( +- static_cast(messageType), +- QQmlProfilerDefinitions::MaximumRangeType, subtype); ++ static_cast(messageType), ++ MaximumRangeType, subtype); + event.event.setNumbers({delta}); + break; + } +- case QQmlProfilerDefinitions::RangeStart: { ++ case RangeStart: { + if (!stream.atEnd()) { + qint64 typeId; + stream >> typeId; +@@ -175,22 +174,22 @@ + // otherwise it's the old binding type of 4 bytes + } + +- event.type = QQmlProfilerEventType(QQmlProfilerDefinitions::MaximumMessage, rangeType, -1); +- event.event.setRangeStage(QQmlProfilerDefinitions::RangeStart); ++ event.type = QQmlProfilerEventType(MaximumMessage, rangeType, -1); ++ event.event.setRangeStage(RangeStart); + break; + } +- case QQmlProfilerDefinitions::RangeData: { ++ case RangeData: { + QString data; + stream >> data; + +- event.type = QQmlProfilerEventType(QQmlProfilerDefinitions::MaximumMessage, rangeType, -1, ++ event.type = QQmlProfilerEventType(MaximumMessage, rangeType, -1, + QQmlProfilerEventLocation(), data); +- event.event.setRangeStage(QQmlProfilerDefinitions::RangeData); ++ event.event.setRangeStage(RangeData); + if (!stream.atEnd()) + stream >> event.serverTypeId; + break; + } +- case QQmlProfilerDefinitions::RangeLocation: { ++ case RangeLocation: { + QString filename; + qint32 line = 0; + qint32 column = 0; +@@ -202,21 +201,21 @@ + stream >> event.serverTypeId; + } + +- event.type = QQmlProfilerEventType(QQmlProfilerDefinitions::MaximumMessage, rangeType, -1, ++ event.type = QQmlProfilerEventType(MaximumMessage, rangeType, -1, + QQmlProfilerEventLocation(filename, line, column)); +- event.event.setRangeStage(QQmlProfilerDefinitions::RangeLocation); ++ event.event.setRangeStage(RangeLocation); + break; + } +- case QQmlProfilerDefinitions::RangeEnd: { +- event.type = QQmlProfilerEventType(QQmlProfilerDefinitions::MaximumMessage, rangeType, -1); +- event.event.setRangeStage(QQmlProfilerDefinitions::RangeEnd); ++ case RangeEnd: { ++ event.type = QQmlProfilerEventType(MaximumMessage, rangeType, -1); ++ event.event.setRangeStage(RangeEnd); + break; + } + default: + event.event.setNumbers({}); + event.type = QQmlProfilerEventType( +- static_cast(messageType), +- QQmlProfilerDefinitions::MaximumRangeType, subtype); ++ static_cast(messageType), ++ MaximumRangeType, subtype); + break; + } + +--- a/tests/auto/qml/debugger/qqmlprofilerservice/tst_qqmlprofilerservice.cpp ++++ b/tests/auto/qml/debugger/qqmlprofilerservice/tst_qqmlprofilerservice.cpp +@@ -40,7 +40,7 @@ + #include + #include + +-class QQmlProfilerTestClient : public QQmlProfilerEventReceiver, public QQmlProfilerDefinitions ++class QQmlProfilerTestClient : public QQmlProfilerEventReceiver + { + Q_OBJECT + +@@ -229,8 +229,8 @@ + bool m_isComplete = false; + + // Don't use ({...}) here as MSVC will interpret that as the "QVector(int size)" ctor. +- const QVector m_rangeStart = (QVector() << QQmlProfilerDefinitions::RangeStart); +- const QVector m_rangeEnd = (QVector() << QQmlProfilerDefinitions::RangeEnd); ++ const QVector m_rangeStart = (QVector() << RangeStart); ++ const QVector m_rangeEnd = (QVector() << RangeEnd); + }; + + #define VERIFY(type, position, expected, checks, numbers) \ +@@ -247,7 +247,7 @@ + // ### Still using qmlscene due to QTBUG-33377 + return QQmlDebugTest::connect( + QLibraryInfo::location(QLibraryInfo::BinariesPath) + "/qmlscene", +- restrictServices ? QQmlDebuggingEnabler::profilerServices().join(',') : QString(), ++ restrictServices ? "CanvasFrameRate,EngineControl,DebugMessages" : QString(), + testFile(file), block); + } + +@@ -272,15 +272,11 @@ + QVector numbers; + + // must start with "StartTrace" +- QQmlProfilerEventType expected(QQmlProfilerDefinitions::Event, +- QQmlProfilerDefinitions::MaximumRangeType, +- QQmlProfilerDefinitions::StartTrace); ++ QQmlProfilerEventType expected(Event, MaximumRangeType, StartTrace); + VERIFY(MessageListAsynchronous, 0, expected, CheckMessageType | CheckDetailType, numbers); + + // must end with "EndTrace" +- expected = QQmlProfilerEventType(QQmlProfilerDefinitions::Event, +- QQmlProfilerDefinitions::MaximumRangeType, +- QQmlProfilerDefinitions::EndTrace); ++ expected = QQmlProfilerEventType(Event, MaximumRangeType, EndTrace); + VERIFY(MessageListAsynchronous, m_client->asynchronousMessages.length() - 1, expected, + CheckMessageType | CheckDetailType, numbers); + } +@@ -299,15 +295,15 @@ + const qint64 amount = message.number(0); + const QQmlProfilerEventType &type = m_client->types.at(message.typeIndex()); + switch (type.detailType()) { +- case QV4::Profiling::HeapPage: ++ case HeapPage: + allocated += amount; + seen_alloc = true; + break; +- case QV4::Profiling::SmallItem: ++ case SmallItem: + used += amount; + seen_small = true; + break; +- case QV4::Profiling::LargeItem: ++ case LargeItem: + allocated += amount; + used += amount; + seen_large = true; +@@ -548,28 +544,27 @@ + checkTraceReceived(); + checkJsHeap(); + +- auto createType = [](QQmlProfilerDefinitions::PixmapEventType type) { +- return QQmlProfilerEventType(QQmlProfilerDefinitions::PixmapCacheEvent, +- QQmlProfilerDefinitions::MaximumRangeType, type); ++ auto createType = [](PixmapEventType type) { ++ return QQmlProfilerEventType(PixmapCacheEvent, MaximumRangeType, type); + }; + + QVector numbers; + + // image starting to load +- VERIFY(MessageListPixmap, 0, createType(QQmlProfilerDefinitions::PixmapLoadingStarted), ++ VERIFY(MessageListPixmap, 0, createType(PixmapLoadingStarted), + CheckMessageType | CheckDetailType, numbers); + + // image size + numbers = QVector({2, 2, 1}); +- VERIFY(MessageListPixmap, 1, createType(QQmlProfilerDefinitions::PixmapSizeKnown), ++ VERIFY(MessageListPixmap, 1, createType(PixmapSizeKnown), + CheckMessageType | CheckDetailType | CheckNumbers, numbers); + + // image loaded +- VERIFY(MessageListPixmap, 2, createType(QQmlProfilerDefinitions::PixmapLoadingFinished), ++ VERIFY(MessageListPixmap, 2, createType(PixmapLoadingFinished), + CheckMessageType | CheckDetailType, numbers); + + // cache size +- VERIFY(MessageListPixmap, 3, createType(QQmlProfilerDefinitions::PixmapCacheCountChanged), ++ VERIFY(MessageListPixmap, 3, createType(PixmapCacheCountChanged), + CheckMessageType | CheckDetailType, numbers); + } + +@@ -597,8 +592,8 @@ + if (QGuiApplicationPrivate::platformIntegration()->hasCapability(QPlatformIntegration::OpenGL)) { + foreach (const QQmlProfilerEvent &msg, m_client->asynchronousMessages) { + const QQmlProfilerEventType &type = m_client->types.at(msg.typeIndex()); +- if (type.message() == QQmlProfilerDefinitions::SceneGraphFrame) { +- if (type.detailType() == QQmlProfilerDefinitions::SceneGraphContextFrame) { ++ if (type.message() == SceneGraphFrame) { ++ if (type.detailType() == SceneGraphContextFrame) { + contextFrameTime = msg.timestamp(); + break; + } +@@ -610,7 +605,7 @@ + #endif + foreach (const QQmlProfilerEvent &msg, m_client->asynchronousMessages) { + const QQmlProfilerEventType &type = m_client->types.at(msg.typeIndex()); +- if (type.detailType() == QQmlProfilerDefinitions::SceneGraphRendererFrame) { ++ if (type.detailType() == SceneGraphRendererFrame) { + QVERIFY(msg.timestamp() >= contextFrameTime); + renderFrameTime = msg.timestamp(); + break; +@@ -621,7 +616,7 @@ + + foreach (const QQmlProfilerEvent &msg, m_client->asynchronousMessages) { + const QQmlProfilerEventType &type = m_client->types.at(msg.typeIndex()); +- if (type.detailType() == QQmlProfilerDefinitions::SceneGraphRenderLoopFrame) { ++ if (type.detailType() == SceneGraphRenderLoopFrame) { + if (msg.timestamp() >= contextFrameTime) { + // Make sure SceneGraphRenderLoopFrame is not between SceneGraphContextFrame and + // SceneGraphRendererFrame. A SceneGraphRenderLoopFrame before everything else is +@@ -664,8 +659,7 @@ + + auto createType = [](int line, int column) { + return QQmlProfilerEventType( +- QQmlProfilerDefinitions::MaximumMessage, +- QQmlProfilerDefinitions::HandlingSignal, -1, ++ MaximumMessage, HandlingSignal, -1, + QQmlProfilerEventLocation(QLatin1String("signalSourceLocation.qml"), line, + column)); + }; +@@ -684,23 +678,21 @@ + checkTraceReceived(); + checkJsHeap(); + +- VERIFY(MessageListJavaScript, 2, QQmlProfilerEventType(QQmlProfilerDefinitions::MaximumMessage, +- QQmlProfilerDefinitions::Javascript), ++ VERIFY(MessageListJavaScript, 2, QQmlProfilerEventType(MaximumMessage, Javascript), + CheckMessageType | CheckDetailType | CheckNumbers, m_rangeStart); + + VERIFY(MessageListJavaScript, 3, +- QQmlProfilerEventType(QQmlProfilerDefinitions::MaximumMessage, +- QQmlProfilerDefinitions::Javascript, -1, +- QQmlProfilerEventLocation(QLatin1String("javascript.qml"), 4, 5)), ++ QQmlProfilerEventType( ++ MaximumMessage, Javascript, -1, ++ QQmlProfilerEventLocation(QLatin1String("javascript.qml"), 4, 5)), + CheckType | CheckNumbers, m_rangeStart); + + VERIFY(MessageListJavaScript, 4, QQmlProfilerEventType( +- QQmlProfilerDefinitions::MaximumMessage, QQmlProfilerDefinitions::Javascript, -1, ++ MaximumMessage, Javascript, -1, + QQmlProfilerEventLocation(), QLatin1String("something")), + CheckMessageType | CheckDetailType | CheckDataEndsWith | CheckNumbers, m_rangeStart); + +- VERIFY(MessageListJavaScript, 10, QQmlProfilerEventType(QQmlProfilerDefinitions::MaximumMessage, +- QQmlProfilerDefinitions::Javascript), ++ VERIFY(MessageListJavaScript, 10, QQmlProfilerEventType(MaximumMessage, Javascript), + CheckMessageType | CheckDetailType | CheckNumbers, m_rangeEnd); + } + +@@ -726,8 +718,7 @@ + checkTraceReceived(); + checkJsHeap(); + +- const QQmlProfilerEventType type(QQmlProfilerDefinitions::MaximumMessage, +- QQmlProfilerDefinitions::Binding); ++ const QQmlProfilerEventType type(MaximumMessage, Binding); + + VERIFY(MessageListQML, 4, type, CheckDetailType | CheckMessageType | CheckNumbers, + m_rangeStart); +@@ -746,7 +737,7 @@ + int smallItems = 0; + for (auto message : m_client->jsHeapMessages) { + const QQmlProfilerEventType &type = m_client->types[message.typeIndex()]; +- if (type.detailType() == QV4::Profiling::SmallItem) ++ if (type.detailType() == SmallItem) + ++smallItems; + } + +@@ -756,8 +747,7 @@ + static bool hasCompileEvents(const QVector &types) + { + for (const QQmlProfilerEventType &type : types) { +- if (type.message() == QQmlProfilerDefinitions::MaximumMessage +- && type.rangeType() == QQmlProfilerDefinitions::Compiling) ++ if (type.message() == MaximumMessage && type.rangeType() == Compiling) + return true; + } + return false; +@@ -776,29 +766,29 @@ + checkTraceReceived(); + checkJsHeap(); + +- QQmlProfilerDefinitions::Message rangeStage = QQmlProfilerDefinitions::MaximumMessage; ++ Message rangeStage = MaximumMessage; + for (auto message : m_client->qmlMessages) { + const QQmlProfilerEventType &type = m_client->types[message.typeIndex()]; +- if (type.rangeType() == QQmlProfilerDefinitions::Compiling) { ++ if (type.rangeType() == Compiling) { + switch (rangeStage) { +- case QQmlProfilerDefinitions::MaximumMessage: +- QCOMPARE(message.rangeStage(), QQmlProfilerDefinitions::RangeStart); ++ case MaximumMessage: ++ QCOMPARE(message.rangeStage(), RangeStart); + break; +- case QQmlProfilerDefinitions::RangeStart: +- QCOMPARE(message.rangeStage(), QQmlProfilerDefinitions::RangeEnd); ++ case RangeStart: ++ QCOMPARE(message.rangeStage(), RangeEnd); + break; + default: + QFAIL("Wrong range stage"); + } + rangeStage = message.rangeStage(); +- QCOMPARE(type.message(), QQmlProfilerDefinitions::MaximumMessage); ++ QCOMPARE(type.message(), MaximumMessage); + QCOMPARE(type.location().filename(), testFileUrl("test.qml").toString()); + QCOMPARE(type.location().line(), 0); + QCOMPARE(type.location().column(), 0); + } + } + +- QCOMPARE(rangeStage, QQmlProfilerDefinitions::RangeEnd); ++ QCOMPARE(rangeStage, RangeEnd); + } + + QTEST_MAIN(tst_QQmlProfilerService) +--- a/tools/qmlprofiler/qmlprofiler.pro ++++ b/tools/qmlprofiler/qmlprofiler.pro +@@ -1,4 +1,4 @@ +-QT = qml-private network core qmldebug-private ++QT = network core qmldebug-private + CONFIG += no_import_scan + + SOURCES += main.cpp \ +--- a/tools/qmlprofiler/qmlprofilerapplication.cpp ++++ b/tools/qmlprofiler/qmlprofilerapplication.cpp +@@ -70,8 +70,7 @@ + "debugmessages" + }; + +-Q_STATIC_ASSERT(sizeof(features) == +- QQmlProfilerDefinitions::MaximumProfileFeature * sizeof(char *)); ++Q_STATIC_ASSERT(sizeof(features) == MaximumProfileFeature * sizeof(char *)); + + QmlProfilerApplication::QmlProfilerApplication(int &argc, char **argv) : + QCoreApplication(argc, argv), +@@ -164,7 +163,7 @@ + parser.addOption(record); + + QStringList featureList; +- for (int i = 0; i < QQmlProfilerDefinitions::MaximumProfileFeature; ++i) ++ for (int i = 0; i < MaximumProfileFeature; ++i) + featureList << QLatin1String(features[i]); + + QCommandLineOption include(QLatin1String("include"), +--- a/tools/qmlprofiler/qmlprofilerclient.h ++++ b/tools/qmlprofiler/qmlprofilerclient.h +@@ -30,7 +30,7 @@ + #define QMLPROFILERCLIENT_H + + #include +-#include ++#include + #include + + class QmlProfilerData; +--- a/tools/qmlprofiler/qmlprofilerdata.cpp ++++ b/tools/qmlprofiler/qmlprofilerdata.cpp +@@ -50,8 +50,7 @@ + "Javascript" + }; + +-Q_STATIC_ASSERT(sizeof(RANGE_TYPE_STRINGS) == +- QQmlProfilerDefinitions::MaximumRangeType * sizeof(const char *)); ++Q_STATIC_ASSERT(sizeof(RANGE_TYPE_STRINGS) == MaximumRangeType * sizeof(const char *)); + + static const char *MESSAGE_STRINGS[] = { + "Event", +@@ -66,8 +65,7 @@ + "DebugMessage" + }; + +-Q_STATIC_ASSERT(sizeof(MESSAGE_STRINGS) == +- QQmlProfilerDefinitions::MaximumMessage * sizeof(const char *)); ++Q_STATIC_ASSERT(sizeof(MESSAGE_STRINGS) == MaximumMessage * sizeof(const char *)); + + ///////////////////////////////////////////////////////////////// + class QmlProfilerDataPrivate +@@ -113,7 +111,7 @@ + setState(Empty); + } + +-QString QmlProfilerData::qmlRangeTypeAsString(QQmlProfilerDefinitions::RangeType type) ++QString QmlProfilerData::qmlRangeTypeAsString(RangeType type) + { + if (type * sizeof(char *) < sizeof(RANGE_TYPE_STRINGS)) + return QLatin1String(RANGE_TYPE_STRINGS[type]); +@@ -121,7 +119,7 @@ + return QString::number(type); + } + +-QString QmlProfilerData::qmlMessageAsString(QQmlProfilerDefinitions::Message type) ++QString QmlProfilerData::qmlMessageAsString(Message type) + { + if (type * sizeof(char *) < sizeof(MESSAGE_STRINGS)) + return QLatin1String(MESSAGE_STRINGS[type]); +@@ -178,13 +176,13 @@ + + QString displayName; + switch (type.message()) { +- case QQmlProfilerDefinitions::Event: { ++ case Event: { + switch (type.detailType()) { +- case QQmlProfilerDefinitions::Mouse: +- case QQmlProfilerDefinitions::Key: ++ case Mouse: ++ case Key: + displayName = QString::fromLatin1("Input:%1").arg(type.detailType()); + break; +- case QQmlProfilerDefinitions::AnimationFrame: ++ case AnimationFrame: + displayName = QString::fromLatin1("AnimationFrame"); + break; + default: +@@ -192,29 +190,29 @@ + } + break; + } +- case QQmlProfilerDefinitions::RangeStart: +- case QQmlProfilerDefinitions::RangeData: +- case QQmlProfilerDefinitions::RangeLocation: +- case QQmlProfilerDefinitions::RangeEnd: +- case QQmlProfilerDefinitions::Complete: ++ case RangeStart: ++ case RangeData: ++ case RangeLocation: ++ case RangeEnd: ++ case Complete: + Q_UNREACHABLE(); + break; +- case QQmlProfilerDefinitions::PixmapCacheEvent: { ++ case PixmapCacheEvent: { + const QString filePath = QUrl(type.location().filename()).path(); + displayName = filePath.midRef(filePath.lastIndexOf(QLatin1Char('/')) + 1) + + QLatin1Char(':') + QString::number(type.detailType()); + break; + } +- case QQmlProfilerDefinitions::SceneGraphFrame: ++ case SceneGraphFrame: + displayName = QString::fromLatin1("SceneGraph:%1").arg(type.detailType()); + break; +- case QQmlProfilerDefinitions::MemoryAllocation: ++ case MemoryAllocation: + displayName = QString::fromLatin1("MemoryAllocation:%1").arg(type.detailType()); + break; +- case QQmlProfilerDefinitions::DebugMessage: ++ case DebugMessage: + displayName = QString::fromLatin1("DebugMessage:%1").arg(type.detailType()); + break; +- case QQmlProfilerDefinitions::MaximumMessage: { ++ case MaximumMessage: { + const QQmlProfilerEventLocation eventLocation = type.location(); + // generate hash + if (eventLocation.filename().isEmpty()) { +@@ -241,21 +239,21 @@ + + for (const QQmlProfilerEvent &event : qAsConst(d->events)) { + const QQmlProfilerEventType &type = d->eventTypes.at(event.typeIndex()); +- if (type.message() != QQmlProfilerDefinitions::MaximumMessage) ++ if (type.message() != MaximumMessage) + continue; + + switch (type.rangeType()) { +- case QQmlProfilerDefinitions::Compiling: +- case QQmlProfilerDefinitions::Creating: +- case QQmlProfilerDefinitions::Binding: +- case QQmlProfilerDefinitions::HandlingSignal: +- case QQmlProfilerDefinitions::Javascript: ++ case Compiling: ++ case Creating: ++ case Binding: ++ case HandlingSignal: ++ case Javascript: + switch (event.rangeStage()) { +- case QQmlProfilerDefinitions::RangeStart: ++ case RangeStart: + if (level++ == 0) + level0Start = event.timestamp(); + break; +- case QQmlProfilerDefinitions::RangeEnd: ++ case RangeEnd: + if (--level == 0) + d->qmlMeasuredTime += event.timestamp() - level0Start; + break; +@@ -430,8 +428,7 @@ + if (!eventData.displayName().isEmpty()) + stream.writeTextElement("displayname", eventData.displayName()); + +- stream.writeTextElement("type", +- eventData.rangeType() == QQmlProfilerDefinitions::MaximumRangeType ++ stream.writeTextElement("type", eventData.rangeType() == MaximumRangeType + ? qmlMessageAsString(eventData.message()) + : qmlRangeTypeAsString(eventData.rangeType())); + +@@ -444,25 +441,25 @@ + stream.writeTextElement("column", location.column()); + if (!eventData.data().isEmpty()) + stream.writeTextElement("details", eventData.data()); +- if (eventData.rangeType() == QQmlProfilerDefinitions::Binding) ++ if (eventData.rangeType() == Binding) + stream.writeTextElement("bindingType", eventData.detailType()); +- else if (eventData.message() == QQmlProfilerDefinitions::Event) { ++ else if (eventData.message() == Event) { + switch (eventData.detailType()) { +- case QQmlProfilerDefinitions::AnimationFrame: ++ case AnimationFrame: + stream.writeTextElement("animationFrame", eventData.detailType()); + break; +- case QQmlProfilerDefinitions::Key: ++ case Key: + stream.writeTextElement("keyEvent", eventData.detailType()); + break; +- case QQmlProfilerDefinitions::Mouse: ++ case Mouse: + stream.writeTextElement("mouseEvent", eventData.detailType()); + break; + } +- } else if (eventData.message() == QQmlProfilerDefinitions::PixmapCacheEvent) ++ } else if (eventData.message() == PixmapCacheEvent) + stream.writeTextElement("cacheEventType", eventData.detailType()); +- else if (eventData.message() == QQmlProfilerDefinitions::SceneGraphFrame) ++ else if (eventData.message() == SceneGraphFrame) + stream.writeTextElement("sgEventType", eventData.detailType()); +- else if (eventData.message() == QQmlProfilerDefinitions::MemoryAllocation) ++ else if (eventData.message() == MemoryAllocation) + stream.writeTextElement("memoryEventType", eventData.detailType()); + stream.writeEndElement(); + } +@@ -477,50 +474,49 @@ + if (duration != 0) + stream.writeAttribute("duration", duration); + stream.writeAttribute("eventIndex", event.typeIndex()); +- if (type.message() == QQmlProfilerDefinitions::Event) { +- if (type.detailType() == QQmlProfilerDefinitions::AnimationFrame) { ++ if (type.message() == Event) { ++ if (type.detailType() == AnimationFrame) { + // special: animation frame + stream.writeAttribute("framerate", event, 0); + stream.writeAttribute("animationcount", event, 1); + stream.writeAttribute("thread", event, 2); +- } else if (type.detailType() == QQmlProfilerDefinitions::Key || +- type.detailType() == QQmlProfilerDefinitions::Mouse) { ++ } else if (type.detailType() == Key || type.detailType() == Mouse) { + // numerical value here, to keep the format a bit more compact + stream.writeAttribute("type", event, 0); + stream.writeAttribute("data1", event, 1); + stream.writeAttribute("data2", event, 2); + } +- } else if (type.message() == QQmlProfilerDefinitions::PixmapCacheEvent) { ++ } else if (type.message() == PixmapCacheEvent) { + // special: pixmap cache event +- if (type.detailType() == QQmlProfilerDefinitions::PixmapSizeKnown) { ++ if (type.detailType() == PixmapSizeKnown) { + stream.writeAttribute("width", event, 0); + stream.writeAttribute("height", event, 1); +- } else if (type.detailType() == QQmlProfilerDefinitions::PixmapReferenceCountChanged +- || type.detailType() == QQmlProfilerDefinitions::PixmapCacheCountChanged) { ++ } else if (type.detailType() == PixmapReferenceCountChanged ++ || type.detailType() == PixmapCacheCountChanged) { + stream.writeAttribute("refCount", event, 1); + } +- } else if (type.message() == QQmlProfilerDefinitions::SceneGraphFrame) { ++ } else if (type.message() == SceneGraphFrame) { + stream.writeAttribute("timing1", event, 0, false); + stream.writeAttribute("timing2", event, 1, false); + stream.writeAttribute("timing3", event, 2, false); + stream.writeAttribute("timing4", event, 3, false); + stream.writeAttribute("timing5", event, 4, false); +- } else if (type.message() == QQmlProfilerDefinitions::MemoryAllocation) { ++ } else if (type.message() == MemoryAllocation) { + stream.writeAttribute("amount", event, 0); + } + stream.writeEndElement(); + }; + + QQueue pointEvents; +- QQueue rangeStarts[QQmlProfilerDefinitions::MaximumRangeType]; +- QStack rangeEnds[QQmlProfilerDefinitions::MaximumRangeType]; ++ QQueue rangeStarts[MaximumRangeType]; ++ QStack rangeEnds[MaximumRangeType]; + int level = 0; + + auto sendPending = [&]() { + forever { +- int minimum = QQmlProfilerDefinitions::MaximumRangeType; ++ int minimum = MaximumRangeType; + qint64 minimumTime = std::numeric_limits::max(); +- for (int i = 0; i < QQmlProfilerDefinitions::MaximumRangeType; ++i) { ++ for (int i = 0; i < MaximumRangeType; ++i) { + const QQueue &starts = rangeStarts[i]; + if (starts.isEmpty()) + continue; +@@ -529,7 +525,7 @@ + minimum = i; + } + } +- if (minimum == QQmlProfilerDefinitions::MaximumRangeType) ++ if (minimum == MaximumRangeType) + break; + + while (!pointEvents.isEmpty() && pointEvents.front().timestamp() < minimumTime) +@@ -543,15 +539,15 @@ + for (const QQmlProfilerEvent &event : qAsConst(d->events)) { + const QQmlProfilerEventType &type = d->eventTypes.at(event.typeIndex()); + +- if (type.rangeType() != QQmlProfilerDefinitions::MaximumRangeType) { ++ if (type.rangeType() != MaximumRangeType) { + QQueue &starts = rangeStarts[type.rangeType()]; + switch (event.rangeStage()) { +- case QQmlProfilerDefinitions::RangeStart: { ++ case RangeStart: { + ++level; + starts.enqueue(event); + break; + } +- case QQmlProfilerDefinitions::RangeEnd: { ++ case RangeEnd: { + QStack &ends = rangeEnds[type.rangeType()]; + if (starts.length() > ends.length()) { + ends.push(event.timestamp()); +@@ -571,7 +567,7 @@ + } + } + +- for (int i = 0; i < QQmlProfilerDefinitions::MaximumRangeType; ++i) { ++ for (int i = 0; i < MaximumRangeType; ++i) { + while (rangeEnds[i].length() < rangeStarts[i].length()) { + rangeEnds[i].push(d->traceEndTime); + --level; +--- a/tools/qmlprofiler/qmlprofilerdata.h ++++ b/tools/qmlprofiler/qmlprofilerdata.h +@@ -29,7 +29,7 @@ + #ifndef QMLPROFILERDATA_H + #define QMLPROFILERDATA_H + +-#include ++#include + #include + #include + +@@ -55,8 +55,8 @@ + void addEvent(const QQmlProfilerEvent &event) override; + + static QString getHashStringForQmlEvent(const QQmlProfilerEventLocation &location, int eventType); +- static QString qmlRangeTypeAsString(QQmlProfilerDefinitions::RangeType type); +- static QString qmlMessageAsString(QQmlProfilerDefinitions::Message type); ++ static QString qmlRangeTypeAsString(RangeType type); ++ static QString qmlMessageAsString(Message type); + + qint64 traceStartTime() const; + qint64 traceEndTime() const; +--- /dev/null ++++ b/include/QtQmlDebug/5.11.0/QtQmlDebug/private/qqmlprofilerclientdefinitions_p.h +@@ -0,0 +1 @@ ++#include "../../../../../src/qmldebug/qqmlprofilerclientdefinitions_p.h" diff -Nru qtdeclarative-opensource-src-5.10.1/debian/patches/5.11.1/0006-Use-different-buffer-for-indices-and-vertices-only-i.patch qtdeclarative-opensource-src-5.11.0/debian/patches/5.11.1/0006-Use-different-buffer-for-indices-and-vertices-only-i.patch --- qtdeclarative-opensource-src-5.10.1/debian/patches/5.11.1/0006-Use-different-buffer-for-indices-and-vertices-only-i.patch 1970-01-01 00:00:00.000000000 +0000 +++ qtdeclarative-opensource-src-5.11.0/debian/patches/5.11.1/0006-Use-different-buffer-for-indices-and-vertices-only-i.patch 2018-06-18 10:48:23.000000000 +0000 @@ -0,0 +1,383 @@ +From 5cc8db797a88a0b2654876e768ba9cdebc053534 Mon Sep 17 00:00:00 2001 +From: Jesus Fernandez +Date: Mon, 5 Feb 2018 17:20:08 +0100 +Subject: [PATCH 06/65] Use different buffer for indices and vertices only in + the WebGL plugin + +This patch partially reverts 098ba086530ccd555369a9ea88f3c6668726ab81. +Only QtWebGL will use separate buffers for indices and vertices. This +patch gives a performance boost. + +Task-number: QTBUG-66191 +Task-number: QTBUG-67147 +Change-Id: I58b4db2bdf44cd954390e85e079de82031caf9e5 +Reviewed-by: Edward Welbourne +Reviewed-by: Qt CI Bot +--- + .../scenegraph/coreapi/qsgbatchrenderer.cpp | 117 ++++++------------ + .../scenegraph/coreapi/qsgbatchrenderer_p.h | 10 +- + .../scenegraph/qsgdefaultrendercontext.cpp | 12 ++ + .../scenegraph/qsgdefaultrendercontext_p.h | 3 +- + src/quick/scenegraph/scenegraph.pri | 1 - + 5 files changed, 54 insertions(+), 89 deletions(-) + +diff --git a/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp b/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp +index ba7155130..afe338049 100644 +--- a/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp ++++ b/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp +@@ -775,9 +775,7 @@ Renderer::Renderer(QSGDefaultRenderContext *ctx) + , m_currentClip(nullptr) + , m_currentClipType(NoClip) + , m_vertexUploadPool(256) +-#ifdef QSG_SEPARATE_INDEX_BUFFER + , m_indexUploadPool(64) +-#endif + , m_vao(nullptr) + , m_visualizeMode(VisualizeNothing) + { +@@ -834,12 +832,11 @@ static void qsg_wipeBuffer(Buffer *buffer, QOpenGLFunctions *funcs) + free(buffer->data); + } + +-static void qsg_wipeBatch(Batch *batch, QOpenGLFunctions *funcs) ++static void qsg_wipeBatch(Batch *batch, QOpenGLFunctions *funcs, bool separateIndexBuffer) + { + qsg_wipeBuffer(&batch->vbo, funcs); +-#ifdef QSG_SEPARATE_INDEX_BUFFER +- qsg_wipeBuffer(&batch->ibo, funcs); +-#endif ++ if (separateIndexBuffer) ++ qsg_wipeBuffer(&batch->ibo, funcs); + delete batch; + } + +@@ -847,9 +844,13 @@ Renderer::~Renderer() + { + if (QOpenGLContext::currentContext()) { + // Clean up batches and buffers +- for (int i=0; iseparateIndexBuffer(); ++ for (int i = 0; i < m_opaqueBatches.size(); ++i) ++ qsg_wipeBatch(m_opaqueBatches.at(i), this, separateIndexBuffer); ++ for (int i = 0; i < m_alphaBatches.size(); ++i) ++ qsg_wipeBatch(m_alphaBatches.at(i), this, separateIndexBuffer); ++ for (int i = 0; i < m_batchPool.size(); ++i) ++ qsg_wipeBatch(m_batchPool.at(i), this, separateIndexBuffer); + } + + for (Node *n : qAsConst(m_nodes)) +@@ -889,13 +890,8 @@ void Renderer::map(Buffer *buffer, int byteSize, bool isIndexBuf) + if (!m_context->hasBrokenIndexBufferObjects() && m_visualizeMode == VisualizeNothing) { + // Common case, use a shared memory pool for uploading vertex data to avoid + // excessive reevaluation +- QDataBuffer &pool = +-#ifdef QSG_SEPARATE_INDEX_BUFFER +- isIndexBuf ? m_indexUploadPool : m_vertexUploadPool; +-#else +- m_vertexUploadPool; +- Q_UNUSED(isIndexBuf); +-#endif ++ QDataBuffer &pool = m_context->separateIndexBuffer() && isIndexBuf ++ ? m_indexUploadPool : m_vertexUploadPool; + if (byteSize > pool.size()) + pool.resize(byteSize); + buffer->data = pool.data(); +@@ -1864,11 +1860,11 @@ void Renderer::uploadBatch(Batch *b) + ibufferSize = unmergedIndexSize; + } + +-#ifdef QSG_SEPARATE_INDEX_BUFFER +- map(&b->ibo, ibufferSize, true); +-#else +- bufferSize += ibufferSize; +-#endif ++ const bool separateIndexBuffer = m_context->separateIndexBuffer(); ++ if (separateIndexBuffer) ++ map(&b->ibo, ibufferSize, true); ++ else ++ bufferSize += ibufferSize; + map(&b->vbo, bufferSize); + + if (Q_UNLIKELY(debug_upload())) qDebug() << " - batch" << b << " first:" << b->first << " root:" +@@ -1878,22 +1874,17 @@ void Renderer::uploadBatch(Batch *b) + if (b->merged) { + char *vertexData = b->vbo.data; + char *zData = vertexData + b->vertexCount * g->sizeOfVertex(); +-#ifdef QSG_SEPARATE_INDEX_BUFFER +- char *indexData = b->ibo.data; +-#else +- char *indexData = zData + (m_useDepthBuffer ? b->vertexCount * sizeof(float) : 0); +-#endif ++ char *indexData = separateIndexBuffer ++ ? b->ibo.data ++ : zData + (int(m_useDepthBuffer) * b->vertexCount * sizeof(float)); + + quint16 iOffset = 0; + e = b->first; + int verticesInSet = 0; + int indicesInSet = 0; + b->drawSets.reset(); +-#ifdef QSG_SEPARATE_INDEX_BUFFER +- int drawSetIndices = 0; +-#else +- int drawSetIndices = indexData - vertexData; +-#endif ++ int drawSetIndices = separateIndexBuffer ? 0 : indexData - vertexData; ++ const auto indexBase = separateIndexBuffer ? b->ibo.data : b->vbo.data; + b->drawSets << DrawSet(0, zData - vertexData, drawSetIndices); + while (e) { + verticesInSet += e->node->geometry()->vertexCount(); +@@ -1903,11 +1894,7 @@ void Renderer::uploadBatch(Batch *b) + b->drawSets.last().indices += 1 * sizeof(quint16); + b->drawSets.last().indexCount -= 2; + } +-#ifdef QSG_SEPARATE_INDEX_BUFFER +- drawSetIndices = indexData - b->ibo.data; +-#else +- drawSetIndices = indexData - b->vbo.data; +-#endif ++ drawSetIndices = indexData - indexBase; + b->drawSets << DrawSet(vertexData - b->vbo.data, + zData - b->vbo.data, + drawSetIndices); +@@ -1927,11 +1914,8 @@ void Renderer::uploadBatch(Batch *b) + } + } else { + char *vboData = b->vbo.data; +-#ifdef QSG_SEPARATE_INDEX_BUFFER +- char *iboData = b->ibo.data; +-#else +- char *iboData = vboData + b->vertexCount * g->sizeOfVertex(); +-#endif ++ char *iboData = separateIndexBuffer ? b->ibo.data ++ : vboData + b->vertexCount * g->sizeOfVertex(); + Element *e = b->first; + while (e) { + QSGGeometry *g = e->node->geometry(); +@@ -1979,12 +1963,9 @@ void Renderer::uploadBatch(Batch *b) + } + + if (!b->drawSets.isEmpty()) { +- const quint16 *id = +-# ifdef QSG_SEPARATE_INDEX_BUFFER +- (const quint16 *) (b->ibo.data); +-# else +- (const quint16 *) (b->vbo.data + b->drawSets.at(0).indices); +-# endif ++ const quint16 *id = (const quint16 *)(separateIndexBuffer ++ ? b->ibo.data ++ : b->vbo.data + b->drawSets.at(0).indices); + { + QDebug iDump = qDebug(); + iDump << " -- Index Data, count:" << b->indexCount; +@@ -2004,9 +1985,8 @@ void Renderer::uploadBatch(Batch *b) + #endif // QT_NO_DEBUG_OUTPUT + + unmap(&b->vbo); +-#ifdef QSG_SEPARATE_INDEX_BUFFER +- unmap(&b->ibo, true); +-#endif ++ if (separateIndexBuffer) ++ unmap(&b->ibo, true); + + if (Q_UNLIKELY(debug_upload())) qDebug() << " --- vertex/index buffers unmapped, batch upload completed..."; + +@@ -2299,11 +2279,7 @@ void Renderer::renderMergedBatch(const Batch *batch) + glBindBuffer(GL_ARRAY_BUFFER, batch->vbo.id); + + char *indexBase = nullptr; +-#ifdef QSG_SEPARATE_INDEX_BUFFER +- const Buffer *indexBuf = &batch->ibo; +-#else +- const Buffer *indexBuf = &batch->vbo; +-#endif ++ const Buffer *indexBuf = m_context->separateIndexBuffer() ? &batch->ibo : &batch->vbo; + if (m_context->hasBrokenIndexBufferObjects()) { + indexBase = indexBuf->data; + glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0); +@@ -2395,11 +2371,8 @@ void Renderer::renderUnmergedBatch(const Batch *batch) + + glBindBuffer(GL_ARRAY_BUFFER, batch->vbo.id); + char *indexBase = nullptr; +-#ifdef QSG_SEPARATE_INDEX_BUFFER +- const Buffer *indexBuf = &batch->ibo; +-#else +- const Buffer *indexBuf = &batch->vbo; +-#endif ++ const auto separateIndexBuffer = m_context->separateIndexBuffer(); ++ const Buffer *indexBuf = separateIndexBuffer ? &batch->ibo : &batch->vbo; + if (batch->indexCount) { + if (m_context->hasBrokenIndexBufferObjects()) { + indexBase = indexBuf->data; +@@ -2428,11 +2401,9 @@ void Renderer::renderUnmergedBatch(const Batch *batch) + } + + int vOffset = 0; +-#ifdef QSG_SEPARATE_INDEX_BUFFER + char *iOffset = indexBase; +-#else +- char *iOffset = indexBase + batch->vertexCount * gn->geometry()->sizeOfVertex(); +-#endif ++ if (!separateIndexBuffer) ++ iOffset += batch->vertexCount * gn->geometry()->sizeOfVertex(); + + QMatrix4x4 rootMatrix = batch->root ? qsg_matrixForRoot(batch->root) : QMatrix4x4(); + +@@ -2735,17 +2706,13 @@ void Renderer::render() + if (Q_UNLIKELY(debug_render())) timeSorting = timer.restart(); + + int largestVBO = 0; +-#ifdef QSG_SEPARATE_INDEX_BUFFER + int largestIBO = 0; +-#endif + + if (Q_UNLIKELY(debug_upload())) qDebug("Uploading Opaque Batches:"); + for (int i=0; ivbo.size, largestVBO); +-#ifdef QSG_SEPARATE_INDEX_BUFFER + largestIBO = qMax(b->ibo.size, largestIBO); +-#endif + uploadBatch(b); + } + if (Q_UNLIKELY(debug_render())) timeUploadOpaque = timer.restart(); +@@ -2756,18 +2723,14 @@ void Renderer::render() + Batch *b = m_alphaBatches.at(i); + uploadBatch(b); + largestVBO = qMax(b->vbo.size, largestVBO); +-#ifdef QSG_SEPARATE_INDEX_BUFFER + largestIBO = qMax(b->ibo.size, largestIBO); +-#endif + } + if (Q_UNLIKELY(debug_render())) timeUploadAlpha = timer.restart(); + + if (largestVBO * 2 < m_vertexUploadPool.size()) + m_vertexUploadPool.resize(largestVBO * 2); +-#ifdef QSG_SEPARATE_INDEX_BUFFER +- if (largestIBO * 2 < m_indexUploadPool.size()) ++ if (m_context->separateIndexBuffer() && largestIBO * 2 < m_indexUploadPool.size()) + m_indexUploadPool.resize(largestIBO * 2); +-#endif + + renderBatches(); + +@@ -2978,14 +2941,12 @@ void Renderer::visualizeBatch(Batch *b) + + if (b->merged) { + shader->setUniformValue(shader->matrix, matrix); ++ const auto &dataStart = m_context->separateIndexBuffer() ? b->ibo.data : b->vbo.data; + for (int ds=0; dsdrawSets.size(); ++ds) { + const DrawSet &set = b->drawSets.at(ds); + glVertexAttribPointer(a.position, 2, a.type, false, g->sizeOfVertex(), (void *) (qintptr) (set.vertices)); +-#ifdef QSG_SEPARATE_INDEX_BUFFER +- glDrawElements(g->drawingMode(), set.indexCount, GL_UNSIGNED_SHORT, (void *) (qintptr) (b->ibo.data + set.indices)); +-#else +- glDrawElements(g->drawingMode(), set.indexCount, GL_UNSIGNED_SHORT, (void *) (qintptr) (b->vbo.data + set.indices)); +-#endif ++ glDrawElements(g->drawingMode(), set.indexCount, GL_UNSIGNED_SHORT, ++ (void *)(qintptr)(dataStart + set.indices)); + } + } else { + Element *e = b->first; +diff --git a/src/quick/scenegraph/coreapi/qsgbatchrenderer_p.h b/src/quick/scenegraph/coreapi/qsgbatchrenderer_p.h +index 918f3ce82..12b48c145 100644 +--- a/src/quick/scenegraph/coreapi/qsgbatchrenderer_p.h ++++ b/src/quick/scenegraph/coreapi/qsgbatchrenderer_p.h +@@ -433,9 +433,7 @@ struct Batch + mutable uint uploadedThisFrame : 1; // solely for debugging purposes + + Buffer vbo; +-#ifdef QSG_SEPARATE_INDEX_BUFFER + Buffer ibo; +-#endif + + QDataBuffer drawSets; + }; +@@ -738,9 +736,7 @@ private: + ClipType m_currentClipType; + + QDataBuffer m_vertexUploadPool; +-#ifdef QSG_SEPARATE_INDEX_BUFFER + QDataBuffer m_indexUploadPool; +-#endif + // For minimal OpenGL core profile support + QOpenGLVertexArrayObject *m_vao; + +@@ -760,10 +756,8 @@ Batch *Renderer::newBatch() + m_batchPool.resize(size - 1); + } else { + b = new Batch(); +- memset(&b->vbo, 0, sizeof(Buffer)); +-#ifdef QSG_SEPARATE_INDEX_BUFFER +- memset(&b->ibo, 0, sizeof(Buffer)); +-#endif ++ Q_ASSERT(offsetof(Batch, ibo) == sizeof(Buffer) + offsetof(Batch, vbo)); ++ memset(&b->vbo, 0, sizeof(Buffer) * 2); // Clear VBO & IBO + } + b->init(); + return b; +diff --git a/src/quick/scenegraph/qsgdefaultrendercontext.cpp b/src/quick/scenegraph/qsgdefaultrendercontext.cpp +index 788249606..22e97a2dc 100644 +--- a/src/quick/scenegraph/qsgdefaultrendercontext.cpp ++++ b/src/quick/scenegraph/qsgdefaultrendercontext.cpp +@@ -39,6 +39,7 @@ + + #include "qsgdefaultrendercontext_p.h" + ++#include + #include + + #include +@@ -317,6 +318,17 @@ QSGDefaultRenderContext *QSGDefaultRenderContext::from(QOpenGLContext *context) + return qobject_cast(context->property(QSG_RENDERCONTEXT_PROPERTY).value()); + } + ++bool QSGDefaultRenderContext::separateIndexBuffer() const ++{ ++ // WebGL: A given WebGLBuffer object may only be bound to one of ++ // the ARRAY_BUFFER or ELEMENT_ARRAY_BUFFER target in its ++ // lifetime. An attempt to bind a buffer object to the other ++ // target will generate an INVALID_OPERATION error, and the ++ // current binding will remain untouched. ++ static const bool isWebGL = qGuiApp->platformName().compare(QLatin1String("webgl")) == 0; ++ return isWebGL; ++} ++ + QSGDistanceFieldGlyphCache *QSGDefaultRenderContext::distanceFieldGlyphCache(const QRawFont &font) + { + QString key = fontKey(font); +diff --git a/src/quick/scenegraph/qsgdefaultrendercontext_p.h b/src/quick/scenegraph/qsgdefaultrendercontext_p.h +index eb62586a9..57aa4b4c9 100644 +--- a/src/quick/scenegraph/qsgdefaultrendercontext_p.h ++++ b/src/quick/scenegraph/qsgdefaultrendercontext_p.h +@@ -95,6 +95,7 @@ public: + + bool hasBrokenIndexBufferObjects() const { return m_brokenIBOs; } + int maxTextureSize() const override { return m_maxTextureSize; } ++ bool separateIndexBuffer() const; + + protected: + static QString fontKey(const QRawFont &font); +@@ -106,8 +107,6 @@ protected: + bool m_serializedRender; + bool m_attachToGLContext; + QSGAtlasTexture::Manager *m_atlasManager; +- +- + }; + + QT_END_NAMESPACE +diff --git a/src/quick/scenegraph/scenegraph.pri b/src/quick/scenegraph/scenegraph.pri +index 4fa3e7b6b..4f9863848 100644 +--- a/src/quick/scenegraph/scenegraph.pri ++++ b/src/quick/scenegraph/scenegraph.pri +@@ -1,4 +1,3 @@ +-# DEFINES += QSG_SEPARATE_INDEX_BUFFER + # DEFINES += QSG_DISTANCEFIELD_CACHE_DEBUG + + # Core API +-- +2.17.0 + diff -Nru qtdeclarative-opensource-src-5.10.1/debian/patches/5.11.1/0007-Make-the-shared-test-code-independent-of-QtQml.patch qtdeclarative-opensource-src-5.11.0/debian/patches/5.11.1/0007-Make-the-shared-test-code-independent-of-QtQml.patch --- qtdeclarative-opensource-src-5.10.1/debian/patches/5.11.1/0007-Make-the-shared-test-code-independent-of-QtQml.patch 1970-01-01 00:00:00.000000000 +0000 +++ qtdeclarative-opensource-src-5.11.0/debian/patches/5.11.1/0007-Make-the-shared-test-code-independent-of-QtQml.patch 2018-06-18 10:48:23.000000000 +0000 @@ -0,0 +1,310 @@ +From ac6e893c5c7b43cfc50c25bebee1dfd4d3840124 Mon Sep 17 00:00:00 2001 +From: Ulf Hermann +Date: Mon, 23 Apr 2018 13:57:11 +0200 +Subject: [PATCH 07/65] Make the shared test code independent of QtQml + +This enables us to drop the QML dependency from a number of tests. This +is desirable because we want to test that we didn't do any incompatible +changes to the debug framework. + +Change-Id: I937dd45d3079eac15c200c9d68bb4c911f61afc0 +Reviewed-by: Simon Hausmann +--- + .../qdebugmessageservice.pro | 2 +- + .../qpacketprotocol/qpacketprotocol.pro | 2 +- + .../qqmldebuglocal/tst_qqmldebuglocal.cpp | 1 - + .../qqmlenginecontrol/qqmlenginecontrol.pro | 2 +- + ...qmlenginedebuginspectorintegrationtest.pro | 2 +- + .../qqmlenginedebugservice.pro | 2 +- + .../debugger/qqmlinspector/qqmlinspector.pro | 2 +- + .../qqmlprofilerservice.pro | 2 +- + .../tst_qqmlprofilerservice.cpp | 1 - + tests/auto/qml/debugger/shared/debugutil.cpp | 16 ++++++---- + .../qqmlmoduleplugin/tst_qqmlmoduleplugin.cpp | 28 +++++++++++++++-- + tests/auto/shared/util.cpp | 30 ------------------- + tests/auto/shared/util.h | 6 ---- + 13 files changed, 44 insertions(+), 52 deletions(-) + +diff --git a/tests/auto/qml/debugger/qdebugmessageservice/qdebugmessageservice.pro b/tests/auto/qml/debugger/qdebugmessageservice/qdebugmessageservice.pro +index 9cf323ba3..3f2c0ca39 100644 +--- a/tests/auto/qml/debugger/qdebugmessageservice/qdebugmessageservice.pro ++++ b/tests/auto/qml/debugger/qdebugmessageservice/qdebugmessageservice.pro +@@ -1,6 +1,6 @@ + CONFIG += testcase + TARGET = tst_qdebugmessageservice +-QT += qml network testlib gui-private core-private ++QT += network testlib gui-private core-private + osx:CONFIG -= app_bundle + + SOURCES += tst_qdebugmessageservice.cpp +diff --git a/tests/auto/qml/debugger/qpacketprotocol/qpacketprotocol.pro b/tests/auto/qml/debugger/qpacketprotocol/qpacketprotocol.pro +index b1e383584..dc0120cd8 100644 +--- a/tests/auto/qml/debugger/qpacketprotocol/qpacketprotocol.pro ++++ b/tests/auto/qml/debugger/qpacketprotocol/qpacketprotocol.pro +@@ -6,4 +6,4 @@ SOURCES += tst_qpacketprotocol.cpp + + include(../shared/debugutil.pri) + +-QT += qml network testlib gui-private core-private ++QT += network testlib gui-private core-private +diff --git a/tests/auto/qml/debugger/qqmldebuglocal/tst_qqmldebuglocal.cpp b/tests/auto/qml/debugger/qqmldebuglocal/tst_qqmldebuglocal.cpp +index 9f0501241..5b3c0c524 100644 +--- a/tests/auto/qml/debugger/qqmldebuglocal/tst_qqmldebuglocal.cpp ++++ b/tests/auto/qml/debugger/qqmldebuglocal/tst_qqmldebuglocal.cpp +@@ -32,7 +32,6 @@ + #include + #include + +-#include + #include + + #include +diff --git a/tests/auto/qml/debugger/qqmlenginecontrol/qqmlenginecontrol.pro b/tests/auto/qml/debugger/qqmlenginecontrol/qqmlenginecontrol.pro +index 73455bd90..36957628b 100644 +--- a/tests/auto/qml/debugger/qqmlenginecontrol/qqmlenginecontrol.pro ++++ b/tests/auto/qml/debugger/qqmlenginecontrol/qqmlenginecontrol.pro +@@ -8,7 +8,7 @@ include(../shared/debugutil.pri) + + TESTDATA = data/* + +-QT += core qml testlib gui-private core-private ++QT += core testlib gui-private core-private + + OTHER_FILES += \ + data/test.qml \ +diff --git a/tests/auto/qml/debugger/qqmlenginedebuginspectorintegrationtest/qqmlenginedebuginspectorintegrationtest.pro b/tests/auto/qml/debugger/qqmlenginedebuginspectorintegrationtest/qqmlenginedebuginspectorintegrationtest.pro +index 5f58e5ec7..54244c6d1 100644 +--- a/tests/auto/qml/debugger/qqmlenginedebuginspectorintegrationtest/qqmlenginedebuginspectorintegrationtest.pro ++++ b/tests/auto/qml/debugger/qqmlenginedebuginspectorintegrationtest/qqmlenginedebuginspectorintegrationtest.pro +@@ -1,7 +1,7 @@ + CONFIG += testcase + TARGET = tst_qqmlenginedebuginspectorintegration + +-QT += qml testlib gui-private core-private ++QT += testlib gui-private core-private + osx:CONFIG -= app_bundle + + SOURCES += tst_qqmlenginedebuginspectorintegration.cpp +diff --git a/tests/auto/qml/debugger/qqmlenginedebugservice/qqmlenginedebugservice.pro b/tests/auto/qml/debugger/qqmlenginedebugservice/qqmlenginedebugservice.pro +index 33ee023c0..ed4224446 100644 +--- a/tests/auto/qml/debugger/qqmlenginedebugservice/qqmlenginedebugservice.pro ++++ b/tests/auto/qml/debugger/qqmlenginedebugservice/qqmlenginedebugservice.pro +@@ -10,4 +10,4 @@ include(../shared/debugutil.pri) + + DEFINES += QT_QML_DEBUG_NO_WARNING + +-QT += core-private qml-private quick-private testlib gui-private ++QT += quick qml-private testlib +diff --git a/tests/auto/qml/debugger/qqmlinspector/qqmlinspector.pro b/tests/auto/qml/debugger/qqmlinspector/qqmlinspector.pro +index fd07255ae..3d4473c69 100644 +--- a/tests/auto/qml/debugger/qqmlinspector/qqmlinspector.pro ++++ b/tests/auto/qml/debugger/qqmlinspector/qqmlinspector.pro +@@ -1,7 +1,7 @@ + CONFIG += testcase + TARGET = tst_qqmlinspector + +-QT += qml testlib gui-private core-private ++QT += testlib gui-private core-private + osx:CONFIG -= app_bundle + + SOURCES += tst_qqmlinspector.cpp +diff --git a/tests/auto/qml/debugger/qqmlprofilerservice/qqmlprofilerservice.pro b/tests/auto/qml/debugger/qqmlprofilerservice/qqmlprofilerservice.pro +index 7c78b5fcb..2a685ed87 100644 +--- a/tests/auto/qml/debugger/qqmlprofilerservice/qqmlprofilerservice.pro ++++ b/tests/auto/qml/debugger/qqmlprofilerservice/qqmlprofilerservice.pro +@@ -8,7 +8,7 @@ include(../shared/debugutil.pri) + + TESTDATA = data/* + +-QT += core qml testlib testlib-private gui-private core-private ++QT += testlib gui-private + + OTHER_FILES += \ + data/pixmapCacheTest.qml \ +diff --git a/tests/auto/qml/debugger/qqmlprofilerservice/tst_qqmlprofilerservice.cpp b/tests/auto/qml/debugger/qqmlprofilerservice/tst_qqmlprofilerservice.cpp +index a6fbdf41e..3cb315b35 100644 +--- a/tests/auto/qml/debugger/qqmlprofilerservice/tst_qqmlprofilerservice.cpp ++++ b/tests/auto/qml/debugger/qqmlprofilerservice/tst_qqmlprofilerservice.cpp +@@ -34,7 +34,6 @@ + #include + + #include +-#include + #include + + #include +diff --git a/tests/auto/qml/debugger/shared/debugutil.cpp b/tests/auto/qml/debugger/shared/debugutil.cpp +index 8ecbe5382..b118b22c6 100644 +--- a/tests/auto/qml/debugger/shared/debugutil.cpp ++++ b/tests/auto/qml/debugger/shared/debugutil.cpp +@@ -31,8 +31,6 @@ + + #include + +-#include +- + #include + #include + +@@ -52,15 +50,23 @@ bool QQmlDebugTest::waitForSignal(QObject *receiver, const char *member, int tim + QList QQmlDebugTest::createOtherClients(QQmlDebugConnection *connection) + { + QList ret; +- foreach (const QString &service, QQmlDebuggingEnabler::debuggerServices()) { ++ ++ static const auto debuggerServices ++ = QStringList({"V8Debugger", "QmlDebugger", "DebugMessages"}); ++ static const auto inspectorServices ++ = QStringList({"QmlInspector"}); ++ static const auto profilerServices ++ = QStringList({"CanvasFrameRate", "EngineControl", "DebugMessages"}); ++ ++ for (const QString &service : debuggerServices) { + if (!connection->client(service)) + ret << new QQmlDebugClient(service, connection); + } +- foreach (const QString &service, QQmlDebuggingEnabler::inspectorServices()) { ++ for (const QString &service : inspectorServices) { + if (!connection->client(service)) + ret << new QQmlDebugClient(service, connection); + } +- foreach (const QString &service, QQmlDebuggingEnabler::profilerServices()) { ++ for (const QString &service : profilerServices) { + if (!connection->client(service)) + ret << new QQmlDebugClient(service, connection); + } +diff --git a/tests/auto/qml/qqmlmoduleplugin/tst_qqmlmoduleplugin.cpp b/tests/auto/qml/qqmlmoduleplugin/tst_qqmlmoduleplugin.cpp +index fac3ff15f..97ca3fa1d 100644 +--- a/tests/auto/qml/qqmlmoduleplugin/tst_qqmlmoduleplugin.cpp ++++ b/tests/auto/qml/qqmlmoduleplugin/tst_qqmlmoduleplugin.cpp +@@ -29,6 +29,7 @@ + #include + #include + #include ++#include + #include + #include + #include +@@ -332,6 +333,29 @@ void tst_qqmlmoduleplugin::remoteImportWithUnquotedUri() + VERIFY_ERRORS(0); + } + ++static QByteArray msgComponentError(const QQmlComponent &c, const QQmlEngine *engine /* = 0 */) ++{ ++ QString result; ++ const QList errors = c.errors(); ++ QTextStream str(&result); ++ str << "Component '" << c.url().toString() << "' has " << errors.size() << " errors: '"; ++ for (int i = 0; i < errors.size(); ++i) { ++ if (i) ++ str << ", '"; ++ str << errors.at(i).toString() << '\''; ++ } ++ if (!engine) { ++ if (QQmlContext *context = c.creationContext()) ++ engine = context->engine(); ++ } ++ if (engine) { ++ str << " Import paths: (" << engine->importPathList().join(QStringLiteral(", ")) ++ << ") Plugin paths: (" << engine->pluginPathList().join(QStringLiteral(", ")) ++ << ')'; ++ } ++ return result.toLocal8Bit(); ++} ++ + // QTBUG-17324 + + void tst_qqmlmoduleplugin::importsMixedQmlCppPlugin() +@@ -345,7 +369,7 @@ void tst_qqmlmoduleplugin::importsMixedQmlCppPlugin() + QQmlComponent component(&engine, testFileUrl(QStringLiteral("importsMixedQmlCppPlugin.qml"))); + + QObject *o = component.create(); +- QVERIFY2(o != nullptr, QQmlDataTest::msgComponentError(component, &engine)); ++ QVERIFY2(o != nullptr, msgComponentError(component, &engine)); + QCOMPARE(o->property("test").toBool(), true); + delete o; + } +@@ -354,7 +378,7 @@ void tst_qqmlmoduleplugin::importsMixedQmlCppPlugin() + QQmlComponent component(&engine, testFileUrl(QStringLiteral("importsMixedQmlCppPlugin.2.qml"))); + + QObject *o = component.create(); +- QVERIFY2(o != nullptr, QQmlDataTest::msgComponentError(component, &engine)); ++ QVERIFY2(o != nullptr, msgComponentError(component, &engine)); + QCOMPARE(o->property("test").toBool(), true); + QCOMPARE(o->property("test2").toBool(), true); + delete o; +diff --git a/tests/auto/shared/util.cpp b/tests/auto/shared/util.cpp +index 96beb5161..189398f0c 100644 +--- a/tests/auto/shared/util.cpp ++++ b/tests/auto/shared/util.cpp +@@ -28,11 +28,6 @@ + + #include "util.h" + +-#include +-#include +-#include +-#include +-#include + #include + #include + +@@ -72,31 +67,6 @@ QString QQmlDataTest::testFile(const QString &fileName) const + return result; + } + +-QByteArray QQmlDataTest::msgComponentError(const QQmlComponent &c, +- const QQmlEngine *engine /* = 0 */) +-{ +- QString result; +- const QList errors = c.errors(); +- QTextStream str(&result); +- str << "Component '" << c.url().toString() << "' has " << errors.size() +- << " errors: '"; +- for (int i = 0; i < errors.size(); ++i) { +- if (i) +- str << ", '"; +- str << errors.at(i).toString() << '\''; +- +- } +- if (!engine) +- if (QQmlContext *context = c.creationContext()) +- engine = context->engine(); +- if (engine) { +- str << " Import paths: (" << engine->importPathList().join(QStringLiteral(", ")) +- << ") Plugin paths: (" << engine->pluginPathList().join(QStringLiteral(", ")) +- << ')'; +- } +- return result.toLocal8Bit(); +-} +- + Q_GLOBAL_STATIC(QMutex, qQmlTestMessageHandlerMutex) + + QQmlTestMessageHandler *QQmlTestMessageHandler::m_instance = 0; +diff --git a/tests/auto/shared/util.h b/tests/auto/shared/util.h +index 33d7cbd1d..6f3f0a06a 100644 +--- a/tests/auto/shared/util.h ++++ b/tests/auto/shared/util.h +@@ -35,9 +35,6 @@ + #include + #include + +-QT_FORWARD_DECLARE_CLASS(QQmlComponent) +-QT_FORWARD_DECLARE_CLASS(QQmlEngine) +- + /* Base class for tests with data that are located in a "data" subfolder. */ + + class QQmlDataTest : public QObject +@@ -61,9 +58,6 @@ public: + + static inline QQmlDataTest *instance() { return m_instance; } + +- static QByteArray msgComponentError(const QQmlComponent &, +- const QQmlEngine *engine = 0); +- + public slots: + virtual void initTestCase(); + +-- +2.17.0 + diff -Nru qtdeclarative-opensource-src-5.10.1/debian/patches/5.11.1/0008-Fix-QQuickListViewPrivate-snapItemAt-for-lists-with-.patch qtdeclarative-opensource-src-5.11.0/debian/patches/5.11.1/0008-Fix-QQuickListViewPrivate-snapItemAt-for-lists-with-.patch --- qtdeclarative-opensource-src-5.10.1/debian/patches/5.11.1/0008-Fix-QQuickListViewPrivate-snapItemAt-for-lists-with-.patch 1970-01-01 00:00:00.000000000 +0000 +++ qtdeclarative-opensource-src-5.11.0/debian/patches/5.11.1/0008-Fix-QQuickListViewPrivate-snapItemAt-for-lists-with-.patch 2018-06-18 10:48:24.000000000 +0000 @@ -0,0 +1,130 @@ +From 281c24d9169396a62f409de6dce3545f8d48ca8b Mon Sep 17 00:00:00 2001 +From: Johan Klokkhammer Helsing +Date: Mon, 23 Apr 2018 13:13:31 +0200 +Subject: [PATCH 08/65] Fix QQuickListViewPrivate::snapItemAt for lists with + spacing + +If lists had spacing, snapping would have gaps where snapItemAt would +return nullptr eventhough there were items above and below in the list. + +I.e. if we have a list with items of size 100, and a spacing of 100, and +scroll to 110 (right below the first item), then the first item would fail +because this is false: + + itemTop+itemSize()/2 >= pos (50 >= 110) + +And the next item (the one we should have snapped to), would fail because +this is false: + + itemTop-prevItemSize/2 < pos (200-100/2 < 110) + +The meaning of first part was probably to see if the middle of the current +item is inside the view. + +The meaning of the second part was probably to see if the middle of the +previous item is outside the view. + +This patch refactors the code so it's more visible what's happening and +fixes the bug by taking the spacing into account when computing the position of +the halfway positions. + +Task-number: QTBUG-59852 +Change-Id: I60eec0d16e91d2f22d70b97d11bcde5d88ac2997 +Reviewed-by: Mitch Curtis +--- + src/quick/items/qquicklistview.cpp | 7 ++++- + .../data/snapToItemWithSpacing.qml | 18 +++++++++++++ + .../qquicklistview/tst_qquicklistview.cpp | 26 +++++++++++++++++++ + 3 files changed, 50 insertions(+), 1 deletion(-) + create mode 100644 tests/auto/quick/qquicklistview/data/snapToItemWithSpacing.qml + +diff --git a/src/quick/items/qquicklistview.cpp b/src/quick/items/qquicklistview.cpp +index 33becd71e..60f7efae1 100644 +--- a/src/quick/items/qquicklistview.cpp ++++ b/src/quick/items/qquicklistview.cpp +@@ -538,8 +538,13 @@ FxViewItem *QQuickListViewPrivate::snapItemAt(qreal pos) + qreal itemTop = item->position(); + if (highlight && itemTop >= pos && item->endPosition() <= pos + highlight->size()) + return item; +- if (itemTop+item->size()/2 >= pos && itemTop-prevItemSize/2 < pos) ++ ++ // Middle of item and spacing (i.e. the middle of the distance between this item and the next ++ qreal halfwayToNextItem = itemTop + (item->size()+spacing) / 2; ++ qreal halfwayToPrevItem = itemTop - (prevItemSize+spacing) / 2; ++ if (halfwayToNextItem >= pos && halfwayToPrevItem < pos) + snapItem = item; ++ + prevItemSize = item->size(); + } + return snapItem; +diff --git a/tests/auto/quick/qquicklistview/data/snapToItemWithSpacing.qml b/tests/auto/quick/qquicklistview/data/snapToItemWithSpacing.qml +new file mode 100644 +index 000000000..50b5abb20 +--- /dev/null ++++ b/tests/auto/quick/qquicklistview/data/snapToItemWithSpacing.qml +@@ -0,0 +1,18 @@ ++import QtQuick 2.0 ++ ++ListView { ++ width: 100 ++ height: 300 ++ snapMode: ListView.SnapToItem ++ spacing: 100 ++ model: 10 ++ delegate: Rectangle { ++ height: 100 ++ width: 100 ++ color: "blue" ++ Text { ++ anchors.centerIn: parent ++ text: index ++ } ++ } ++} +diff --git a/tests/auto/quick/qquicklistview/tst_qquicklistview.cpp b/tests/auto/quick/qquicklistview/tst_qquicklistview.cpp +index 8bc5575e3..4d3a66525 100644 +--- a/tests/auto/quick/qquicklistview/tst_qquicklistview.cpp ++++ b/tests/auto/quick/qquicklistview/tst_qquicklistview.cpp +@@ -176,6 +176,7 @@ private slots: + void creationContext(); + void snapToItem_data(); + void snapToItem(); ++ void snapToItemWithSpacing_QTBUG_59852(); + void snapOneItemResize_QTBUG_43555(); + void snapOneItem_data(); + void snapOneItem(); +@@ -5197,6 +5198,31 @@ void tst_QQuickListView::snapToItem() + + releaseView(window); + } ++void tst_QQuickListView::snapToItemWithSpacing_QTBUG_59852() ++{ ++ QQuickView *window = getView(); ++ ++ window->setSource(testFileUrl("snapToItemWithSpacing.qml")); ++ window->show(); ++ QVERIFY(QTest::qWaitForWindowExposed(window)); ++ ++ auto *listView = qobject_cast(window->rootObject()); ++ QVERIFY(listView); ++ ++ QTRY_COMPARE(QQuickItemPrivate::get(listView)->polishScheduled, false); ++ ++ // each item in the list is 100 pixels tall, and the spacing is 100 ++ ++ listView->setContentY(110); // this is right below the first item ++ listView->returnToBounds(); ++ QCOMPARE(listView->contentY(), 200); // the position of the second item ++ ++ listView->setContentY(60); // this is right below the middle of the first item ++ listView->returnToBounds(); ++ QCOMPARE(listView->contentY(), 0); // it's farther to go to the next item, so snaps to the first ++ ++ releaseView(window); ++} + + void tst_QQuickListView::snapOneItemResize_QTBUG_43555() + { +-- +2.17.0 + diff -Nru qtdeclarative-opensource-src-5.10.1/debian/patches/5.11.1/0009-Make-the-test-pass-on-my-high-resolution-screen.patch qtdeclarative-opensource-src-5.11.0/debian/patches/5.11.1/0009-Make-the-test-pass-on-my-high-resolution-screen.patch --- qtdeclarative-opensource-src-5.10.1/debian/patches/5.11.1/0009-Make-the-test-pass-on-my-high-resolution-screen.patch 1970-01-01 00:00:00.000000000 +0000 +++ qtdeclarative-opensource-src-5.11.0/debian/patches/5.11.1/0009-Make-the-test-pass-on-my-high-resolution-screen.patch 2018-06-18 10:48:24.000000000 +0000 @@ -0,0 +1,27 @@ +From f95c18b04e260a633d7a1d7cb0d3aaca01f9782f Mon Sep 17 00:00:00 2001 +From: Lars Knoll +Date: Fri, 20 Apr 2018 14:02:48 +0200 +Subject: [PATCH 09/65] Make the test pass on my high resolution screen + +Change-Id: I08e952fb8c19c21caf33ffb1cfdc260b533a01d9 +Reviewed-by: Shawn Rutledge +--- + .../tst_multipointtoucharea_interop.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/tests/auto/quick/pointerhandlers/multipointtoucharea_interop/tst_multipointtoucharea_interop.cpp b/tests/auto/quick/pointerhandlers/multipointtoucharea_interop/tst_multipointtoucharea_interop.cpp +index 8d8c915e3..4b096f9c3 100644 +--- a/tests/auto/quick/pointerhandlers/multipointtoucharea_interop/tst_multipointtoucharea_interop.cpp ++++ b/tests/auto/quick/pointerhandlers/multipointtoucharea_interop/tst_multipointtoucharea_interop.cpp +@@ -211,7 +211,7 @@ void tst_MptaInterop::touchesThenPinch() + pinchStoleGrab = i; + } + qCDebug(lcPointerTests) << "pinch started after" << pinchStoleGrab << "moves; ended with scale" << pinch->scale() << "rot" << pinch->rotation(); +- QTRY_VERIFY(pinch->rotation() > 8); ++ QTRY_VERIFY(pinch->rotation() > 4); + QVERIFY(pinch->scale() > 1); + + // Press one more point (pinkie finger) +-- +2.17.0 + diff -Nru qtdeclarative-opensource-src-5.10.1/debian/patches/5.11.1/0010-Add-handling-of-device-pixel-ratio-to-animated-sprit.patch qtdeclarative-opensource-src-5.11.0/debian/patches/5.11.1/0010-Add-handling-of-device-pixel-ratio-to-animated-sprit.patch --- qtdeclarative-opensource-src-5.10.1/debian/patches/5.11.1/0010-Add-handling-of-device-pixel-ratio-to-animated-sprit.patch 1970-01-01 00:00:00.000000000 +0000 +++ qtdeclarative-opensource-src-5.11.0/debian/patches/5.11.1/0010-Add-handling-of-device-pixel-ratio-to-animated-sprit.patch 2018-06-18 10:48:24.000000000 +0000 @@ -0,0 +1,275 @@ +From 22bb2f5b68dc9e3c3608629629460513bf213938 Mon Sep 17 00:00:00 2001 +From: Allan Sandfeld Jensen +Date: Wed, 25 Apr 2018 15:04:38 +0200 +Subject: [PATCH 10/65] Add handling of device pixel ratio to animated sprites +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Change-Id: I472f61241d1875daf0de0a597bf27c019314f48f +Task-number: QTBUG-50119 +Reviewed-by: Mitch Curtis +Reviewed-by: Morten Johan Sørvig +--- + src/particles/qquickimageparticle.cpp | 2 +- + src/quick/items/qquickanimatedsprite.cpp | 4 +- + src/quick/items/qquickimagebase_p.h | 2 +- + src/quick/items/qquicksprite.cpp | 7 ++- + src/quick/items/qquicksprite_p.h | 12 +++++ + src/quick/items/qquickspriteengine.cpp | 50 ++++++++++++------- + src/quick/items/qquickspritesequence.cpp | 2 +- + .../software/qsgsoftwarespritenode.cpp | 2 +- + 8 files changed, 56 insertions(+), 25 deletions(-) + +diff --git a/src/particles/qquickimageparticle.cpp b/src/particles/qquickimageparticle.cpp +index d2fb78d72..abd7793a7 100644 +--- a/src/particles/qquickimageparticle.cpp ++++ b/src/particles/qquickimageparticle.cpp +@@ -1321,7 +1321,7 @@ void QQuickImageParticle::finishBuildParticleNodes(QSGNode** node) + m_material = SpriteMaterial::createMaterial(); + if (imageLoaded) + getState(m_material)->texture = QSGPlainTexture::fromImage(image); +- getState(m_material)->animSheetSize = QSizeF(image.size()); ++ getState(m_material)->animSheetSize = QSizeF(image.size() / image.devicePixelRatioF()); + if (m_spriteEngine) + m_spriteEngine->setCount(m_count); + Q_FALLTHROUGH(); +diff --git a/src/quick/items/qquickanimatedsprite.cpp b/src/quick/items/qquickanimatedsprite.cpp +index 190c48ac8..887c30f99 100644 +--- a/src/quick/items/qquickanimatedsprite.cpp ++++ b/src/quick/items/qquickanimatedsprite.cpp +@@ -527,6 +527,8 @@ void QQuickAnimatedSprite::setSource(QUrl arg) + Q_D(QQuickAnimatedSprite); + + if (d->m_sprite->m_source != arg) { ++ const qreal targetDevicePixelRatio = (window() ? window()->effectiveDevicePixelRatio() : qApp->devicePixelRatio()); ++ d->m_sprite->setDevicePixelRatio(targetDevicePixelRatio); + d->m_sprite->setSource(arg); + Q_EMIT sourceChanged(arg); + reloadImage(); +@@ -713,7 +715,7 @@ QSGSpriteNode* QQuickAnimatedSprite::initNode() + + QSGSpriteNode *node = d->sceneGraphContext()->createSpriteNode(); + +- d->m_sheetSize = QSize(image.size()); ++ d->m_sheetSize = QSize(image.size() / image.devicePixelRatioF()); + node->setTexture(window()->createTextureFromImage(image)); + d->m_spriteEngine->start(0); + node->setTime(0.0f); +diff --git a/src/quick/items/qquickimagebase_p.h b/src/quick/items/qquickimagebase_p.h +index eb04a1d16..d8d0be9b8 100644 +--- a/src/quick/items/qquickimagebase_p.h ++++ b/src/quick/items/qquickimagebase_p.h +@@ -98,7 +98,7 @@ public: + virtual void setAutoTransform(bool transform); + bool autoTransform() const; + +- void resolve2xLocalFile(const QUrl &url, qreal targetDevicePixelRatio, QUrl *sourceUrl, qreal *sourceDevicePixelRatio); ++ static void resolve2xLocalFile(const QUrl &url, qreal targetDevicePixelRatio, QUrl *sourceUrl, qreal *sourceDevicePixelRatio); + + // Use a virtual rather than a signal->signal to avoid the huge + // connect/conneciton overhead for this rare case. +diff --git a/src/quick/items/qquicksprite.cpp b/src/quick/items/qquicksprite.cpp +index 6b8567439..8c59a6898 100644 +--- a/src/quick/items/qquicksprite.cpp ++++ b/src/quick/items/qquicksprite.cpp +@@ -38,6 +38,7 @@ + ****************************************************************************/ + + #include "qquicksprite_p.h" ++#include "qquickimagebase_p.h" + #include + #include + #include +@@ -222,6 +223,7 @@ QQuickSprite::QQuickSprite(QObject *parent) + , m_frameDuration(unsetDuration) + , m_frameDurationVariation(0) + , m_frameSync(false) ++ , m_devicePixelRatio(1.0) + { + } + +@@ -265,7 +267,10 @@ void QQuickSprite::startImageLoading() + if (!e) + qWarning() << "QQuickSprite: Cannot find QQmlEngine - this class is only for use in QML and may not work"; + } +- m_pix.load(e, m_source); ++ QUrl loadUrl = m_source; ++ QQuickImageBase::resolve2xLocalFile(m_source, m_devicePixelRatio, &loadUrl, &m_devicePixelRatio); ++ ++ m_pix.load(e, loadUrl); + } + } + +diff --git a/src/quick/items/qquicksprite_p.h b/src/quick/items/qquicksprite_p.h +index 8e119a80a..fab9e7519 100644 +--- a/src/quick/items/qquicksprite_p.h ++++ b/src/quick/items/qquicksprite_p.h +@@ -168,6 +168,16 @@ public: + return m_frameSync; + } + ++ void setDevicePixelRatio(qreal dpr) ++ { ++ m_devicePixelRatio = dpr; ++ } ++ ++ qreal devicePixelRatio() const ++ { ++ return m_devicePixelRatio; ++ } ++ + Q_SIGNALS: + + void sourceChanged(QUrl arg); +@@ -308,6 +318,7 @@ private: + friend class QQuickAnimatedSprite; + friend class QQuickSpriteEngine; + friend class QQuickStochasticEngine; ++ + int m_generatedCount; + int m_framesPerRow; + int m_rowY; +@@ -325,6 +336,7 @@ private: + int m_frameDuration; + int m_frameDurationVariation; + bool m_frameSync; ++ qreal m_devicePixelRatio; + QQuickPixmap m_pix; + }; + +diff --git a/src/quick/items/qquickspriteengine.cpp b/src/quick/items/qquickspriteengine.cpp +index 1fd15e61e..03f0fa94a 100644 +--- a/src/quick/items/qquickspriteengine.cpp ++++ b/src/quick/items/qquickspriteengine.cpp +@@ -390,6 +390,7 @@ QImage QQuickSpriteEngine::assembledImage(int maxSize) + int w = 0; + m_maxFrames = 0; + m_imageStateCount = 0; ++ qreal pixelRatio = 1.0; + + for (QQuickSprite* state : qAsConst(m_sprites)) { + if (state->frames() > m_maxFrames) +@@ -413,6 +414,8 @@ QImage QQuickSpriteEngine::assembledImage(int maxSize) + if (!state->m_frameHeight) + state->m_frameHeight = img.height(); + ++ pixelRatio = qMax(pixelRatio, state->devicePixelRatio()); ++ + if (state->frames() * state->frameWidth() > maxSize){ + struct helper{ + static int divRoundUp(int a, int b){return (a+b-1)/b;} +@@ -437,43 +440,58 @@ QImage QQuickSpriteEngine::assembledImage(int maxSize) + } + } + ++ if (h > maxSize){ ++ qWarning() << "SpriteEngine: Too many animations to fit in one texture..."; ++ qWarning() << "SpriteEngine: Your texture max size today is " << maxSize; ++ return QImage(); ++ } ++ + //maxFrames is max number in a line of the texture +- QImage image(w, h, QImage::Format_ARGB32_Premultiplied); ++ QImage image(w * pixelRatio, h * pixelRatio, QImage::Format_ARGB32_Premultiplied); ++ image.setDevicePixelRatio(pixelRatio); + image.fill(0); + QPainter p(&image); + int y = 0; + for (QQuickSprite* state : qAsConst(m_sprites)) { + QImage img(state->m_pix.image()); +- int frameWidth = state->m_frameWidth; +- int frameHeight = state->m_frameHeight; +- if (img.height() == frameHeight && img.width() < maxSize){//Simple case +- p.drawImage(0,y,img.copy(state->m_frameX,0,state->m_frames * frameWidth, frameHeight)); ++ const int frameWidth = state->m_frameWidth; ++ const int frameHeight = state->m_frameHeight; ++ const int imgHeight = img.height() / state->devicePixelRatio(); ++ const int imgWidth = img.width() / state->devicePixelRatio(); ++ if (imgHeight == frameHeight && imgWidth < maxSize){ //Simple case ++ p.drawImage(QRect(0, y, state->m_frames * frameWidth, frameHeight), ++ img, ++ QRect(state->m_frameX * state->devicePixelRatio(), 0, state->m_frames * frameWidth * state->devicePixelRatio(), frameHeight * state->devicePixelRatio())); + state->m_rowStartX = 0; + state->m_rowY = y; + y += frameHeight; +- }else{//Chopping up image case +- state->m_framesPerRow = image.width()/frameWidth; ++ } else { //Chopping up image case ++ state->m_framesPerRow = w/frameWidth; + state->m_rowY = y; + int x = 0; + int curX = state->m_frameX; + int curY = state->m_frameY; + int framesLeft = state->frames(); + while (framesLeft > 0){ +- if (image.width() - x + curX <= img.width()){//finish a row in image (dest) +- int copied = image.width() - x; ++ if (w - x + curX <= imgWidth){//finish a row in image (dest) ++ int copied = w - x; + framesLeft -= copied/frameWidth; +- p.drawImage(x,y,img.copy(curX,curY,copied,frameHeight)); ++ p.drawImage(QRect(x, y, copied, frameHeight), ++ img, ++ QRect(curX * state->devicePixelRatio(), curY * state->devicePixelRatio(), copied * state->devicePixelRatio(), frameHeight * state->devicePixelRatio())); + y += frameHeight; + curX += copied; + x = 0; +- if (curX == img.width()){ ++ if (curX == imgWidth){ + curX = 0; + curY += frameHeight; + } + }else{//finish a row in img (src) +- int copied = img.width() - curX; ++ int copied = imgWidth - curX; + framesLeft -= copied/frameWidth; +- p.drawImage(x,y,img.copy(curX,curY,copied,frameHeight)); ++ p.drawImage(QRect(x, y, copied, frameHeight), ++ img, ++ QRect(curX * state->devicePixelRatio(), curY * state->devicePixelRatio(), copied * state->devicePixelRatio(), frameHeight * state->devicePixelRatio())); + curY += frameHeight; + x += copied; + curX = 0; +@@ -484,12 +502,6 @@ QImage QQuickSpriteEngine::assembledImage(int maxSize) + } + } + +- if (image.height() > maxSize){ +- qWarning() << "SpriteEngine: Too many animations to fit in one texture..."; +- qWarning() << "SpriteEngine: Your texture max size today is " << maxSize; +- return QImage(); +- } +- + #ifdef SPRITE_IMAGE_DEBUG + QString fPath = QDir::tempPath() + "/SpriteImage.%1.png"; + int acc = 0; +diff --git a/src/quick/items/qquickspritesequence.cpp b/src/quick/items/qquickspritesequence.cpp +index 72761ab82..df6a6e336 100644 +--- a/src/quick/items/qquickspritesequence.cpp ++++ b/src/quick/items/qquickspritesequence.cpp +@@ -226,7 +226,7 @@ QSGSpriteNode *QQuickSpriteSequence::initNode() + + QSGSpriteNode *node = d->sceneGraphContext()->createSpriteNode(); + +- d->m_sheetSize = QSize(image.size()); ++ d->m_sheetSize = QSize(image.size() / image.devicePixelRatioF()); + node->setTexture(window()->createTextureFromImage(image)); + d->m_spriteEngine->start(0); + node->setTime(0.0f); +diff --git a/src/quick/scenegraph/adaptations/software/qsgsoftwarespritenode.cpp b/src/quick/scenegraph/adaptations/software/qsgsoftwarespritenode.cpp +index ba7bbc2d1..d4e5e98d6 100644 +--- a/src/quick/scenegraph/adaptations/software/qsgsoftwarespritenode.cpp ++++ b/src/quick/scenegraph/adaptations/software/qsgsoftwarespritenode.cpp +@@ -123,7 +123,7 @@ void QSGSoftwareSpriteNode::paint(QPainter *painter) + // XXX try to do some kind of interpolation between sourceA and sourceB using time + painter->drawPixmap(QRectF(0, 0, m_size.width(), m_size.height()), + pixmap, +- QRectF(m_sourceA, m_spriteSize)); ++ QRectF(m_sourceA * pixmap.devicePixelRatioF(), m_spriteSize * pixmap.devicePixelRatioF())); + } + + bool QSGSoftwareSpriteNode::isOpaque() const +-- +2.17.0 + diff -Nru qtdeclarative-opensource-src-5.10.1/debian/patches/5.11.1/0011-Enable-JIT-on-INTEGRITY-ARM64.patch qtdeclarative-opensource-src-5.11.0/debian/patches/5.11.1/0011-Enable-JIT-on-INTEGRITY-ARM64.patch --- qtdeclarative-opensource-src-5.10.1/debian/patches/5.11.1/0011-Enable-JIT-on-INTEGRITY-ARM64.patch 1970-01-01 00:00:00.000000000 +0000 +++ qtdeclarative-opensource-src-5.11.0/debian/patches/5.11.1/0011-Enable-JIT-on-INTEGRITY-ARM64.patch 2018-06-18 10:48:24.000000000 +0000 @@ -0,0 +1,151 @@ +From dd1b13a50b55652253cc04cc3fa52d2280f1da56 Mon Sep 17 00:00:00 2001 +From: Kimmo Ollila +Date: Wed, 25 Apr 2018 12:57:55 +0300 +Subject: [PATCH 11/65] Enable JIT on INTEGRITY ARM64 + +This patch enables JIT on INTEGRITY s820Am and other ARM64 builds + +Change-Id: I2fa130f41a6c5bc6aa86bcfd5a01c2d431300561 +Reviewed-by: Simon Hausmann +Reviewed-by: Nikola Velinov +--- + src/3rdparty/masm/assembler/ARM64Assembler.h | 6 ++++++ + src/3rdparty/masm/stubs/ExecutableAllocator.h | 8 ++++++++ + src/3rdparty/masm/wtf/OSAllocator.h | 4 ++++ + src/3rdparty/masm/wtf/OSAllocatorIntegrity.cpp | 12 ++++++++++++ + src/3rdparty/masm/wtf/Platform.h | 5 +++++ + src/qml/jsruntime/qv4global_p.h | 2 +- + 6 files changed, 36 insertions(+), 1 deletion(-) + +diff --git a/src/3rdparty/masm/assembler/ARM64Assembler.h b/src/3rdparty/masm/assembler/ARM64Assembler.h +index 008f03bcc..1787e921e 100644 +--- a/src/3rdparty/masm/assembler/ARM64Assembler.h ++++ b/src/3rdparty/masm/assembler/ARM64Assembler.h +@@ -39,6 +39,10 @@ + #include + #endif + ++#if OS(INTEGRITY) ++#include ++#endif ++ + #define CHECK_DATASIZE_OF(datasize) ASSERT(datasize == 32 || datasize == 64) + #define DATASIZE_OF(datasize) ((datasize == 64) ? Datasize_64 : Datasize_32) + #define MEMOPSIZE_OF(datasize) ((datasize == 8 || datasize == 128) ? MemOpSize_8_or_128 : (datasize == 16) ? MemOpSize_16 : (datasize == 32) ? MemOpSize_32 : MemOpSize_64) +@@ -3039,6 +3043,8 @@ public: + UNUSED_PARAM(code); + UNUSED_PARAM(size); + #endif ++#elif OS(INTEGRITY) ++ ManageCaches((Address)code, size, ACCESS_DST_COHERENT); + #else + #error "The cacheFlush support is missing on this platform." + #endif +diff --git a/src/3rdparty/masm/stubs/ExecutableAllocator.h b/src/3rdparty/masm/stubs/ExecutableAllocator.h +index 3b84b5c98..1ab28588f 100644 +--- a/src/3rdparty/masm/stubs/ExecutableAllocator.h ++++ b/src/3rdparty/masm/stubs/ExecutableAllocator.h +@@ -45,6 +45,10 @@ + + #include + ++#if OS(INTEGRITY) ++#include "OSAllocator.h" ++#endif ++ + #if OS(WINDOWS) + #include + #else +@@ -118,6 +122,8 @@ struct ExecutableAllocator { + Q_UNREACHABLE(); + } + # endif ++# elif OS(INTEGRITY) ++ OSAllocator::setMemoryAttributes(addr, /*writable*/ true, /*executable*/ false); + # else + int mode = PROT_READ | PROT_WRITE; + if (mprotect(addr, size, mode) != 0) { +@@ -152,6 +158,8 @@ struct ExecutableAllocator { + Q_UNREACHABLE(); + } + # endif ++# elif OS(INTEGRITY) ++ OSAllocator::setMemoryAttributes(addr, /*writable*/ false, /*executable*/ true); + # else + int mode = PROT_READ | PROT_EXEC; + if (mprotect(addr, size, mode) != 0) { +diff --git a/src/3rdparty/masm/wtf/OSAllocator.h b/src/3rdparty/masm/wtf/OSAllocator.h +index 933b3cda0..366dd7399 100644 +--- a/src/3rdparty/masm/wtf/OSAllocator.h ++++ b/src/3rdparty/masm/wtf/OSAllocator.h +@@ -73,6 +73,10 @@ public: + static T* reallocateCommitted(T*, size_t oldSize, size_t newSize, Usage = UnknownUsage, bool writable = true, bool executable = false); + + static bool canAllocateExecutableMemory(); ++ ++#if defined(Q_OS_INTEGRITY) ++ static void setMemoryAttributes(void* addr, bool writable, bool executable); ++#endif + }; + + inline void* OSAllocator::reserveAndCommit(size_t reserveSize, size_t commitSize, Usage usage, bool writable, bool executable) +diff --git a/src/3rdparty/masm/wtf/OSAllocatorIntegrity.cpp b/src/3rdparty/masm/wtf/OSAllocatorIntegrity.cpp +index 451ca147d..7addf9e5c 100644 +--- a/src/3rdparty/masm/wtf/OSAllocatorIntegrity.cpp ++++ b/src/3rdparty/masm/wtf/OSAllocatorIntegrity.cpp +@@ -123,6 +123,12 @@ Error setAttributes(MemoryRegion mr, bool writable, bool executable) + return SetMemoryRegionAttributes(mr, attributes); + } + ++void OSAllocator::setMemoryAttributes(void* addr, bool writable, bool executable) ++{ ++ const MRPair* pair = memoryRegionsContainer.getMRPair((Address)addr); ++ CheckSuccess(setAttributes(pair->vmr, writable, executable)); ++} ++ + void* OSAllocator::reserveUncommitted(size_t bytes, Usage usage, bool writable, bool executable) + { + MemoryRegion VMR; +@@ -229,4 +235,10 @@ void OSAllocator::releaseDecommitted(void* address, size_t bytes) + memoryRegionsContainer.deleteMRPair(pair); + } + } ++ ++bool OSAllocator::canAllocateExecutableMemory() ++{ ++ return true; ++} ++ + } // namespace WTF +diff --git a/src/3rdparty/masm/wtf/Platform.h b/src/3rdparty/masm/wtf/Platform.h +index 4f3724549..5905f42f4 100644 +--- a/src/3rdparty/masm/wtf/Platform.h ++++ b/src/3rdparty/masm/wtf/Platform.h +@@ -171,6 +171,11 @@ + #define WTF_CPU_ARM64 1 + #endif + ++/* CPU(ARM64) - INTEGRITY */ ++#if (defined(__ARM64__)) ++#define WTF_CPU_ARM64 1 ++#endif ++ + /* CPU(ARM) - ARM, any version*/ + #define WTF_ARM_ARCH_AT_LEAST(N) (CPU(ARM) && WTF_ARM_ARCH_VERSION >= N) + +diff --git a/src/qml/jsruntime/qv4global_p.h b/src/qml/jsruntime/qv4global_p.h +index 9b13d4e34..1fa4bae04 100644 +--- a/src/qml/jsruntime/qv4global_p.h ++++ b/src/qml/jsruntime/qv4global_p.h +@@ -101,7 +101,7 @@ inline double trunc(double d) { return d > 0 ? floor(d) : ceil(d); } + # define V4_ENABLE_JIT + # endif + #elif defined(Q_PROCESSOR_ARM_64) && (QT_POINTER_SIZE == 8) +-# if defined(Q_OS_LINUX) || defined(Q_OS_QNX) ++# if defined(Q_OS_LINUX) || defined(Q_OS_QNX) || defined(Q_OS_INTEGRITY) + # define V4_ENABLE_JIT + # endif + //#elif defined(Q_PROCESSOR_MIPS_32) && defined(Q_OS_LINUX) +-- +2.17.0 + diff -Nru qtdeclarative-opensource-src-5.10.1/debian/patches/5.11.1/0012-Fix-JIT-build-on-INTEGRITY-ARM64.patch qtdeclarative-opensource-src-5.11.0/debian/patches/5.11.1/0012-Fix-JIT-build-on-INTEGRITY-ARM64.patch --- qtdeclarative-opensource-src-5.10.1/debian/patches/5.11.1/0012-Fix-JIT-build-on-INTEGRITY-ARM64.patch 1970-01-01 00:00:00.000000000 +0000 +++ qtdeclarative-opensource-src-5.11.0/debian/patches/5.11.1/0012-Fix-JIT-build-on-INTEGRITY-ARM64.patch 2018-06-18 10:48:24.000000000 +0000 @@ -0,0 +1,560 @@ +From 4b27062f5fae891850fd0f048f2a2421ca9b6c7c Mon Sep 17 00:00:00 2001 +From: Kimmo Ollila +Date: Wed, 25 Apr 2018 13:25:45 +0300 +Subject: [PATCH 12/65] Fix JIT build on INTEGRITY ARM64 + +-typedef "Jump" may not be used in an elaborated type specifier +-explicit specialization of function must precede its first use +-"Value" is ambiguous + +Change-Id: Ic15c196f1b33211cd3f2f25a54ba478747336fe4 +Reviewed-by: Simon Hausmann +Reviewed-by: Janne Koskinen +Reviewed-by: Nikola Velinov +--- + .../masm/assembler/AbstractMacroAssembler.h | 6 + + .../masm/assembler/MacroAssemblerARM64.h | 203 ++++++++++-------- + src/qml/jsapi/qjsvalue.cpp | 8 +- + src/qml/jsruntime/qv4qobjectwrapper.cpp | 10 +- + src/qml/jsruntime/qv4stringobject.cpp | 4 +- + src/qml/jsruntime/qv4vme_moth.cpp | 74 +++---- + 6 files changed, 173 insertions(+), 132 deletions(-) + +diff --git a/src/3rdparty/masm/assembler/AbstractMacroAssembler.h b/src/3rdparty/masm/assembler/AbstractMacroAssembler.h +index 6fac27fdf..107638490 100644 +--- a/src/3rdparty/masm/assembler/AbstractMacroAssembler.h ++++ b/src/3rdparty/masm/assembler/AbstractMacroAssembler.h +@@ -327,7 +327,13 @@ public: + template + friend class AbstractMacroAssembler; + friend struct DFG::OSRExit; ++ ++#if CPU(ARM_THUMB2) || CPU(ARM64) || defined(V4_BOOTSTRAP) ++ using Jump = typename AssemblerType::template Jump