aboutsummaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* doc: Add note to PinchHandler.translation property about macOS trackpadShawn Rutledge2022-11-301-0/+3
| | | | | | | | | Translation doesn't happen with trackpad native gestures. Fixes: QTBUG-109002 Pick-to: 5.15 6.2 6.4 Change-Id: I7d42b0d737d45405732a389560a6c77624831c9e Reviewed-by: Paul Wicking <[email protected]>
* Fix see-also link to loadUrl, silence qdoc warningVolker Hilsheimer2022-11-301-1/+1
| | | | | | | | | There's no QQmlComponent::load, which qdoc kindly informed us about. Fix the see-also to point at loadUrl without explicit scoping, which makes it less text, fixes the link, and silences qdoc. Change-Id: I7293a79c9bfc8438e320da6e04bd47aa3abaa21a Reviewed-by: Fabian Kosmale <[email protected]>
* QmlCompiler: Do not print context for source locations of length 0Ulf Hermann2022-11-302-3/+4
| | | | | | | | We generally print a second message to clarify the context anyway. Fixes: QTBUG-108851 Change-Id: Iba392f2983498ecb1d780034523feab8d9057b84 Reviewed-by: Fabian Kosmale <[email protected]>
* WorkerScript: Create ExecutionEngines on demand when neededUlf Hermann2022-11-301-15/+40
| | | | | | | | | | | | | Creating an engine is rather expensive and as long as your script doesn't run, we don't need one. Furthermore, this allows us to create the engine in the same thread it will run in. Not only is this stylistically better, but it will also let the engine check its stack limits correctly on creation (once we do check stack limits). Task-number: QTBUG-108182 Task-number: QTBUG-106875 Change-Id: Id0003b333c576b3bb603d8b71a5070211c7475bf Reviewed-by: Fabian Kosmale <[email protected]>
* qmltyperegistrar: Generate accessSemantics="none" for foreign namespacesUlf Hermann2022-11-291-1/+14
| | | | | | | | | | | | If the local type is a namespace, the resulting type can only be a namespace, too, no matter what kind of tag the foreign one has. Furthermore, we can re-use types with other QML_* tags this way. Task-number: QTBUG-108883 Change-Id: Ib2ae08d5b081b8faa35124314f97d406d7b4f76f Reviewed-by: Qt CI Bot <[email protected]> Reviewed-by: Fabian Kosmale <[email protected]>
* QmlCompiler: Check return code when opening qmltypes filesUlf Hermann2022-11-291-1/+9
| | | | | | | Coverity-Id: 403059 Change-Id: Ic45f749602f4230e8319d0c3d4c262043d2cdad4 Reviewed-by: Fabian Kosmale <[email protected]> Reviewed-by: Sami Shalayel <[email protected]>
* QQmlIncubator: Clarify type in loopUlf Hermann2022-11-291-1/+3
| | | | | | | Coverity-Id: 403058 Change-Id: I2d544da83ba46bae47b27a62f29e2e83437c05c5 Reviewed-by: Fabian Kosmale <[email protected]> Reviewed-by: Sami Shalayel <[email protected]>
* QQmlNotifier: Guard against broken meta objects when disconnectingUlf Hermann2022-11-292-5/+8
| | | | | | | | | | | | | | | Some classes may be unable to produce a metaObject via the string casting method we employ when invalidating the interceptor metaObject. Ignore those. Furthermore, qt_metacast() may produce a different object than the one we called it on. Accept that. Finally, we don't have to check the topmost QMetaObject because we already know it's invalid. Fixes: QTBUG-108906 Change-Id: Id935d06beead4239381093f2f090d4a6a244034b Reviewed-by: Zoltan Gera <[email protected]> Reviewed-by: Fabian Kosmale <[email protected]>
* Introduce type based overload of Qt.createComponentFabian Kosmale2022-11-282-6/+91
| | | | | | | | | | | | | | | | | | | | | | | Add type based createComponent overloads based on QQmlComponent::loadFromModule. They provide a way to instantiate a component by its type, specified by a URI and typename pair. This enables creating Components for inline component types and C++ only types. Support for directly passing the type is deferred to a later commit, as it needs some care to work together with the compiler. As the string based overload matches a mistaken call to the URL based createComponent with parent and mode swapped (due to anything being convertible to string), we add a check to detect this specific error case and give a helpful error message. [ChangeLog][QtQml] Qt.createComponent now supports creating a Component from its module and type name (passed as strings). Task-number: QTBUG-97156 Fixes: QTBUG-26278 Change-Id: I89e7430fe02d52f57230bfa1b0bfbcbfd0ead4b7 Reviewed-by: Ulf Hermann <[email protected]>
* Connections: Don't crash when target is deletedFabian Kosmale2022-11-281-8/+6
| | | | | | | | Pick-to: 6.4 6.2 Fixes: QTBUG-108697 Change-Id: I019edf3a0a702ad1dca340473265933e4d131e99 Reviewed-by: Ulf Hermann <[email protected]> Reviewed-by: Fabian Kosmale <[email protected]>
* Key required properties by object and property dataUlf Hermann2022-11-284-11/+38
| | | | | | | | | | Property data alone is not enough as the same property can be required in multiple objects. Fixes: QTBUG-108291 Change-Id: I3b1c899e24bb2967d05372701f9b5d0927b3c711 Reviewed-by: Qt CI Bot <[email protected]> Reviewed-by: Fabian Kosmale <[email protected]>
* Loader: Create bound components into their creation contextUlf Hermann2022-11-281-5/+14
| | | | | | | | | | | It's unclear why we need a separate context for the created objects in the first place. Fixes: QTBUG-108684 Change-Id: Id6213a8cc61f54064162e7caa26ec7a6b38ddc2b Reviewed-by: Qt CI Bot <[email protected]> Reviewed-by: Fabian Kosmale <[email protected]> Reviewed-by: Semih Yavuz <[email protected]>
* QtQml: Restructure the moduleMaximilian Goldstein2022-11-285-6/+66
| | | | | | | | | | | | | | | | | | | | Create a new module QtQml.Base which contains the actual QtQml types and a new module QtQml that just imports QtQml.Base, WorkerScript and Models. This is so we don't have circular dependencies within QtQml anymore where QtQml imports QtQml.Models but Models can't depend on QtQml for type information. [ChangeLog][QtQml][Important Behavior Changes] If you import QtQml you now need to make sure that QtQml is actually in the import path. Usually this is the case, but by manipulating the import path you can hide QtQml. In previous versions of Qt you could then still import QtQml because its types are present in the QtQml library. However, it would ignore its dependencies: QtQml.Models and QtQml.WorkerScript. If you really want to import only the builtins, you can always "import QML". Fixes: QTBUG-105240 Change-Id: Icdcdcc926757a8e9e8d639301b5b6d110de59613 Reviewed-by: Fabian Kosmale <[email protected]>
* qmllint: document new behavior of --jsonSami Shalayel2022-11-281-2/+2
| | | | | | | | | | | | | | | Amends 5c04d174282a9a36ce12b26e1807d3d5051a7f33. The behavior of qmllint changed in the above-mentioned commit, as it started expecting a file argument for the --json option. Before, it was not expecting any and always writing to stdout. Document the new behavior in the docs and in the --help command, especially the part about using '-' to restore the old behavior. Fixes: QTBUG-108913 Pick-to: 6.4 Change-Id: I3a69a794a5362a575437d3d832d6e038c7a0755a Reviewed-by: Fabian Kosmale <[email protected]>
* QML: Fix casting between builtin types when constructing value typesUlf Hermann2022-11-261-1/+1
| | | | | | | | | | Amends commit 3195b44e1c9678584c05ed823aab2eb32518d868. Task-number: QTBUG-108789 Change-Id: Ie11c48d64e7984ee0e1982cb9e8241b815d8c49c Reviewed-by: Qt CI Bot <[email protected]> Reviewed-by: Fabian Kosmale <[email protected]> Reviewed-by: Sami Shalayel <[email protected]>
* Debugger: Initialize scoped context correctlySemih Yavuz2022-11-251-2/+2
| | | | | | | | | | | Initialize scopedContext with valid qmlContext. Otherwise debugger crashes on attempt to lookup an object that includes a v4Function property Pick-to: 6.2 6.4 Fixes: QTBUG-107607 Change-Id: Iea59bdf9d379a5415abe1767f76f851978b1be3f Reviewed-by: Ulf Hermann <[email protected]>
* QQuickTableView: respect activeFocusOnTabRichard Moe Gustavsen2022-11-251-0/+9
| | | | | | | | | | | QQuickItem has a activeFocusOnTab property which should also be respected by TableView. When disabled, TableView should not transfer focus between the cells when the user hits the tab key. Change-Id: I234286926b58753fa50923321302d4fa108a4515 Reviewed-by: Oliver Eftevaag <[email protected]>
* Revert "masm: Treat Android as generic Posix regarding mmap and friends"Ulf Hermann2022-11-252-17/+8
| | | | | | | | | | | | | | | | | This reverts commit ffecc122d785de9c4c5defd8724526b8dd4982dc. It turns out that madvise() only fails when given MADV_WILLNEED as argument on the affected devices. MADV_WILLNEED is indeed optional. Since commit 2034e10c9378364ecc7aa1af27505562d86688de we do not crash on a failed MADV_WILLNEED anymore. Therefore, we can re-enable the linux code path for android. Pick-to: 6.4 6.2 5.15 Task-number: QTBUG-107774 Task-number: QTBUG-106864 Task-number: QTBUG-106269 Change-Id: If67a38e4fc206bd5d5ed0ef8bf66ededd09d8f59 Reviewed-by: Fabian Kosmale <[email protected]>
* Drop some dead code from qqmlpropertycache*Ulf Hermann2022-11-252-18/+11
| | | | | | | _hasPropertyOverrides was never read. Change-Id: I96575a9c76379ede6cb76e12262e1b90ab3c7963 Reviewed-by: Fabian Kosmale <[email protected]>
* Repair QQmlGadgetPtrWrapper's metaObjectUlf Hermann2022-11-257-64/+59
| | | | | | | | | | | | | | | | | | | | We need two metaobjects: One with the PropertyAccessInStaticMetaCall flagg and one without. The one without needs to be used with QQmlGadgetPtrWrapper, since the wrapper wants to intercept metacalls. The other one needs to be used when calling readOnGadget(). We can accommodate this by just retaining the original metaobject. As it's retrieved from a gadget type you should definitely be able to readOnGadget() with it. The dynamic meta object, on the other hand, can be lazily created when we actually metacall() through QQmlGadgetPtrWrapper. This relieves us of all the special casing around QQmlGadgetPtrWrapper and makes it safe to use for anyone. Fixes: QTBUG-108704 Change-Id: Icc01c81babaa9d1eca8d5ddfaf44d724a404db38 Reviewed-by: Qt CI Bot <[email protected]> Reviewed-by: Fabian Kosmale <[email protected]>
* QmlCompiler: Store imported types in a QListUlf Hermann2022-11-255-25/+41
| | | | | | | | | | | | | | | The same type can be exported multiple times with different attributes, even in the same module. This requires us to fix directory imports as qmllint otherwise complains about SegFault.bad.qml and SegFault.qml being the same type (which they obviously aren't). Task-number: QTCREATORBUG-27590 Change-Id: I295d927b9a07acbb715055a6883ac44b50129c2d Reviewed-by: Sami Shalayel <[email protected]> Reviewed-by: Fabian Kosmale <[email protected]> Reviewed-by: Qt CI Bot <[email protected]>
* QML: Monkey-patch thread safety issue with dynamic metaobjectsUlf Hermann2022-11-244-8/+33
| | | | | | | | | | | | | | | | Not deleting the dynamic metaobject should at least prevent the crashes in the CI that have appeared lately. We can still race for the validity flag this way. While this is still technically UB, in practice it will work. We may yet find a better solution to this. Amends commit 3ba1496a65a06b38ee324b5ac10ffec98b22b0c1. Change-Id: I512051953bdbb832ced9ef26d1d3e6ea2ff21226 Reviewed-by: Qt CI Bot <[email protected]> Reviewed-by: Volker Hilsheimer <[email protected]> Reviewed-by: Fabian Kosmale <[email protected]>
* qmlformat: add 'ensure new line between functions' optionXavier BESSON2022-11-242-1/+7
| | | | | | Fixes: QTBUG-108659 Change-Id: I3e21727bd946089d89ce9c42f640f05230de8c8e Reviewed-by: Ulf Hermann <[email protected]>
* Register enum correctly in QQuickMessageDialogSami Shalayel2022-11-231-1/+1
| | | | | | | | | | | | Remove the broken Q_FLAG(QPlatformDialogHelper::StandardButtons) and replace it with QML_EXTENDED_NAMESPACE(QPlatformDialogHelper) such that the StandardButtons enum can be accessed from the qml MessageDialog type. Fixes: QTBUG-108630 Change-Id: Ia77d7d775491db90d3e5694f784bdc811d4f6bbd Reviewed-by: Oliver Eftevaag <[email protected]> Reviewed-by: Ulf Hermann <[email protected]> Reviewed-by: Semih Yavuz <[email protected]>
* Doc: Fix import statement in QML code exampleAndreas Eliasson2022-11-231-1/+1
| | | | | | | Fixes: QTBUG-108388 Pick-to: 6.4 6.2 Change-Id: Iec1cae2761129c5d64afadaebabc9e4bddc4ebe4 Reviewed-by: Topi Reiniö <[email protected]>
* QQmlJSImportVisitor: warn when uncreatables are createdSami Shalayel2022-11-236-8/+61
| | | | | | | | | | | | | | | | | | | | | | isCreatable in qqmljsscope just returns the value of the flag as it was read from the qmltypes, which is slightly confusing as isCreatable is an opt-out option. Instead, isCreatable should reflect whether the type is creatable or not. A type is uncreatable if and only if it is a singleton, an attached type, a c++ type with QML_UNCREATABLE and types without default constructor. This uncreatibility can also be inherited to composite types. Types without default constructor require QML_UNCREATABLE or QML_ANONYMOUS, and will be handled in another commit. Now that uncreatable types can be detected, emit a warning when a singleton or an uncreatable type is created: up to now no such warning was emitted. This warning can be seen when using qmllint or qmltc. By the way, also fix qmltc to not assert when something goes wrong (e.g. because an uncreatable or singleton type was created). Change-Id: I9a82106a801d14063407eb4e54858b1ca9fd578b Reviewed-by: Ulf Hermann <[email protected]>
* QmlCompiler: Implement console logging methodsUlf Hermann2022-11-236-5/+199
| | | | | | | | | | | We provide semi-private functions in the AOT context for this. Since we cannot know the complete run time type of the potential logging category at compile time, we have to check any first argument that might be one separately. Fixes: QTBUG-107175 Change-Id: I46a8922b1c5c16d2b450b8728d650d31dfd867e3 Reviewed-by: Fabian Kosmale <[email protected]>
* QmlCompiler: Fix comparison of null and undefinedUlf Hermann2022-11-231-11/+21
| | | | | | | | | | | | Those are not stored. If we compare null to null or undefined to undefined, we do not have to generate a comparison at all. the result is statically known. Pick-to: 6.4 Fixes: QTBUG-108634 Change-Id: I6a5323c2e0c023838609aec90d7ecc15b885dc08 Reviewed-by: Sami Shalayel <[email protected]> Reviewed-by: Fabian Kosmale <[email protected]>
* qqmljsscope: resolve enums using their aliasesSami Shalayel2022-11-231-0/+23
| | | | | | | | | | | | | | | | | | | | Some enums happen to have an alias, e.g. when an enum is used as a flag, the enum will exist in two versions, once as enum (e.g. Qt::MouseButton) and once as a flag (e.g. Qt::MouseButtons). In this case, normally only the flag is exposed to the qt metatype system and tools like qmltc will have troubles when encountering the enum in signal parameters etc. To solve this problem, QQmlJSScope::resolveEnums() will create a QQmlJSMetaEnum copy for the alias in case the 'self'-scope already does not have an enum called like the alias. For the greater picture: this allows qmltc to compile signal handlers for signals that take enums as argument without asserting, and also is a step forward to compile the quick/text example with qmltc. Task-number: QTBUG-107609 Change-Id: I8fcb48a15a2066fb2d2dc89fc26b8441a1a0f489 Reviewed-by: Ulf Hermann <[email protected]>
* qmltc: add singleton supportSami Shalayel2022-11-231-5/+1
| | | | | | | | | | | | Add singleton support to qmltc. Add the QML_SINGLETON annotation to the class, generate a static T* create(QQmlEngine*, QJSEngine*) method for the engine and also add test this new functionality. Fixes: QTBUG-106828 Change-Id: I7b6b39ab0c8a427b3166562c3f04cf4a7eaa20e2 Reviewed-by: Ulf Hermann <[email protected]>
* QQmlComponent/QQmlIncubator: Support C++ based typesFabian Kosmale2022-11-233-2/+57
| | | | | | | | | | | | | | | | QQmlComponent has a create overload which takes an Incubator. While there is not really any work that could be done in an asynchronous with a C++ based types (there are no sub-QML components, and there are no bindings to set up), we still have to accommodate them in that overload (otherwise we'd crash due to the missing compilation unit). Add support in QQmlIncubator for this case, and call the newly introduce function in QQmlComponent::create. Task-number: QTBUG-97156 Change-Id: I64e3c6958117920dca214eee633424de94b492db Reviewed-by: Qt CI Bot <[email protected]> Reviewed-by: Ulf Hermann <[email protected]>
* Fix forward declaration class missmatchAntti Määttä2022-11-231-3/+3
| | | | | | | | | | When -trace is set, fix warning about class vs struct missmatch with forward declaration in the tracepoints file. Change-Id: I62aa5a4ba4ac8cdd2938787d66660db74f566e55 Reviewed-by: Tomi Korpipää <[email protected]> Reviewed-by: Hatem ElKharashy <[email protected]> Reviewed-by: Ulf Hermann <[email protected]>
* QQuickItemView: Fix max(X/Y)Extent()David Redondo2022-11-221-2/+2
| | | | | | | | | | | | | | QQuickFlickable maxXExtent() and maxYExtent() return the amount of space that is not shown when inside a ScrollView. QQuickItemView however just returned width() if vertical and height() if horizontal. In these cases just defer to the QQuickFlickable base implementation like minXExtent() and minYExtent() already do. Fixes: QTBUG-83890 Pick-to: 6.2 6.4 Change-Id: I7f4060c2f46ae07611bedceca0d322c5f7f6affb Reviewed-by: Richard Moe Gustavsen <[email protected]> Reviewed-by: Shawn Rutledge <[email protected]>
* QtQml: Clean up VME and interceptor metaobjects on destructionVolker Hilsheimer2022-11-221-1/+8
| | | | | | | | | | | | | The dynamically created meta object is stored in the QObject private until the very end of the object's destruction. It takes precedence in the moc-generated QObject::metaObject implementation, essentially side-tracking virtual dispatch during object destruction. If we don't clean it up this allows qobject_cast'ing down the class tree when the object is already partially destroyed, even though it shouldn't. Done-with: Ulf Hermann <[email protected]> Change-Id: I64f6533747bb99b977702c050e5dc78a7c6428a5 Reviewed-by: Fabian Kosmale <[email protected]>
* Don't crash on QQmlGadgetPtrWrapper instances in debug serviceUlf Hermann2022-11-221-2/+6
| | | | | | | | | | They have the confusing property of being a QObject but having a QMetaObject that says it's a Q_GADGET. Pick-to: 6.4 Fixes: QTBUG-108646 Change-Id: I6df34c2004918cd89691f4b5eb4b6267dabcd7ff Reviewed-by: Fabian Kosmale <[email protected]>
* XmlListModel: Clean up includesUlf Hermann2022-11-222-17/+33
| | | | | | | | | Include only what we need, and normalize the include forms. Change-Id: I77013b8abf5132ca40aa5979619b5a37c472ac46 Reviewed-by: Qt CI Bot <[email protected]> Reviewed-by: Semih Yavuz <[email protected]> Reviewed-by: Fabian Kosmale <[email protected]>
* QML: Try QMetaType conversion in VariantObject's valueOf()Ulf Hermann2022-11-221-1/+11
| | | | | | | | | Since we're explicitly dealing with a QVariant here, the metatype conversion is adequate. We do the same already for toString(). Change-Id: I38c17b40da73ff0f0274e7d65b462eda1af2235a Reviewed-by: Semih Yavuz <[email protected]> Reviewed-by: Fabian Kosmale <[email protected]>
* QJSEngine: Optimize conversion from QObject* to QStringUlf Hermann2022-11-225-29/+63
| | | | | | | | | | | | | | | This is commonly done for logging. With this in place we can have the code generator use coerceType() for such constructs. [ChangeLog][QML][Important Behavior Changes] You can implement custom toString() methods for your QML objects in JavaScript or in C++. Those methods don't actually have to return a string. Previously, whatever return value the method generated was forwarded as-is. Now it is coerced to a string. Change-Id: I4a9721a6948be0c24a36b31d453a74bd747db729 Reviewed-by: Fabian Kosmale <[email protected]> Reviewed-by: Sami Shalayel <[email protected]>
* QtQml: Recognize JavaScript null as equivalent to nullptr QObject*Ulf Hermann2022-11-221-1/+1
| | | | | | | | | | Otherwise we can go into infinite recursion there. Pick-to: 6.2 6.4 Fixes: QTBUG-108651 Change-Id: I73a7c524b28d0eacb151f2090e3dce6afbc029d1 Reviewed-by: Qt CI Bot <[email protected]> Reviewed-by: Fabian Kosmale <[email protected]>
* QtQml: Do not parent QQmlGadgetPtrWrapper instances to the engineUlf Hermann2022-11-223-2/+3
| | | | | | | | | | children of the QQmlEngine can be detected by user code or by the QML debugger. QQmlGadgetPtrWrapper is a particularly dangerous thing to stumble upon. Task-number: QTBUG-108704 Change-Id: I502419e03571f176b1223386635c97f5f9982549 Reviewed-by: Fabian Kosmale <[email protected]>
* Replace uses of rand/srand with QRandomGeneratorTor Arne Vestbø2022-11-222-3/+6
| | | | | | | | | The direct use of rand/srand throws off static analysis tools looking for security issues. Task-number: QTBUG-108657 Change-Id: I88f2945acf8be915759232a83739ee8ecebac969 Reviewed-by: Fabian Kosmale <[email protected]>
* QmlCompiler: Don't crash on CallWithSpreadUlf Hermann2022-11-222-0/+9
| | | | | | | | | | | | | When preparing for such a call, the byte code loads an "empty" constant. This has to be represented in the type system so that we don't hit the assert at the end of the instruction. Pick-to: 6.4 6.2 Task-number: QTBUG-108441 Change-Id: I66220bfae3d3a4b8e9600d84d4cfc43ac858b77e Reviewed-by: Sami Shalayel <[email protected]> Reviewed-by: Qt CI Bot <[email protected]> Reviewed-by: Fabian Kosmale <[email protected]>
* QML: Do not crash on CallWithSpreadUlf Hermann2022-11-222-8/+22
| | | | | | | | | | | | | | We need to check for subscripts also when creating CallWithSpread and TailCall instructions. Furthermore, the == operator of Reference needs to take into account whether the subscript has been loaded or not. Amends commit 872e91612fd83de6dd1193014b5e2a0f5e8c30af. Fixes: QTBUG-108441 Change-Id: I2d1a7a11f9cdcb4320a87df979d9ca4457620d3f Reviewed-by: Sami Shalayel <[email protected]> Reviewed-by: Semih Yavuz <[email protected]> Reviewed-by: Fabian Kosmale <[email protected]>
* Remove broken assert in QQmlPropertyData::setOverrideIndexSami Shalayel2022-11-211-1/+0
| | | | | | | | | | | | | The assert leads to strange crashes, as it compares if an overriding and an overridden property share the same m_coreIndex and asserts when equal. This leads to crashes when overriding a function with a property and vice-versa, as those can have an equal m_coreIndex but still is a valid override. Fixes: QTBUG-108627 Change-Id: I67f91d5fdb93603ef95b9a4557fd064edc24721d Reviewed-by: Ulf Hermann <[email protected]>
* qmlformat: fix 'new line after ids properties' with normalize optionXavier BESSON2022-11-181-0/+4
| | | | | | Fixes: QTBUG-105479 Change-Id: I12ef7c2ffddb9127c1a0844c92d1050134863922 Reviewed-by: Ulf Hermann <[email protected]>
* QQuickTableView: factor out common press/tapp code to handleTap()Richard Moe Gustavsen2022-11-182-27/+28
| | | | | | | | | | | The signal handlers for 'pressedChanged' and 'singleTapped' contained a lot of duplicated code. Factor that out to a sepearate function 'handleTap()'. This will also avoid the need for duplicating the code even more, once support for cell editing is added. Change-Id: I80990b550bc13d9afff3969e931b5f44874e10ee Reviewed-by: Mitch Curtis <[email protected]>
* Don't clearPassiveGrabbers() after MouseEventSynthesizedBySystemShawn Rutledge2022-11-183-2/+11
| | | | | | | | | | | | | | | | Windows sends synth mouse events after touch events. We avoid delivery of them in QQuickDeliveryAgentPrivate::handleMouseEvent(), but we need to avoid reacting to them here too. If the touchpoint already had a passive grabber, and the mouse event comes from the same device, then clearing the mouse passive grabbers is identical to clearing the touchpoint's passive grabbers, which we don't want to do. Amends 48b1c59b65332b773eb51d25c422b53dbd3d6762 Pick-to: 6.4 6.2 Fixes: QTBUG-104890 Change-Id: I4c3e18fc834c7bfcba7037548c7e42627e319bda Reviewed-by: Mitch Curtis <[email protected]>
* Doc: Add missing QQuickWindow constructorHatem ElKharashy2022-11-171-1/+5
| | | | | | | | | | | | QQuickWindow::QQuickWindow(QQuickRenderControl *control) should be part of the public API. The user can use QQuickRenderControl with QQuickWindow to control the scenegraph rendering. This constructor is used in the QQuickRenderControl example. Pick-to: 5.15 6.2 6.3 6.4 Change-Id: I1bb38d64173c24ba835137897ef915dfde83b1f3 Reviewed-by: Laszlo Agocs <[email protected]>
* PinchHandler null target: remember accumulated scale between pinchesShawn Rutledge2022-11-171-2/+2
| | | | | | | | | | | | | | | | | | | | This restores behavior from b4d31c9ff5f0c5821ea127c663532d9fc2cae43e which got broken in fc636af3a723ee8b4ee42cf71864ae0df5ca4621. As documented, PinchHandler.scale is the accumulated scale that would be applied to the target item (even if there is no target), whereas activeScale is the scale during one pinch gesture. After the first gesture, these two values are supposed to diverge, even if there is no target; that way you can bind scale to some property, to scale something else in the same way that PinchHandler would normally scale its target. Pick-to: 6.2 6.4 Fixes: QTBUG-108549 Task-number: QTBUG-68941 Task-number: QTBUG-92064 Change-Id: I32ff37e394fd8466128603eddd5697ba1cc1a0ed Reviewed-by: Qt CI Bot <[email protected]> Reviewed-by: Richard Moe Gustavsen <[email protected]>
* QQuickTableView: factor out parts of the key handling into private functionRichard Moe Gustavsen2022-11-172-156/+192
| | | | | | | | | | | | Factor out most of the code in the keyPress() handler that deals with changing the current index into a private function. This will reduce a lot of d-pointer indirection, but more importantly, simplify and prepare the keyPress handler to be able to support the new editDelegate API in later patches. Change-Id: I2710a34261b4a28e45a03f3eb436d87dd1605c7a Reviewed-by: Mitch Curtis <[email protected]>