aboutsummaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Revert "Fix for possible crash in QSGDefaultLayer::grab"6.1Laszlo Agocs2021-10-132-9/+0
| | | | | | | | | | | | | | | | | | | This reverts commit 1c5de027d0c31d1d6697bd0557128d92207763d8. The fix here is not correct. Calling a QSGRhiLayer function from the gui thread is very wrong and can cause a set of unexpected issues. The Address Sanitizer catches this by recognizing that the render thread is trying to do something with an object destroyed in the meantime on the main thread in the layer->setItem(null) call. The issue the original fix is trying to address needs to be addressed in some different form. Fixes: QTBUG-94975 Change-Id: I46f904026281201fc6d233ed7d3bdc7080934afe Reviewed-by: Christian Strømme <christian.stromme@qt.io> (cherry picked from commit a5f0361622eb08eab6c3474d5fc249d1962e3d1e) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Check for null pointer in QQuickPointerHandler::approveGrabTransition()Shawn Rutledge2021-09-291-3/+6
| | | | | | | | | | | Found by static analysis: https://testresults.qt.io/codechecker/daily_diffs/qtdeclarative/dev/qtdeclarative-dev-20210604-1285b67a11/qquickpointerhandler.cpp_51058486.html#reportHash=9b76a76200c3a2eceb0e115776dda98b Amends b09ce7dcd8ecf24ef23da8197a64e3fced3fc894 Change-Id: I4c35f648be9513e5e237d9b8d4e502e40e9f8a76 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit 63b1f379b710c510f00311e03641aa65e72aaf34) Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Reduce QGlyphRun memory usage and speed up large Text instancesShawn Rutledge2021-09-292-28/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To render the plain text of _War and Peace_ took 6.4GB of memory before (Linux 64-bit debug developer build); and now it's 1.1GB initially. More optimization is possible: sizeof(TexturedPoint2D) = 16, and we store a 16-bit index, so 3158176 glyphs ought to take about 60MB (but takes 200MB in practice); but we also store QGlyphRuns, which are actually redundant after the SG is populated. We need them in case the text can be edited, restyled, re-wrapped etc. QSGDistanceFieldGlyphNode::updateGeometry() enforces a limit of 65532 vertices per node (0xFFFF is not allowed as an index value, because it's reserved to indicate primitive restart; and glyphs are quads). But it was making copies of the remaining QPointF positions and quint32 glyph indices and giving those recursively to the subnodes, so every subnode was storing all of those for itself and all of _its_ subnodes, even though it only needs max 16383 of them. Now, in the RootGlyphNode, m_glyphs stores the glyphs that node will render (as before); but in each subnode, we use QGlyphRun::setRawData() to populate m_glyphs with a range from the index and position arrays from the root node. setRawData() just sets the pointers to those arrays; so to avoid any chance of dangling pointers, we need to keep those vectors, which live in the GlyphInfo structs in m_glyphsInOtherTextures. That's the reason the glyphsInOtherTextures hash, which was temporary before, is now kept (although the dangling pointers somehow didn't cause any crash). In the first loop over indices in updateGeometry(), each SubGlyphNode will break out of the loop as soon as it has created enough TexturedPoint2D and index instances for itself, because it no longer needs to redo the rest of the loop over indices that was done in the RootGlyphNode; this speeds up the rendering of large text. Creation of subnodes is now iterative rather than recursive, which saves stack space, and also looks better in the QSG_RENDERER_DEBUG=dump output: you can see that each RootGlyphNode has one level of direct children (161 of them for _War and Peace_). In a future change, perhaps we could create those dynamically when the user flicks down to them, and reclaim memory from children that are no longer shown; but that would not be possible if they were all nested inside each other. Amends aeb1d48c9938241b1ffcf8e42e3864595e90b168 Task-number: QTBUG-60491 Task-number: QTBUG-90734 Change-Id: Iff981b9ba86acc01775fd72e3ce79ea9e33d9061 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> (cherry picked from commit 75a9b09d93b9462b77347d1992371a189037bc62) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Flickable: don't react to any mouse button other than the leftShawn Rutledge2021-09-281-1/+1
| | | | | | | | | | | In case of mouse "chording", ignore all other buttons. Fixes: QTBUG-96909 Change-Id: Ib091b271390c5b4e3aafbbe24d2dc7b6f08db175 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit f91aa3b4d8ae7bfba65a8252099ded3b428f7acf) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* doc: Correct the type that WheelHandler's wheel signal emitsShawn Rutledge2021-09-061-1/+1
| | | | | | | | | | It's WheelEvent not PointerScrollEvent. Task-number: QTBUG-81302 Change-Id: Ie03fbf60492525301ee8d60a0c38c8a111251e0a Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> (cherry picked from commit e2e7a1c5b81e4e7464134b4590aea799b0434d55) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Update the QRhiTexture size in QSGPlainTextureLaszlo Agocs2021-09-051-1/+6
| | | | | | | | | | | | An autotest is added separately for dev only because the necessary infrastructure for sophisticated scenegraph tests only exists there due to some earlier commits that are in dev and not in 6.2. Fixes: QTBUG-96190 Change-Id: Ie2adee96864b60f982a83b9b2785a93d5401bd6a Reviewed-by: Andy Nichols <andy.nichols@qt.io> (cherry picked from commit 4de27382f9b5f05b8d5821247ea7653b44264c03) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Canvas: Add a means to override the DPR used via an environment variableAndy Shaw2021-08-251-2/+9
| | | | | | | | | | | | | | | | | | | Overriding the DPR enables the system to not use as much memory and resources that a low-end device or mobile might have a limited amount of for rendering the Canvas item. In a situation where the user is aware of the consequences and impact of forcing the DPR to be different to the canvas window's DPR then this can be useful in those situations. By having the environment variable to override the DPR then it makes it possible for those needing this right away in all versions of Qt, so we add this now with a view to add API for this at a later date. Change-Id: Icafaa04a15678e2c7f24bc791026676f476a6ced Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> (cherry picked from commit b0193908258f315a5736edcbc2a034d3194d42c9) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* qquicktextinput: Clear pre-edit text after input method resetJarkko Koivikko2021-08-232-6/+8
| | | | | | | | | | | | | | | | | | | | | | | | | The QPlatformInputContext::reset() function does not allow any further input method events to be called. Therefore, clearing the pre-edit text is the sole responsibility of the text input control. This change modifies the QQuickTextInputPrivate::resetInputMethod() function and calls QQuickTextInputPrivate::cancelPreedit() instead of QInputMethod::reset() directly. The cancelPreedit() function will send a QInputMethodEvent which clears the IM state (in addition of calling QInputMethod::reset() function). Also, rename the QQuickTextInputPrivate::resetInputMethod() function to cancelInput, since it does not call inputMethod()->reset() directly. Fixes: QTBUG-95461 Change-Id: I6ab3b9dbe71956af72656e2a25a05d79603b34ea Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Inho Lee <inho.lee@qt.io> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> Reviewed-by: Jarkko Koivikko <jarkko.koivikko@code-q.fi> (cherry picked from commit b2103e33f490c96d0068d211c6f2d5b540ca407e) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix regression in ListView/Flickable event deliveryJan Arve Sæther2021-08-201-1/+11
| | | | | | | | | | | | | | | | | | The regression was introduced with 2acb31641fc9c34d24ac29232cdfec The problem was that when we entered QQuickListViewPrivate::wantsPointerEvent(), the event was not localized to the QQuickFlickable when mouse filtering was done. Therefore, since the code assumed that the localPos was local to the Flickable, it always ended up assuming that the point was within the bounds of the header/footer. Fixes: QTBUG-89409 Change-Id: Ib595e61b7995241b58e3051da09139e1e1f13cba Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> (cherry picked from commit b2e4f09bfa2c42af562f6741c0a0246a53028f0a) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Doc: Document matrix4x4 transformation functionsYuya Nishihara2021-08-171-0/+67
| | | | | | | | | | | These functions have been added at ded64d0368 "Make the qml/js matrix4x4 type more useful." Change-Id: Ia61eb5c7c058e2b94bb1b8b0e7bd56371feadca1 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> (cherry picked from commit d3b99595aee699dc4f01fb3658e0b33ba313f9f2) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* doc: Mark KeyNavigation's properties as attachedIvan Tkachenko2021-08-161-7/+7
| | | | | | | | Fixes: QTBUG-95811 Change-Id: I3bedef190b839bf5436d0cdd07d2011c237c03f2 Reviewed-by: Paul Wicking <paul.wicking@qt.io> (cherry picked from commit 88f38cbcb27566650109a97098a9cf2c19668fb0) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Doc: fix AnchorChanges typoJeremy Katz2021-08-131-1/+1
| | | | | | | Change-Id: I6e5cc9807ddc2ae6a40a864b3154fe93fcc32d69 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> (cherry picked from commit a4a80e9a5c0452936241657c19ce871094a4f335) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Mark QQuickColorGroup as \internal in the documentationVolker Hilsheimer2021-08-121-0/+2
| | | | | | | | | | | This is an internal class that makes no sense without QQuickPalette, which is also an internal class (and already documented as such). Fixes: QTBUG-95591 Change-Id: I878d9bf9794530dfe57ba77db86c7ff9a9a02bd3 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> (cherry picked from commit 419734ddda88950ad3f09f7c630eb8771f9f0144) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* doc: Add a TapHandler button snippetShawn Rutledge2021-08-062-0/+82
| | | | | | | | | | It was ironic that it's the most obvious use case of TapHandler but we didn't have some easy copy-and-paste code for making your own button. Change-Id: I680b6f828f0df82e2ab8b434a2e76aabb21fc2b9 Reviewed-by: Paul Wicking <paul.wicking@qt.io> (cherry picked from commit 0fb1a49db192e7b0f0b0fe7ac441dead1608eb63) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* doc: Improve the Input Handlers index pageShawn Rutledge2021-08-063-17/+133
| | | | | | | | | | | | | | - Document the exclusive/passive grab concepts better - Mention gesturePolicy's impact on grab behavior in the TapHandler docs too - More links - Add a couple of snippets illustrating simple use cases with handlers - Don't bother mentioning Qt.labs.handlers anymore Task-number: QTBUG-68110 Change-Id: I5e6f538c2bc8cafef679f535a5248b218b4a8068 Reviewed-by: Paul Wicking <paul.wicking@qt.io> (cherry picked from commit aade6857d12b2c9cd5552d25f4d084a5fcd25f7d) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QV4::Heap::GeneratorObject: remove unused memberFabian Kosmale2021-08-021-1/+0
| | | | | | | | | | | | | | The member was marked as a Pointer for the gc; however it was never used, and thus also left uninitialized. This could cause memory corruption or asserts during the gc's mark phase. Fixes: QTBUG-95417 Change-Id: Ide826c0284b6060de8689e6f0dc753011108dba9 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Maximilian Goldstein <max.goldstein@qt.io> Reviewed-by: Andrei Golubev <andrei.golubev@qt.io> (cherry picked from commit d36b480a956e2437888925aa8a1f5e3cb6c06ebd) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Sync shadereffect materialType cleanup between renderloopsLaszlo Agocs2021-08-022-8/+8
| | | | | | | | | | | | | | | | | | | | Follow 05ec3315e2ae723cd32b1b49260f0d09ee1fa423 from 5.15. The windows render loop is gone in Qt 6, and there can only be one type of material type cache (no legacy OpenGL path). The same issue is present, however: the basic and threaded render loops behave differently when it comes to calling cleanupMaterialTypeCache(). Make the behavior identical and follow a uniform order (1. tear down the scene graph 2. then drop cached QSGMaterialTypes) Task-number: QTBUG-94844 Change-Id: I61f4962fe8ae1a359a22fbe72e40eb2525d81e03 Reviewed-by: Michael Brasser <michael.brasser@live.com> Reviewed-by: Andy Nichols <andy.nichols@qt.io> (cherry picked from commit aedb4853a509d63a599779fa5115083f84fad389) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix QQuickPaintedItem performance and memory usageLaszlo Agocs2021-07-301-7/+5
| | | | | | | | | | | | | | Keep the existing QSGPainterTexture (QSGPlainTexture). This is what Qt 5 would do as well. Otherwise we silently get lots of unnecessary releasing and creating graphics resources underneath. Fixes: QTBUG-95132 Change-Id: I88e839793fedd8f2c6d00cd76cd9a653731865f4 Reviewed-by: Jonas Karlsson <jonas.karlsson@qt.io> Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io> (cherry picked from commit 146f8cbf865e0061859dd9f1c7a477db91298052) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Doc: add example snippets for containmentMaskMitch Curtis2021-07-275-4/+171
| | | | | | | | | | | | This shows how to use non-rectangular shapes for hit tests, as well as how to define the contains function in QML. Task-number: QTBUG-89380 Change-Id: I93c686d840b292816a788c05a0a76fafa338d5f8 Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> (cherry picked from commit 382d2bfe5f261c269ccf4b970c826003c90d57ae) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Pass the focus reason through to the control on mouse pressVolker Hilsheimer2021-07-232-5/+5
| | | | | | | | | | | | | | | | | | Otherwise, a TextInput item will always receive OtherFocusReason when clicking into it. Add a test that simulates focus changes with mouse and keys, records the incoming focus events and verifies the correct focus reason is set in the event. Qt Quick provides no mechanism to access the focus reason from within QML (onActiveFocusChange only has a bool parameter, the focusReason property exists only in QtQuickControl). Task-number: QTBUG-75862 Change-Id: Ifea95c7ef2ac88c6c8e8bbdc8d2dbe5205ff922e Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit bbcbb7c78f2f07e6c5e380ec5c018ac2a7abf292) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Update QQuickImage's DPR if re-loading the image didn'tVolker Hilsheimer2021-07-231-2/+6
| | | | | | | | | | | | | | | An SVG doesn't have a DPR, but we need to reload and repaint it anyway when the DPR of the screen changes. So store the DPR of the item explicitly if reloading it didn't change the value (for instance, because sourceSize was not set). Otherwise, DPR changes are only handled when moving from a 1.0 (the default) DPR display to a different display, but not when moving back. Fixes: QTBUG-94622 Change-Id: I9f0a847699ab027ef876e341b8c6a954a6167ab3 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> (cherry picked from commit 08838f434b55024d9d5a9252fc2a3fb782b087da) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Avoid infinite loop in designer supportThomas Hartmann2021-07-222-7/+20
| | | | | | | | Task-number: QTBUG-94928 Change-Id: I1ee14600fb0fd9f0ee499546e3ffcd66114aaeff Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io> (cherry picked from commit d3cae36550fe8b82c641cef6a207e991a9064d85) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Handle QScreen::physicalDotsPerInchChanged changes for the initial screenVolker Hilsheimer2021-07-211-3/+9
| | | | | | | | | | | | | | | We connect to the signal when the screens change (in QQuickWindow::handleScreenChanged), but never for the initial screen. Not connecting means that changing the DPR of the initial screen doesn't re-render QQuickItems with the new DPR, which was in particular visible for QQuickImage when displaying SVGs. Task-number: QTBUG-94622 Change-Id: I44ff3f8f3713d5a7bba8b6b8b4d5ca14530fe373 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> (cherry picked from commit 7e39a2204382a78ac6ff1e32dfe29dcbce65004c) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Adjust import documentation to mention that versions are optionalFabian Kosmale2021-07-212-15/+24
| | | | | | | | | | | This change also removes the versions from the import statements. Task-number: QTBUG-95302 Change-Id: Ie29e57a618917977b46dff25d13e3ca3eff249b5 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> (cherry picked from commit 58783a4f9d411e4bc0fc45bd5da9164e3313f0a3) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* doc: Improve QQuickItem::containmentMask() docsShawn Rutledge2021-07-141-9/+35
| | | | | | | | | | | | | | The Qt Quick docs weren't as explicit as possible; and the \qmlproperty did not generate any C++ docs. Amends bf74a908cb0591c2adc024a6f93d566c7348c125 Fixes: QTBUG-89375 Change-Id: Ib81796c1d7a00a7a48940c65137e4ed6a38a21ab Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> (cherry picked from commit bcf3f29c6d26777c8db814477b8f3c3e19826234) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* When setting the line dash to be an empty array reset the style to SolidAndy Shaw2021-07-141-1/+4
| | | | | | | | | | | | An empty line dash array is indicating that it should be reset to be a Solid line, otherwise it ends up reusing the previous settings for the pen instead of drawing a solid line. Fixes: QTBUG-75553 Change-Id: I16466672de95da8ef0cf3fc261969e7cc6add227 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> (cherry picked from commit c31638f16b1fe709dd9df232afb9ab7fac3b231e) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* TextEdit: ignore all key release eventsVolker Hilsheimer2021-07-141-5/+1
| | | | | | | | | | | | | | | | | Input events are accepted by default, and get ignored by the default event handler implementations. By overriding an event handler, the events get accepted, unless ignored explicitly. Since QQuickTextControl does not handle any key release events, it should explicitly ignore all of them, not just Key_Back (ignoring of which was added in 798112b6532a3c66abff630327d29a980a525f25). Fixes: QTBUG-95073 Change-Id: I09105fd8ebef73c03eb2083149643d188a2f1360 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> (cherry picked from commit 6ca31ca88a7ee86308e329afd6cd2c90a050d4d9) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* doc: Remove bogus PinchHandler.minimumTouchPoints prop; improve actualShawn Rutledge2021-07-091-12/+12
| | | | | | | | | | | PinchHandler.minimumTouchPoints was probably just an early idea for the name, because MultiPointTouchArea has it. Anyway it's now honoring the inherited minimum/maximumPointCount properties from MultiPointHandler. Change-Id: I6408da9dfe1d31a38da2777efa2c5d79ad17390f Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit a04d98787dc5c816569a6eecce695a8d80257c05) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Send hover events with correct scene and global positionsShawn Rutledge2021-07-061-3/+7
| | | | | | | Task-number: QTBUG-94971 Change-Id: I047223dfdb76a6f1237b9d15b54381cd085aa1ac Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit 0a271b5cd4da9e13accbf63a576413c45f367adc)
* QQDeliveryAgent: keep lastMousePosition updated during draggingShawn Rutledge2021-07-061-4/+4
| | | | | | | | | | | | | Given that we store lastMousePosition (which I hope we can move to QPointingDevice eventually), the idea is it should always be correct; so don't bypass updating it during a mouse move just because there's a grabber. It resulted in synthetic hover events being sent after release, with an outdated last-known mouse position. Fixes: QTBUG-92563 Change-Id: Ic708bfcbdfcd0a9f6dc2cfd42f0671b0661e76bb Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit 930da44767dcd0ccb50aaf725e3cbac99eaf13ea)
* Fix QtQtuickImage docs: correct properties' signaturesIvan Tkachenko2021-07-021-2/+4
| | | | | | | | | | 1. Add missing "readonly" annotations. 2. Change sourceSize's type to QML basic type 'size'. Change-Id: I3636818571b1e923058363f62b595567a1ccdcf0 Reviewed-by: Paul Wicking <paul.wicking@qt.io> (cherry picked from commit 9e0fdcf87fb0fd35a3313dff6243da6597289455) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* crash fix - avoid wrong gcc optimizationTim Jenssen2021-07-022-9/+8
| | | | | | | | | | | | | | | | This fixes a crash that gcc optimized the code in the way that inspectedObjects->contains(object) executed at a nullptr. (only release only some gcc versions) This was already fixed in the past but reintroduced by another commit in the past. Task-number: QTBUG-94798 Change-Id: I9759f3347712f706dd99303ce9d804667c1525f3 Reviewed-by: Marco Bubke <marco.bubke@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> (cherry picked from commit e865d977f6b6b0e3f7e7e61e4a9200f047b0213e) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Doc: Include the Qt.labs submodules in the sourcedirs listVenugopal Shivashankar2021-06-231-2/+1
| | | | | | | | | | | | The code for these submodules are moved out of imports but the qdocconf was not updated to include the new path. Fixes: QTBUG-92840 Change-Id: I8c4677354622c6b601b273c8c96d67c33535c77f Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> (cherry picked from commit e981455f9439758f53f742decb758027d0a2f5e6) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Add more links to QJSEngine's ownership documentationFabian Kosmale2021-06-171-1/+10
| | | | | | | | | | Also explictily mention again that objects with JS ownership won't be deleted as long as they have a parent. Change-Id: I1eeb5bc8183b6621f24f3751b8152b36acf2eeae Reviewed-by: Paul Wicking <paul.wicking@qt.io> (cherry picked from commit 906ccb4694bbb3577efc8b8839ed687ebb3e3dce) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix conversion of entries to be added to QVariantListsUlf Hermann2021-06-171-2/+4
| | | | | | | | | We should pass the variants themselves, not their constData(). Fixes: QTBUG-94502 Change-Id: I92688348d7b46d74935dc11080b26290f5e8be86 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit dbe34dfa0d42510b804c898b77d6fe145473c31b)
* Enhance QQuickRenderControl docs regarding key eventsLaszlo Agocs2021-06-151-5/+15
| | | | | | | | | | | ...and rephrase one of the general description paragraphs to be more accurate. Fixes: QTBUG-93489 Change-Id: If238fff84480720a618c8a337fe416cd08ee9b79 Reviewed-by: Andy Nichols <andy.nichols@qt.io> (cherry picked from commit 6dfed1ee9c8e03780b222a71f6b90fe2016d8994) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* DropArea: Tell qdoc that DropArea indeed inherits ItemFabian Kosmale2021-06-141-0/+1
| | | | | | | | | | | This ensures that we list all of Item's properties in the "List of all Members" page. Change-Id: Ide7e270fd187e6adc4a20b70b8ef84d2c25a836c Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> (cherry picked from commit 565290ef3b63fd6ac7b3eac06e64c6a09a2561ad) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Don't let PointerHandler steal mouse grab from keepMouseGrab layerShawn Rutledge2021-06-011-8/+17
| | | | | | | | | | | | | | | As explained in the comment, the handler can override the keepMouseGrab "veto" if the item is a parent (like a Flickable) that filters events, but not in other cases. The logic was wrong though, apparently. Amends 090f404cf80da35734f712b02cc1543acecd5b62 Fixes: QTBUG-78258 Task-number: QTBUG-79163 Change-Id: I9a473ab3b23743f863cb0be13767fdbc29cd5e1c Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> (cherry picked from commit b09ce7dcd8ecf24ef23da8197a64e3fced3fc894)
* Document handling signals with parameters in QMLFabian Kosmale2021-05-281-1/+52
| | | | | | | Change-Id: I1fb2a6b744ee1bbef2ceceba119bc8d4bc882144 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> (cherry picked from commit a678309dfd132e1b34662c72b8d8d8515e2826d0) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Support &apos; in styled textAlbert Astals Cid2021-05-282-1/+3
| | | | | | | | | | Includes the doc fixes from 5848c081c094a66e024493fc1e5c2569e06f73b6 (that had not been marked for backporting to 6.1) Change-Id: I4a8db963e52a7899ab1796f9a560e8029cc1c929 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> (cherry picked from commit 96b528efcba1226d2980828d1255160bdceae4cf)
* QV4StackFrame: Fix ubsan warningFabian Kosmale2021-05-281-1/+3
| | | | | | | | | | | Calling memcpy with a nullptr is UB, even if we copy 0 bytes. Add a null check to avoid the issue. Fixes: QTBUG-94067 Change-Id: I1d47424754e22f13d7b494ae984b4407b96b1805 Reviewed-by: Andrei Golubev <andrei.golubev@qt.io> (cherry picked from commit 0b10b83dad91b44559b9f4ddcf9d8bed5544de93) Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Fix MSVC warning C4334Kai Köhne2021-05-281-1/+1
| | | | | | | | | qquickparticlesystem.cpp(217): warning C4334: '<<': result of 32-bit shift implicitly converted to 64 bits (was 64-bit shift intended?) Change-Id: If17ecb2003995d54fce4e0ed58c8e2b183928dc3 Reviewed-by: Andy Nichols <andy.nichols@qt.io> (cherry picked from commit ff8392d4ba28ebd6cb2eef584773a75aa8382392) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix MSVC warning C4065Kai Köhne2021-05-271-5/+2
| | | | | | | | | | qsgdefaultcontext.cpp(308): warning C4065: switch statement contains 'default' but no 'case' labels Change-Id: Ic050d21549cb3eeabade803a23e3e9eb202e3a74 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io> (cherry picked from commit 0bdbfb9589ce912afbecc6fd3408f8320d78de10) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Keep DragHandler active while dragging even if other event happensFabian Kosmale2021-05-271-1/+10
| | | | | | | | | | | | | | | | | QQuickPointerHandler::handlePointerEvent() calls setActive(false) when wantsPointerEvent() returns false (except for a NativeGesture event), for the sake of deactivating reliably when it receives an event which it does not handle. Now we need one more exception, because it's not what we want in DragHandler while dragging: If we get a wheel event, that should not interrupt the current drag operation. Thus, we change the logic in wantsPointerEvent to consider even events we wouldn't normally handle while the DragHandler is active. In handlePointerEventImpl, we then simply ignore them. Fixes: QTBUG-91549 Change-Id: I24e8bd890a21b244c9964f4df76986688085fa87 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> (cherry picked from commit 40bbf1e8fddebb0974426a03b0f48dfc08f942de)
* Emit grabChanged() from DragHandler and PinchHandlerShawn Rutledge2021-05-271-1/+15
| | | | | | | | | | | | Followup to ca7cdd71ee33f0d77eb6bf1367d2532e26155cb2 : when overriding a virtual function, it's good practice to call the base class function, in the absence of any reason not to. Fixes: QTBUG-93880 Change-Id: Icbd04faec51d55d8fbf73319bd20f5846761d3d5 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit a10eeee97d42f05409074f69cc99d9a8da5db077) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Doc: Generate FolderListModel documentationTopi Reinio2021-05-261-1/+2
| | | | | | | | | | | | src/labs/folderlistmodel was not part of any documentation project after the source directories were moved. Fixes: QTBUG-94022 Change-Id: I61c31ff0e05f1bafdfe897556ecd167a5bcaba61 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io> (cherry picked from commit e2f247fafcd90c02e5db686c791ff4818be9cc50) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Restrict types from unversioned imports only by major versionUlf Hermann2021-05-261-1/+1
| | | | | | | | | | | | | | | | | The versionless import tells us that any version of the type is allowed. We still record the major version because types have to be re-registered for each major version. Any minor version belonging to that major version is allowed, though. Restricting by minor version has the effect of passing the minor version of the "host" type into grouped property accesses. This is certainly unwelcome as the grouped type can have a higher minor version than the host type. Task-number: QTBUG-33179 Change-Id: I73f0f4fdaa00ac13cf91a4c21fd705c9dba070ec Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Andrei Golubev <andrei.golubev@qt.io> (cherry picked from commit 5ca899164156ee49770ef3749e6d4b1567c00362) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Add missing limits include to fix build with GCC 11Antonio Rojas2021-05-231-0/+1
| | | | | | | | | | | | This is not required for Qt 6, since it is indirectly pulled via qanystrigview.h, but it is for Qt 5 (where qanystrigview does not exist) and, in any case, it is good to declare all used headers and not rely on them being implicitly pulled. Change-Id: I97606ea493e723006759608b7d4c4f00632f340c Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com> (cherry picked from commit 367293b18ab0d0a0432c1c8ce445fee052e5eee5) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Give a warning when StyledText encounters a non supported entityAlbert Astals Cid2021-05-211-0/+4
| | | | | | | Change-Id: Iea8bdf25542cd404ee71141467ac1f1398a7d0df Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit 8cd43e370040e23fcbd03ad64969e683055bd7d0) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Doc: Window can be imported with import QtQuick nowMitch Curtis2021-05-211-3/+3
| | | | | | | Change-Id: Ifea27b5906bf9dcc3087946aaf8bd3aed968309b Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> (cherry picked from commit be74a0082c4b9f6fc3b700ea2c9689bfcb5d1433) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>