aboutsummaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Fix up global name determination when compiling ahead of timeSimon Hausmann2019-03-152-2/+3
| | | | | | | | The list of names is still suboptimal, but at least it's shared now. Task-number: QTBUG-69898 Change-Id: I16c9839c4a1f097053b28caea894b67757972826 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Fix type error exception messages when using member lookupsSimon Hausmann2019-03-151-1/+23
| | | | | | | | | Our tests expect those exceptions to have the same message as when not using lookups. Task-number: QTBUG-69898 Change-Id: Iab36519844a3a49ef9e34346e9afeb2eee9f9ced Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Make object property lookup resolution virtualSimon Hausmann2019-03-154-74/+105
| | | | | | | | | | This allows sub-classes of Object to have their own lookup resolution and verification logic, instead of squeezing it all into qv4lookup.cpp. The typical fallbacks are still in qv4lookup.cpp though. Task-number: QTBUG-69898 Change-Id: I32a8884982b37e2065090666a7bf05b198f5b7fd Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Unify the JavaScript parsing recursion checksUlf Hermann2019-03-1510-75/+95
| | | | | | | | | | | | | We only need to check in one central location and we can allow for more recursion. 4k recursions seem tolerable. A common default for stack sizes is 8MB. Each recursion step takes up to 1k stack space in debug mode. So, exhausting this would burn about half of the available stack size. We don't report the exact source location in this case as finding the source location may itself trigger a deep recursion. Fixes: QTBUG-74087 Change-Id: I43e6e20b322f6035c7136a6f381230ec285c30ae Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Doc: Link to the correct example in Qt Quick States topicTopi Reinio2019-03-141-1/+1
| | | | | | | | | While there is no dedicated example for states and transitions for Qt Quick, the Animation example covers these concepts. Fixes: QTBUG-74428 Change-Id: I00f6ca54123011599ebbb6b7bc53d3104b1586ca Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Don't keep raw pointers to SparseArrayNodeUlf Hermann2019-03-143-5/+6
| | | | | | | | | | | | The nodes are owned by the SparseArrayData and will be freed whenever an item is deleted from the array. Therefore, we have to look up the node for each iteration. This is slightly slower, but at least it doesn't crash. Fixes: QTBUG-74188 Change-Id: Id24324a8c83b00b3ad1212cdaabccabd6c8a999f Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Save some stack space during code generationUlf Hermann2019-03-145-153/+192
| | | | | | | | | | | | | | Result objects are rather large, 96 bytes here. In a recursive algorithm such as our parser, we should not keep too many of them on the stack. Also, the size of Reference can be reduced by employing a bit field rather than a number of booleans. Also, try to convince the compiler to inline the accept() functions. The extra stack frames those create are unnecessary. Task-number: QTBUG-74087 Change-Id: I5c064491172366bb0abef99ffe9314080401a7d1 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Doc: link to C++ and QML integration flowchartMitch Curtis2019-03-121-0/+2
| | | | | | | | | | The chart makes it easier to find the correct way to register a C++ type with the QML type system, so it makes sense to link to it from these docs. Task-number: QTBUG-74318 Change-Id: Iba74ce02d200d6609dbb0a508d618226a6fe1e54 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Fix leaking of QML QQuickItemGrabResult objectsVal Doroshchuk2019-03-111-2/+4
| | | | | | | | | | | | If QQuickItem::grabToImage is called from QML, QQuickItemGrabResult is created but was never deleted. Adding a deleteLater() right after dispatching the callback ensures that QQuickItemGrabResult objects are deleted. Task-number: QTBUG-73723 Change-Id: Ifda85599098f2b679ae5f22e1d47a73962ed0a85 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Disable tail calls for function called with more arguments than formalsUlf Hermann2019-03-041-1/+3
| | | | | | | | | | | We cannot easily find the required stack space to store the extra arguments without adding a new stack frame. In principle it would be possible, but heavily recursing on such functions should be a rare problem. Change-Id: I1a53a6d29e37ce67aa7bd64acb7b1f41197e84c0 Fixes: QTBUG-72807 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Fix a bug where hover events were not sent if the mouse was never movedJan Arve Sæther2019-03-041-0/+1
| | | | | | | | | | | | | This happened if the "real mouse" was never moved, since moving the real mouse caused it to update the internal QQuickWindowPrivate::lastMousePosition. If the window never got any mouse events, it would therefore fail to generate proper hover events. However, if the window got exposed under a mouse cursor it would generate a hover enter event. We therefore update lastMousePosition when that happens also. Change-Id: I77d9b1bd779a813756c4056b015f2e81664b6d36 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Don't crash if the synth-mouse touchpoint is absent from a touch eventShawn Rutledge2019-03-041-12/+16
| | | | | | Fixes: QTBUG-74008 Change-Id: Ib232b723e4a246db0312145ef475ce81cd5f1a5f Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* Doc: QQmlApplicationEngine::objectCreated() also signals errorsUlf Hermann2019-03-011-3/+5
| | | | | | Fixes: QTBUG-73298 Change-Id: Icb872963982f32baf6e9489f43d228041bcea2b8 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Doc: Document peculiarity of sorting DelegateModelGroupsUlf Hermann2019-03-011-1/+2
| | | | | | | | | If an item is part of multiple groups, moving it in one group also moves it in all other groups. This has been the case since the groups exist. Fixes: QTBUG-73707 Change-Id: Id1a6e82f667eaf992982e693475b734f485eb8a2 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Doc: Fix use of \QtMinorVersion in snippetsKai Koehne2019-03-011-16/+16
| | | | | | | | | | | Macros are in general not extended in \qml..\endqml code snippets. You need to make it an explicit argument. This fixes a regression introduced in fd3cf7a45ad5abf26. Change-Id: Ic3a44d6c66b2301a12e051d647dfa6aebf8e8256 Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* QQuickFlickable: fix setContentX/setContentY comparing qrealYulong Bai2019-03-011-2/+2
| | | | | | | | | QQuickFlickable::setContentX/setContentY used !=/== to compare qreal, which would trigger binding loop warnings while using bi-directional property bindings. Fixes: QTBUG-74128 Change-Id: I224a924e11c93cf047478ba0e09e10e57eedabde Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Text: render table cell backgrounds properlyShawn Rutledge2019-02-282-9/+13
| | | | | | | | | | | | | | | | | | | QQuickTextNodeEngine::addTextBlock() was noticing the background color of text fragments, including those within table cells (and adding to the colorChanges vector for rendering), but not rendering a rectangle for the background of the entire table cell. So while the color was correct, it only took up as much space as the text itself. Also, QTextDocumentLayout needs to be told how much width is available so that QTextDocumentLayoutPrivate::layoutTable() will allocate cell width appropriately in case width is given as a percentage, e.g. <td width="20%">. This is done by calling QTextDocument::setPageSize() with correct width in pixels rather than zero. Fixes: QTBUG-72457 Change-Id: I5c8f861829f76d1cf4044fccd1142c3817bb33bc Reviewed-by: Andy Shaw <andy.shaw@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Doc: Fix link issuesNico Vertriest2019-02-286-20/+27
| | | | | Change-Id: I0e08820a6d25996fe27118f05214ff63d695d24e Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
* qtlite: Fix build the source code with -no-feature-shortcutMikhail Svetkin2019-02-271-0/+4
| | | | | | Change-Id: I7b1b3fc60eb40e799c6622ea1d4ad14baa0fe269 Reviewed-by: Liang Qi <liang.qi@qt.io> Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* doc: Clarify that DelegateModel is a kind of proxy modelShawn Rutledge2019-02-261-6/+12
| | | | | | | | | | | | | | | | | It was not quite clear in the GridView DnD example that the ListModel doesn't get reordered, so if new ListElements are inserted after reordering the DelegateModel by DnD, predicting the position where new delegates will appear becomes a bit of a riddle. Also: - the QQmlDelegateModelAttached::model is a model, not an int - disambiguate the properties that have the same names in QQmlDelegateModel and QQmlDelegateModelAttached, using \keyword for linking. Task-number: QTBUG-34891 Change-Id: I485fd632f67d607652428b4e3c9ca528e57f7348 Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
* Don't crash when passive grabber deleted before exclusive gr. releasedShawn Rutledge2019-02-261-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | In this scenario, a DragHandler is inside an Item in a Loader, under a MouseArea, which unloads the loader on press. So on press, the DragHandler acquires a passive grab, then the MouseArea acquires the exclusive grab, then the DragHandler is destroyed along with its parent when the Loader is unloaded. On release, QQuickEventPoint::setGrabberItem(nullptr) was sending an onGrabChanged(passiveGrabber, OverrideGrabPassive, this) notification. That was questionable: the handler was not just then getting its grab overridden, but rather un-overridden, because the exclusive grab was being released. It's also a good idea to check for null pointers, since m_passiveGrabbers is a collection of QPointers already, so we can tell when a passive grabber is deleted dynamically. It can also be reproduced with MultiPointTouchArea just as with MouseArea, so the test is written that way for convenience, because we have tst_multipointtoucharea_interop already. It doesn't really matter which handler has the passive grab, or which item has the exclusive grab that's being relinquished. Fixes: QTBUG-73819 Change-Id: Ic605efa2143a1d849be095dcb88d6c38d7d2ee19 Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* QAnimationGroupJob: Notify about removed children on clear()Ulf Hermann2019-02-261-7/+3
| | | | | | | | | | Derived classes, such as QSequentialAnimationGroupJob, might keep additional pointers to the children. Those need to be cleared, too. Therefore, use the regular removeAnimation() method for clearing. Fixes: QTBUG-73828 Change-Id: I64cc1fe4da59f10b29f27012b10f93b4289b6e5a Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Unify and fix number to string conversion with radixUlf Hermann2019-02-252-39/+16
| | | | | | | | | | | Previously, the loop that generated the string could fail to terminate with certain numbers as input. Also, the algorithm was duplicated in two places. Change-Id: Ie2075148d931e7cfcedb5bcd23af61e2e8afc232 Fixes: QTBUG-73999 Reviewed-by: Robert Loehning <robert.loehning@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* V4: Rotate loop in ArrayPattern and eliminate "done" labelErik Verbruggen2019-02-251-11/+5
| | | | | | | | | | This prevents jumping over the resetting of the unwind handler when an exception occurs. (cherry-picked from commit 0282b89ec672e25a465a8e51bc74c7fd58a624b1) Fixes: QTBUG-73985 Change-Id: I4a4da815f54c13980d239e0492f9b013991cfbd5 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* V4: Fix unwind handling when destructuring listsErik Verbruggen2019-02-251-14/+1
| | | | | | | | | | | If there was a rest element in the list, the generated code would jump over the clean-up (closing of the iterator). However, this would also jump over any resetting of the unwind handler. (cherry-picked from commit 3310f173c1c6208cb0f6541578419196bc29831f) Task-number: QTBUG-73985 Change-Id: I9a1bcb9e69fd98975fe9c89e23a4568b0dafdf83 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Update the cursor when the window is enteredAndy Shaw2019-02-251-0/+1
| | | | | | | | | | | | When a window is entered, due to another window being hidden, then it is possible that the item under the mouse has a different cursor than the one previously set for that window. Since there will not be a mouse move at this point yet, then we should update the cursor right away. Change-Id: I2ef3c72617ae5c995a4daf7daef1ba3311fdcc12 Fixes: QTBUG-41045 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Merge remote-tracking branch 'origin/5.12.2' into 5.12Qt Forward Merge Bot2019-02-221-9/+22
|\ | | | | | | Change-Id: If1c718780a48a3e818eb5a0c0907a31acb6c694d
| * Only warn about incompatible parameter types passed from QMLUlf Hermann2019-02-211-9/+22
| | | | | | | | | | | | | | | | | | Throwing a TypeError is too drastic. We need to properly deprecate this pattern before we actually enforce the compatibility. Fixes: QTBUG-73943 Change-Id: I00313ad7aed4021a7368fd014e2bfc6443b177e3 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | QML: Pass type minor version when creating property dataUlf Hermann2019-02-219-27/+28
| | | | | | | | | | | | | | | | | | Depending on the type minor version recursive properties should be available or not. Check for that when resolving grouped properties. Fixes: QTBUG-33179 Change-Id: Id8f62befdc4a29d879710499e19d3d289bd18775 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | QQmlDelegateModel: guard new row/column properties with revision 12Richard Moe Gustavsen2019-02-217-4/+33
| | | | | | | | | | | | | | | | | | | | Tag the new 'row' and 'column' properties with revision 12. This will make sure that they cannot be accessed by the delegate unless the QQmlAdaptorModel has the correct minorVersion set. Fixes: QTBUG-70031 Change-Id: I49e67c37ab5b7925c7bca313bbb99f04d1387cc4 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* | QQmlAdaptorModel::Accessors: create a propertyCache for all accessors, not ↵Richard Moe Gustavsen2019-02-214-42/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | just for QAIM From before, only accessors for wrapping a QAbstractItemModel had to create a dynamic QMetaObject together with a shared QQmlPropertyCache (for enabling model roles in the delegate). Each model item in the view would get a QQmlData with the dynamic property cache assigned, which would then later be used by the v4 runtime during property lookup. But after we added the properties 'row' and 'column' to the model items, we now always need to create a property cache, regardless of the Accessor used. That way we can we specify the correct metaObject revision of the model item in the cache, which will also allow us to revision the new properties so that they will be respected by the v4 runtime. In this patch we hard-code the revision (modelItemRevision) to be 0, but this will change in a subsequent patch. This patch will move the 'metaObject' and 'propertyCache' up to the base class (Accessor), and ensure that we create a property cache for each of the non-pure-virtual sub classes. The model item wrappers will then, when creating a QQmlData, assign the shared cache from the associated Accessor. Task-number: QTBUG-70031 Change-Id: If6a67d5968d360d4a2b23d8291669c0549e8a342 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* | QQmlPropertyCache: support setting an explicit metaObject revisionRichard Moe Gustavsen2019-02-212-2/+12
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When creating a QQmlPropertyCache for a QMetaObject, there were currently no way to specify which revision to use. Normally this is not needed, since when creating property caches for types declared in QML, the correct revision would be filled in later, based on the import version found in the QML file. But sometimes we need to create a QQmlPropertyCache for a QMetaObject created in C++, that has no associated QML file and import version. And if that meta object has revisioned properties, we need to specify which revision of the meta object the cache should represent. Otherwise, the revision would just be 0, which means that revisoned properties would not be found by the V4 runtime later. As an example, QQmlAdaptorModel has a set of classes that wraps various models (QAIM, arrays, etc). When a new delegate item is created by a view, an instance of a model class will be created as well (from C++). This instance will be set as context object for the delegate item, enabling properties such as index, row, column and model roles. But since row and column should a revision (currently they don't), we need to be able to specify that the property cache should have a revision that matches the import version of the view. That way, we can ensure that they don't shadow any existing row and column properties that might exist in the application from before, and as such, cause regressions. This patch will add an extra argument to the constructor that lets you specify which revision of the QMetaObject to use. Task-number: QTBUG-70031 Change-Id: I1c245a0c8b6f071e35865966fedc97f2839cd2f3 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Fix PropertyKey::isArrayIndexErik Verbruggen2019-02-191-1/+1
| | | | | | | | | PropertyKey::asArrayIndex has a hole at UINT_MAX, so make isArrayIndex have the same hole. Change-Id: I85d0f14680c27d018644056960d75d94aee68646 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Doc: elaborate on default values for Layout.alignmentMitch Curtis2019-02-191-1/+5
| | | | | | | | | | | It wasn't clear which values would be used when only a horizontal or vertical flag was set. Change-Id: I99b4a13a87b35a74f1ab80c5fafa9df621bf7b10 Reviewed-by: J-P Nurmi <jpnurmi@qt.io> Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io> (cherry picked from commit a484ea0d3666b57bb49e9284ff86af3ba87ce58b) Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* Avoid unnecessary re-generation qml cache files in some circumstancesUlf Hermann2019-02-1810-40/+54
| | | | | | | | | | | | The map of name IDs to resolved types so far is copied several times during compilation and different compile passes see different copies of it. Compile passes may add things to the map, and if they do that on copies that are inaccessible to other code, we get nondeterministic results. Furthermore all the copies and pointers are confusing and inefficient. Fixes: QTBUG-69340 Change-Id: I43ad3cbeeec34f90e05570eddc901fe8aa64c709 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* QQuickTableView: use correct WRITE function for contentHeightRichard Moe Gustavsen2019-02-181-1/+1
| | | | | | | | | | The auto test didn't catch this, since there we use the setter functions directly from c++, instead of accessing the properties. Change-Id: I2101e4cfab11d1c0e037f6ca134b6804d328e162 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* QML: Don't crash the parser on certain kinds of bad inputUlf Hermann2019-02-181-2/+6
| | | | | | Fixes: QTBUG-72734 Change-Id: I92146ec517c6a26a67e13830618e137f2a3021c2 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Check parameter types when invoking C++ functions from QMLUlf Hermann2019-02-171-9/+31
| | | | | | | | | | | | | | | We now check if the given parameters can be converted to the expected arguments of the function being invoked and throw a type error if not. Previously we would still invoke the method with random parameters. [ChangeLog][QtQml][Important Behavior Changes] The parameters passed to C++ functions from QML are now checked for compatibility with the expected arguments. If they cannot be converted, a type error is thrown in JavaScript and the function is not invoked. Fixes: QTBUG-73405 Change-Id: If16089510d314bb7cdb7d4db86478114c61281a8 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* V4: Fix failing assert on all 32bit platformsErik Verbruggen2019-02-141-1/+1
| | | | | | | | | | The failing assert is in qv4mm.cpp:170, which is correct. The failure stemms from the fact that on 32bit platforms, quint64 does not have the same size as quintptr. Who would have thought? Fixes: QTBUG-73821 Change-Id: I9abe6bc9e2bfcdb6700ab7997c078076a9883cf2 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* V4: Fix JS tail call crashes on win32/linux32Erik Verbruggen2019-02-142-11/+6
| | | | | | | | | | | | For platforms where arguments are passed on the stack, we would do an invalid (off-by-one) calcultion to see where we should put arguments for a tail call, thereby overwriting other values. As we don't write to these memory locations anywhere, and the arguments are exactly the same as calls to jitted code (which is done by design), we could just as well re-use them. Change-Id: If4118b2023da6dc301252a1579a36df0e0cbc3a5 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* PropertCache: Don't pass Q_GADGET value types as integersUlf Hermann2019-02-141-2/+2
| | | | | | | | We need to check for the IsGadget flag there. Fixes: QTBUG-73734 Change-Id: Ic4afd4215e6ed346bc40794d85397f0f262715e2 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* DelegateModel: Zero foreign context objects when they are deletedUlf Hermann2019-02-142-1/+17
| | | | | | | | | If we keep plain pointers to objects we don't own, we need to zero them when something else deletes them. Fixes: QTBUG-73733 Change-Id: Ib4f3e144f10f70ab6cf44af4ffa62725470d3972 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Canvas: Handle switching between object and string based colorsAndy Shaw2019-02-141-2/+7
| | | | | | | | | | | | | When switching between the two it should respect whatever the color is regardless of whether it is a color value or a string based color. This also accounts for "invalid" colors as this should set the stroke-style to be #000000 to be inline with the default stroke-style indicated in the specification. Change-Id: I00bee6c9a85787762271882838510b4187798ee0 Fixes: QTBUG-42155 Fixes: QTBUG-52959 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Connect quit() and exit() signals with queued connectionsMichal Policht2019-02-131-2/+4
| | | | | | | | | | | | | | | | | | Class QQmlApplicationEngine connects QQmlApplicationEngine::quit() signal to QCoreApplication::quit() and QQmlApplicationEngine::exit() signal to QCoreApplication::exit(), but it does so with AutoConnection. This causes in some circumstances problems, which are described in Qt documentation (see QCoreApplication::exit()). This change modifies type of connections to queued connections. [ChangeLog][QtQml][QQmlApplicationEngine] QQmlApplicationEngine connects quit() and exit() signals with queued connections to avoid problems with AutoConnection, when connecting to QCoreApplication slots. Task-number: QTBUG-73649 Change-Id: Ib27738b5af2f879efee8862b1ca01613a2e8dc4e Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Don't optimize global lookups if fast QML lookups are disabledUlf Hermann2019-02-133-2/+5
| | | | | | | | | | | If fast QML lookups are disabled, we generally want to look up by string. If the name then happens to be a member of the global JavaScript object, we still don't want to directly access that, as the name could have been overridden in a deeper context. Fixes: QTBUG-73750 Change-Id: Id16110969123d91501064ba46bfad4c2a39e4650 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Defer QML testing until event loop has startedTor Arne Vestbø2019-02-121-1/+5
| | | | | | | | | | | | Executing the event loop means we get various things set up properly, such as runloop auto-release pools on macOS. If not, the whole test suite will be run as a result of the setWindowShown call. Change-Id: Ie217d803208134c5be7db0ee04fbfab86702b521 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Doc: explain when the move velocity and duration properties are usedMitch Curtis2019-02-071-0/+5
| | | | | Change-Id: Iaf7cf035f76a1f198c60f4792d394b0fd19ef901 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Fix bug where QQMPH kept an exclusive grab when no buttons were pressedJan Arve Sæther2019-02-061-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This happened if you moved the mouse while doing a multitouch operation. More specifically this caused the bug: 1. Open qtdeclarative/tests/manual/pointer/map.qml 2. Rotate the map with two fingers (Do not release fingers). 3. Move mouse (no buttons pressed). 4. Release both fingers. 5. Move mouse again (error: the draghandler has a grab and thus the map is dragged even if no buttons are down). This happened because if you moved the mouse while having two fingers down, Windows would generate a *mouse*move* event with Left button or Right button pressed (which wasn't the case on the physical device but it's probably because of a bug in how mouse events are synthesized from touch on Windows). This caused the QQuickMultiPointHandler to do a passive grab. Then, when releasing the fingers it would not send a mouse release event (just plain touch release events), so the QQuickMultiPointHandler would keep the passive grab it had. All subsequent mouse move events would then be dispatched to the QQuickMultiPointHandler where it would assume that the button was pressed until it got a release event (but button was never pressed so that wouldn't happen). Eventually it would perform an exclusive grab, and dragging was initiated. Change-Id: I42b3133c5fde93c7f92f1cb28705156a69f9ad1c Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* QQuickWindow: don't give exclusive grab to invisible or disabled ItemsShawn Rutledge2019-02-051-1/+1
| | | | | | | | | | | | An Item might set itself invisible or disabled while handling a mouse press, as an alternative to rejecting the event. In earlier Qt versions (e.g. 5.6) it did not end up with a grab in such a case. Task-number: QTBUG-63271 Change-Id: I12f646e4217d773d396f380672420c85e6adcd52 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* QMLJS: Have ScanFunctions iterate over ArrayPattern nodesErik Verbruggen2019-02-052-0/+9
| | | | | | | | | | | | Like Codegen, have ScanFunctions iterate over the elements in an ArrayPattern, instead of recursing over the tail of the element list. This prevents running out of (native) stack, or hitting the recursion check limiter. Change-Id: I8203af3119ad50f19000a215af42649d9bcb3784 Fixes: QTBUG-73425 Reviewed-by: Lars Knoll <lars.knoll@qt.io>