aboutsummaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
...
* QML engine: Fix binding setupFabian Kosmale2020-12-031-2/+2
| | | | | | | | | | | | We set QProperty bindings up in the wrong way: Parent components would overwrite their child component's binding. This patch reverses the order, fixing the bug. Task-number: QTBUG-87153 Change-Id: I3e90d1d14a41a7c5c337745f1453484d360a3979 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> (cherry picked from commit 96e321bc5cf3c1a6d52374a6f4070a438032b08d) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Doc: Do not highlight "Writing QML Extensions with C++" exampleKai Koehne2020-12-031-2/+0
| | | | | | | | | | This is a more complex example that is also not that visually appealing. Change-Id: Ia5ebfa407c6bcbd3d701068384bfd660833a867c Reviewed-by: Tuukka Turunen <tuukka.turunen@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> (cherry picked from commit 86b9ae4da1be2f797f6d6762d870555ee8c893de) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Don't return reference to temporary QModelIndexVolker Hilsheimer2020-12-031-1/+1
| | | | | | | | | | Follow up on change in qtbase; QPMI casting to QModelIndex returns a value, not a reference. Change-Id: I227cd8ef64450986069837edee25512d9538286d Reviewed-by: Lars Knoll <lars.knoll@qt.io> (cherry picked from commit 039c2801cfbd67e22da83f77375a06f7434b5c85) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Document how to use CMake for Qt QuickTestKai Koehne2020-12-034-18/+51
| | | | | | | | Task-number: QTBUG-73058 Change-Id: Ia00916e8ce8193225a773f85fe2af87e334afaab Reviewed-by: Paul Wicking <paul.wicking@qt.io> (cherry picked from commit 3bf876a771c6e9e62b506f4c99965fca6d0e7f3b) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix documentation for qmlInfo, qmlDebug and qmlWarningAndreas Buhr2020-12-021-18/+15
| | | | | | | | | | | | qmlInfo, qmlDebug, and qmlWarning are not in the QtQml namespace any more. This patch adapts the documentation. Task-number: QTBUG-88533 Change-Id: I7fafd3fc2769c5ffad515cacaacdc7ccbe07db46 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit 815b347abe821664b2f8a4db53866826a639d6bc) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Add documentation dependency to qtshadertoolsAndreas Buhr2020-12-021-1/+2
| | | | | | | | | | Documentation links to qtshadertools. This patch adds qtshadertools to the dependencies so these links can work. Change-Id: Icb059fd681e7456f3452aeba60287bfa1cc3539e Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit 1ea475099cd20dd57ff2a32bf3a0f9b6218c14ba) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix usage of oldcode and newcode in qt6-changes.qdocAndreas Buhr2020-12-021-2/+2
| | | | | | | | | | | There was wrong usage of \begincode and similar commands. This patch fixes it. Task-number: QTBUG-88533 Change-Id: I70b3d0104ba1dc8eb44556f35fc552e259317f88 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit ed098189d5809259378dc9a427a6fe6e303582ba) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Quick: Fortify QQuickApplication ctorUlf Hermann2020-12-021-12/+13
| | | | | | | | | | | If the qApp we have is in fact not a QGuiApplication we cannot connect those signals. The "if (qApp)" was probably supposed to check for this but actually doesn't because qApp is a static_cast. Change-Id: Iaa30e3d56768e97601d51d30500fc3b12d0626a3 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit 8a555cc22afb93dbe0e0da83f211c6e4f032bd09) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix documentation links to High DPI documentationAndreas Buhr2020-12-011-1/+1
| | | | | | | | | | | | The documentation on High DPI was recently rewritten, renaming several sections. This patch fixes the links which were broken by this change. Task-number: QTBUG-88533 Change-Id: I30c1f801f93773e04f85d7ebb3603fafa8f4f2a0 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> (cherry picked from commit ff7c11c481a57beeea4be2c6fbe8eea78c7b3de2) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Allow parent to filter out-of-bounds synth-mouse for grabbing handlerShawn Rutledge2020-11-302-5/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Consider Flickable { Text { TapHandler { gesturePolicy: TapHandler.ReleaseWithinBounds } } } On press, TapHandler gets the exclusive grab. Now drag vertically. The Text is short in stature, so your finger soon strays out of bounds of the Text, likely before you have dragged past the drag threshold. In this case, we want Flickable to continue to filter the move events because of the fact that TapHandler is the grabber. If it was a MouseArea instead of a TapHandler, it already worked that way; so this makes behavior of handlers more consistent with that. More specifically: QQuickPointerTouchEvent::touchEventForItem() now generates a touch event even if the touchpoint is not within the bounds of the given item, but is grabbed by one of that item's handlers. Until now, we had that exception only if it was grabbed by the item itself. tst_FlickableInterop::touchAndDragHandlerOnFlickable now always drags the delegate at index 2 (the third one) from its upper-right corner, upwards and to the left. The first drag goes outside the delegate's bounds, but the Flickable/ListView/TableView filters and takes over anyway (on the next drag), to prove that it is correctly depending on the grab that the TapHandler (or DragHandler) took on press. Fixes: QTBUG-75223 Change-Id: Ie4e22c87be0af9aa3ff0146067b7705949b15c40 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit 1e1674849a89db54cdbcc4e995300e3ec1624c3a) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Porting guide: Document URL resolution changeFabian Kosmale2020-11-301-0/+22
| | | | | | | | Task-number: QTBUG-88965 Change-Id: Ib62082935ddba7bf5b359a32712e6799b3242091 Reviewed-by: Paul Wicking <paul.wicking@qt.io> (cherry picked from commit e2a74579850d89d229dad918404a8d8ecebb80b3) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* CMake: Fix resource object file paths in qml plugin prl filesAlexandru Croitor2020-11-301-2/+4
| | | | | | | | | | | | | | | Pass the new INSTALL_LOCATION argument to qt_internal_record_rcc_object_files to ensure correct paths to resource object files in plugin prl files. Amends 8a54a6fc2efd13f0310ec71793f624cdf28bd1c9 Task-number: QTBUG-87702 Task-number: QTBUG-88425 Change-Id: I539c29fd9745b8ed2ad063ac2a82e086efc22ef0 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> (cherry picked from commit ce35f02b338fc74e72cd25cfad111dff9f6459f4) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Accessibility event is sent on item's geometry changePiotr Mikolajczyk2020-11-271-0/+8
| | | | | | | | | | | | | In case of enabled accessibility, whenever the geometry of a QQuickItem changes, accessibility module is notified by a LocationChange event. This enables responding to this by for example moving the accessibility frame on the screen. Task-number: QTBUG-79611 Change-Id: I808e835384ef42bba2e9aabecf4be3cda07859fe Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io> (cherry picked from commit def81070668f101e1e2cbb46d586bbab64c8e00f) Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* Shortcut conversions of common data typesLars Knoll2020-11-271-0/+59
| | | | | | | | | | | When returning the result of bindings, shortcut the conversion of common data types and do not go through QVariant. Removes ~20% of the overhead in the evaluation of simple bindings of types bool, int, double, float and QString. Pick-to: dev Change-Id: I0323cae12892b8ca52aedfe5e58a23e614a10d45 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* qmltypes.prf: Take abi into account for *_metatypes.json file namesAlessandro Portale2020-11-261-1/+2
| | | | | | | | | | | | | The lib/metatypes/*_metatypes.json file names contain the ABI. When constructing the qmltyperegistrar command, the right file names with that ABI part need to be passed as "foreign-types". Fixes: QTBUG-85888 Fixes: QTBUG-87117 Change-Id: I20daac1b6b9a27c5ac48b3c2c685e2fed301e213 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> (cherry picked from commit acc5e48a90d0daeccb28175b80ab6b52cac5d84a) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* CMake: Fix broken static plugins linkingAlexey Edelev2020-11-261-1/+1
| | | | | | | | | | | Restore prefix of generated qml files resources. Non-prefixed resource names break static linking of qml plugins. Amends 08eb485a006dc2baca42eb280ae60e9f0fc00dff Change-Id: Idb489536b9b863232300609ec595c6f5c29daf3e Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> (cherry picked from commit f16f477eba8415f9edfd5d4b220ab8a565051410) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Change QQuickRenderControlPrivate from autotest to private exportLaszlo Agocs2020-11-261-1/+1
| | | | | | | | | | | | | There are legitimate cases for using the private class, the number one case being Design Studio where QQuickRenderControl and QRhi are used together. At the moment things work presumably because only member variables are accessed, and that works even in builds that do not have the member functions exported. Fix this up to be future proof. Change-Id: I054deb31607ca8c95fccb2f5988dde6f0a9c372a Reviewed-by: Andy Nichols <andy.nichols@qt.io> (cherry picked from commit 718472d8e1e30fe2b0bc0e3b514ea0ed20259737) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Doc: Remove version numbers for import statementJerome Pasion2020-11-2615-49/+47
| | | | | | | | | | | | -recommend using the import statement without versions for Qt 6.0 -update use of \qml snippet without \QtMinorVersion -some language change to be neutral about versions Task-number: QTBUG-87155 Change-Id: I3ac44f93aab3086c1a49de79ecc677beb4ef9180 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit 72746ef0ad69d589de91f43aa2043d6e47745d68) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Doc: Document pooled(), reused() signals for ListView QML typeTopi Reinio2020-11-261-1/+32
| | | | | | | Change-Id: Ic8b2fa8333fdc6aae051f3b2faa3a0c0ecad9ad5 Reviewed-by: Paul Wicking <paul.wicking@qt.io> (cherry picked from commit d6a5a8525936ce3009ccbe8a68b7fbfa8e50b8ae) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Doc: Fix documentation dependenciesTopi Reinio2020-11-262-2/+26
| | | | | | | | | | | - Add missing dependency to qtquick3d - Remove qtscript, qtquickdialog dependencies - Use multiline formatting to have a clean git history of dependencies Change-Id: If79df67ef14cce4156cd24042725e56654da4444 Reviewed-by: Topi Reiniö <topi.reinio@qt.io> (cherry picked from commit 22852a84a7146e2b36c59731845cba1d0eb3c409) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Remove most examples/demos from highlighted listVolker Hilsheimer2020-11-251-7/+1
| | | | | | | | | | There's nothing new in those, leave the space on top to more intersting stuff. Change-Id: I9c349393b073e80155db594f6777778f31efdf02 Reviewed-by: Alex Blasche <alexander.blasche@qt.io> (cherry picked from commit b58f962abf3e939907d4ad0bd452e1a721558316) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Doc: Remove version numbers for import statementJerome Pasion2020-11-2418-33/+40
| | | | | | | | | | | -recommend using the import statement without versions for Qt 6.0 -update use of \qml Task-number: QTBUG-87155 Change-Id: I555d582a13006c5abb6dc1e0266d2987ba79c6d8 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> (cherry picked from commit 370fe537badd2b98c2da7f8918a15411d5aa67ad) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix crash when calling hasOwnProperty() on proxy objectRichard Weickelt2020-11-241-4/+6
| | | | | | | | | | | | Property pointer p needs to be checked for nullptr value in QV4::ProxyObject::virtualGetOwnProperty(). This can happen when calling hasOwnProperty() or propertyIsEnumerable(). Fixes: QTBUG-88786 Change-Id: I43da58fed4d8656f9187213f7317f17398739e34 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> (cherry picked from commit 9b321a34490cd17c0eb043b69bd7c9d8d8f513d5) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QQuickTextInput: Store mask data in std::unique_ptrFabian Kosmale2020-11-242-5/+5
| | | | | | | | | | This ensures that the memory is freed reliably Fixes: QTBUG-88807 Change-Id: I841a5a2b226a69ce50975d95702a948857d1b54f Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> (cherry picked from commit d2d8e90e9f218103d60737e1273ab5322834d9ec) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Remove unused external function declaration in ShaderEffectLaszlo Agocs2020-11-241-2/+0
| | | | | | | Change-Id: I05e3f804af3668235f97cebc54e1904a90092385 Reviewed-by: Andy Nichols <andy.nichols@qt.io> (cherry picked from commit a10c980b1e4273b357702211148a2f9c4e2ebc2c) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Purge renderpass refs from renderer when redirecting via QRhiRtLaszlo Agocs2020-11-242-7/+9
| | | | | | | | | Fixes: QTBUG-88761 Change-Id: Ia5df65a4a09a7554a7d0cca4533f766cb5abe97b Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io> Reviewed-by: Andy Nichols <andy.nichols@qt.io> (cherry picked from commit bbb6298204b95f049c8a177365125247ba49dba3) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* CMake: Change generated resources namingAlexey Edelev2020-11-241-4/+1
| | | | | | | | | | | | Remove redundant 'target' prefix for generated resource name for qml files. It's expected that 'qt6_add_resources' will created resource targets prefixed with '${target}_'. Fixes: QTBUG-88581 Change-Id: Ie63fce11931a2cb566aa1902a77227ef86ca1ea8 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> (cherry picked from commit 08eb485a006dc2baca42eb280ae60e9f0fc00dff) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Mark QQmlListProperty as a QML list in QMetaTypeFabian Kosmale2020-11-241-1/+6
| | | | | | Pick-to: 6.0.0 dev Change-Id: Icd92121bb65ffca1135c1ef69b90d8a8955c1df0 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Fix QML property cache leaks of delegate itemsAndrei Golubev2020-11-241-1/+10
| | | | | | | | | | | | | | | | | | | | | | The delegate items are destroyed through an event loop by a call to a deleteLater(). This, however, doesn't work when the application is in the process of exiting and the event loop is already closed (i.e. we're in a stack unwinding part that starts after app.exec()) Combat this situation by setting a parent of the to-be-deleted object to some QObject that will be destroyed e.g. QCoreApplication::instance() before the program finishes. As QObjects clean their children on destruction, this will make sure that we cleanup the previously leaking thing regardless of the event loop Added a test to check that delegates are destroyed (as a separate binary due to differences in main() function) Fixes: QTBUG-87228 Change-Id: I59066603b77497fe4fd8d051798c3e4b47c119f0 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit 3a5617dc45e281552b9c1f7a04f0561b8fa14d94) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Don't deliver to non-grabbing pointerhandlers if a point is grabbedShawn Rutledge2020-11-231-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In particular, on press when QQuickFlickable::filterPointerEvent() calls captureDelayedPress() and will return true, it also accepts the event to stop propagation. It becomes the grabber as a consequence of that. On a future move event, when the drag threshold is exceeded while the delayed press timer is still running, Flickable already has the grab (but it accepts the event again), and QQuickFlickablePrivate::drag() calls setKeepMouseGrab(true). In this case we still want to prevent any children's DragHandlers from seeing the event, because a DragHandler will also see that the drag threshold was exceeded and try to steal the grab. A DragHandler can steal the grab only if there was no press delay: then it sees the initial press because Flickable does NOT stop event propagation (does not accept the event), so it can take a passive grab and continue to wait for the drag threshold to be exceeded, regardless of what else happens. In case of multiple touchpoints, allPointsGrabbed() returns false if the Flickable has only grabbed one point; but we want to avoid delivering handlers in children just on the basis of that grabbed touchpoint being within their bounds, even though other points may be delivered to various handlers. This fixes tst_FlickableInterop::touchAndDragHandlerOnFlickable. The blacklisting of dragHandlerInSiblingStealingGrabFromMouseAreaViaTouch was bogus (it's in the mousearea_interop test). Task-number: QTBUG-86729 Change-Id: I9f0d42e97de4f4a3b4f7773800a8d59dc34a0553 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit c5c05498a7e79c1868551192921a42236ecbf5f8) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QQuickParticleAffector: Fix warnings about copying non-shared containersFriedemann Kleint2020-11-231-2/+2
| | | | | | | | | | | | | | Use range-based for, fixing: 'QtPrivate::warnIfContainerIsNotShared': Do not use foreach/Q_FOREACH with containers which are not implicitly shared. Prefer using a range-based for loop with these containers: `for (const auto &it : container)`, keeping in mind that range-based for doesn't copy the container as Q_FOREACH does T=QVarLengthArray<QQuickParticleGroupData *,32> & 'QtPrivate::warnIfContainerIsNotShared': Do not use foreach/Q_FOREACH with containers which are not implicitly shared. Prefer using a range-based for loop with these containers: `for (const auto &it : container)`, keeping in mind that range-based for doesn't copy the container as Q_FOREACH does T=QQuickParticleVarLengthArray<QQuickParticlePainter *,4> & Change-Id: I88d7405abd89d2fa47549623997cbc02a9bd1145 Reviewed-by: Kaj Grönholm <kaj.gronholm@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit 938986fb464601ad3104ee86d03f2ef562e24315) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QQuickStyledText: Avoid warning about setFontFamilyFabian Kosmale2020-11-231-1/+1
| | | | | | | Change-Id: I3595be758c757998951b24e46cb90bb74c9c45a4 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> (cherry picked from commit c65d72bb81c9860023bc3a7348ad0d5ea65a27b0) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Use a single code path to load a QShader in QSGRhiShaderEffectNodeLaszlo Agocs2020-11-231-13/+4
| | | | | | | Change-Id: I8fec25df83768883896d195c09489aeb23abdafd Reviewed-by: Christian Strømme <christian.stromme@qt.io> (cherry picked from commit ae1dc052b6b975b8a49d8d71d11d3051acd594c7) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Remove unused 'blob' member in ShaderEffect internalsLaszlo Agocs2020-11-231-1/+0
| | | | | | | Change-Id: I804f019f40dddce43646bf1cf91da26d4c3a4b5c Reviewed-by: Christian Strømme <christian.stromme@qt.io> (cherry picked from commit 9f43ccc112b748ff79e175b7fec94ec60cf311ec) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* qmlfunctions.qdoc: Add clarification to QML_FOREIGNMaximilian Goldstein2020-11-231-0/+4
| | | | | | | | Fixes: QTBUG-87150 Change-Id: If99a06a07892bdfef7b6b1e8fa737480750992fe Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit 56f428c360191230b571969a2651e85380030afa) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Re-enable the caching of shader data loaded from filesLaszlo Agocs2020-11-231-8/+8
| | | | | | | | | | | | | There was a mismatch for the cache key: sometimes using the original url as specified in the QML code, sometimes using the resolved url (which has, for example, a relative path expanded to absolute). Change this to be consistent. Fixes: QTBUG-88673 Change-Id: I201750716d3ba6dbe73a4799ac56f26f9b8ec820 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> (cherry picked from commit f95b99902fae6e53a9da5fbccb6e1616299fb3bf) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* qqml.h: Add QML_IMPLEMENTS_INTERFACESMaximilian Goldstein2020-11-231-0/+4
| | | | | | | | | | | Needed in order to allow for the declarative registration of classes implementing interfaces. Fixes: QTBUG-88623 Change-Id: Id9c1ae92774dd9c316ceaa737cb48ef28f56545c Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> (cherry picked from commit 87533900738d65ad278722b292852c998e987c10) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QML Text doesn't reset lineCount when text is emptyShinichi Okada2020-11-231-0/+2
| | | | | | | | | | | | lineCount is not reset when replacing a multi-line QML Text 'text' property with an "" empty string. Also, the lineCountChanged signal is not emitted Task-number: QTBUG-84458 Change-Id: Ic3c02e6a90e6675eadbaafc6af6ab0356ee98123 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit ae1b9c6d94001411efeef600e22638906e0fa990) Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Doc: mention that INCLUDEPATH must be set in some casesMitch Curtis2020-11-211-0/+8
| | | | | | | | | | Otherwise the generated type registrations .cpp file will not be able to include the sources. Change-Id: I7821c7674b4341546da2fc49e584bf10cc60b46f Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> (cherry picked from commit 06c31f386f8664343debd219a522a8897df0f3ec) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QQuickListView: Fix warning about cast from ASCIIFriedemann Kleint2020-11-201-1/+1
| | | | | | | Change-Id: Id7193f64093c20bb798b6bc6fbf87f1ce41364d7 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit 220cbb6dab74b7ee924b44d89f657cfc86f9e8ec) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Doc: Ensure QQuickWindow::transientParent property is documentedTopi Reinio2020-11-201-0/+1
| | | | | | | | | | | | | While the parent class (QWindow) has that property, QDoc does not allow documenting properties from base classes. The documentation for QQuickWindow::transientParent includes QML-specific information, so use QDOC_PROPERTY macro in the header file to make the property documentation visible. Change-Id: Ib281c776717e09e6929420c6173a520613356d91 Reviewed-by: Topi Reiniö <topi.reinio@qt.io> (cherry picked from commit 29a32e17e1a11af8312be269c6b8085385524155) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Make sure we don't modify the incoming event objects when localizingVolker Hilsheimer2020-11-192-4/+9
| | | | | | | | | | | Restore the position of the single event point after event delivery. Where possible, don't make a localized copy which explicitly shares its data with the original anyway. Instead, access the original directly. Change-Id: I5efa44c336eddeef1a1ab00dc91e2d0f223ed31d Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Fix tst_QQuickMouseArea::notPressedAfterStolenGrab againShawn Rutledge2020-11-192-2/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | Most of the time, QQuickWindowPrivate::deliverMatchingPointsToItem() doesn't need to call item->mouseUngrabEvent() because all grab changes are notified via the connection from signal QPointingDevice::grabChanged to slot QQuickWindowPrivate::onGrabChanged(). But in this case, MouseArea only accepts the event, rather than taking the grab itself. Therefore at the time the grab is "stolen", there was not yet any grabber, because grabbing is done after delivery. But we still need to inform MouseArea that it's not getting the grab it expects to get, so that it can reset its pressed state. But we don't want it to be redundant (other tests are counting events, and we don't want repeated ungrabs to show up in those); so now we have to track whether the item on which we're about to call mouseUngrabEvent() has already gotten it. This illustrates another problem with the tradition of accepting events and being unclear about what it means. Grabbing is one thing, ending delivery is another. Amends a97759a336c597327cb82eebc9f45c793aec32c9 Task-number: QTBUG-55325 Task-number: QTBUG-86729 Change-Id: I8150f901e00e7a71499fc98ab54f0ba75370f3ec Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Remove QQuickItem::windowDeactivateEvent(); cancel grabs insteadShawn Rutledge2020-11-196-22/+38
| | | | | | | | | | | | | | | | | | | When a QQuickWindow is deactivated, visiting every item in the entire scene to tell them the news isn't very efficient, especially considering that the only item that overrode this virtual function has been QQMouseArea, throughout the lifetime of Qt 5. If it's important to cancel grabs of MouseAreas, then it's equally important to cancel grabs of MultiPointTouchArea, pointer handlers, etc. It should be OK to delete the virtual function since it was never documented, and marked \internal, so hopefully no users are depending on it. The existing tst_QQuickMouseArea::pressedCanceledOnWindowDeactivate() test continues to pass, which proves that the WindowDeactivate event still has the desired effect on MouseArea. Change-Id: I0109370aba14096fb7777a83cf1b6763ac58013f Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Use QMutableSinglePointEvent's new default constructorVolker Hilsheimer2020-11-191-6/+6
| | | | | Change-Id: I3b2d1fbc4b62b501aa6ed748a692cb4bba261c5e Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Add Qt 6 Qt Quick QML Type changes from qtdocJerome Pasion2020-11-191-1/+99
| | | | | | | | | -changes to Qt Quick QML Types and OpenGL support -content from doc/src/qmlapp/applicationdevelopers.qdoc Task-number: QTBUG-87156 Change-Id: I3384e5bfa070c891015e5aa4af2e2c0b2dae35cf Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Porting guide: mention qmlDebug/Info/WarningFabian Kosmale2020-11-191-3/+3
| | | | | | | | Also don't mention qmlExecuteDeferred: That one is internal anyway (albeit not explicitly marked as such yet). Change-Id: Icef5fb4092b6a109613ae1f2e90fcff93d7c0b4b Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* QtQml: document qmlExecuteDeferred as internalFabian Kosmale2020-11-191-0/+3
| | | | | Change-Id: If3640ef5cbb6df4b199b481410e79e94ea763645 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Remove compatibility shim from qmlinfo.{cpp|h}Ulf Hermann2020-11-193-53/+19
| | | | | | | | | | | | We don't need to handle symbol clashes with QtQuick1 anymore. [ChangeLog][QtQml] The functions qmlDebug, qmlInfo, and qmlWarning are no longer available in the QtQml namespace. Use their counterparts in the global namespace. Fixes: QTBUG-88637 Change-Id: Ia74510bd711790cebf55de4cd668891712f6835e Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Stop ungrabbing due to FocusAboutToChangeShawn Rutledge2020-11-181-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The goal is to un-blacklist the test for QTBUG-60123. To that end: revert 7b2e2117162594a2d0234bb02408f5b5a446488b and its followup 6933b7e8e6dc279a8eb34e1f4c60bc109dfb7d26. There is no detailed bug report explaining exactly why those were done, just the comment on code review: "This fixes the desktop components' combo box on linux re-opening at random times", probably referring to a combobox popup window in Controls 1. But when using QWidget::createWindowContainer() in two different windows and clicking MouseAreas in each of them, it turns out that this change of focus is causing the mouse grab to be canceled. The grab should be naturally given up after mouse release; canceling prematurely doesn't make sense. The Qt 5 fix for this bug was e0c30279ec1fad88346ed3fb483bc3c672fdd01b which tracked the grab on a per-window basis. It would be difficult to do that again now (change QPointingDevicePrivate::setExclusiveGrabber() to store a separate grabber for each window in which a grab occurred? what could go wrong...) It seems odd to have the same QEventPoint grabbed in two different windows at the same time, but popups need event forwarding so maybe that was why (if a MouseArea triggers the popup, should it stay pressed and keep its grab? the subsequent mouse moves and the release need to be forwarded to the popup, so maybe something inside the popup needs a grab, simultaneously or not). Anyway we don't have actual popup windows in Controls 2 right now; and we know that event forwarding for popups needs work in QtGui so that it will be easier when we try again to have them in Qt Quick (QTBUG-68080). So perhaps the original workaround has outlived its usefulness: popup event forwarding needs to be handled at the lower layer, not in Qt Quick. Task-number: QTBUG-57253 Task-number: QTBUG-60123 Task-number: QTBUG-86729 Change-Id: I56dbc3bb94f66a7f26f79a97bcb2f2bbc0b7aa92 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>