aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items
Commit message (Collapse)AuthorAgeFilesLines
* Warn, don't crash during nested delivery of mouse or touch pressesShawn Rutledge2018-10-132-0/+10
| | | | | | | | | | | | | If during delivery of a mouse press, user code calls qApp->sendEvent() with another mouse press, then when delivery of the nested event is finished, we call QQuickPointerMouseEvent::reset(nullptr). Then when delivery of the original mouse press resumes, crashes are possible because most of the code assumes that QQuickPointerEvent::m_event is not null during delivery. Change-Id: Id65b1f2f64351e40d03bcd4f4d16693d616729da Fixes: QTBUG-70898 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* QQuickItem: document which events are accepted by defaultMitch Curtis2018-10-041-1/+42
| | | | | Change-Id: I64a2ab811b48d2a231e18c493fb1f6087fd02905 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Don't get confused about the grabber during replayDelayedPressShawn Rutledge2018-10-031-35/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Re-apply a fix equivalent to 8bdf33051aa679db1f060314c6ccab1cb9a77a7a which seemingly never got included in 5.10 or newer branches. If a ListView with pressDelay contains a MouseArea in a delegate, and you tap the MouseArea on a touchscreen, QQuickFlickablePrivate::replayDelayedPress() sends a saved copy of the original QMouseEvent, and then a synthetic release, without marking it as synthetic. (QQuickFlickable is not touch-aware in any way: it thinks the mouse events it receives are real ones.) As a result of sending the delayed press through, QQuickWindowPrivate::setMouseGrabber() is called and sets the touchpoint's grabber to the MouseArea, but does not set the core pointer's eventpoint's grabber. Flickable then ungrabs for itself, so we have to ensure that the ungrab affects either the actual mouse or the synth-mouse, whichever was in use. Then because the synthetic release is not known to come from a touchscreen, QQuickWindowPrivate::deliverMouseEvent() was checking the core pointer's grabber and concluding that there is no grabber. In such a case, it now checks whether touchMouseId is set, meaning that we are somewhere between sending a synthesized press and release, gets the touchpoint's grabber (which is MouseArea, because it didn't reject the press), and sends the release there. Task-number: QTBUG-61144 Fixes: QTBUG-69059 Change-Id: Ie027bef4c8de16e1cbf5d19e120cb22a3df4c037 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* Add QQuickItemPrivate::updateOrAddItemChangeListener()Mitch Curtis2018-10-022-0/+11
| | | | | | | | | | | | | | | | This is identical to the existing updateOrAddGeometryChangeListener(), except that it updates the regular "types" member, not "gTypes". This function will allow preventing duplicate change listeners, at the expensive of a call to QVector::indexOf(). It's useful when there is no other way for calling code to check if a listener will be a duplicate before adding it. Task-number: QTBUG-69056 Task-number: QTBUG-70729 Change-Id: Idba039f355023e8d45a8b46e4af95aa81c13c3f4 Reviewed-by: Michael Brasser <michael.brasser@live.com> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Prevent PathView's parent stealing mouse grab during double-flickChris Adams2018-09-241-0/+2
| | | | | | | | | | | | | This commit fixes an issue where mouse events could be stolen by the parent of a PathView due to the PathView not correctly setting the keep-mouse-grab flag in handleMousePressEvent(). This commit ensures that the flag is correctly set, so that the second flick in a double flick is handled by the PathView rather than being stolen by the parent. Task-number: QTBUG-59620 Change-Id: Iccdfe16e7e80e6d1d31f95c3dba9c8839b20f30f Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Add some null pointer checks to avoid some rare crashesv5.11.2Jan Arve Sæther2018-09-112-10/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | The crashes happened because somebody was calling processEvents() from a mouse/touch event handler that was running for a long time. If we called processEvents() from the onPressed handler, and we released the mouse while still not having returned from the onPressed handler, it meant that we were actually delivering the release event before the press event was fully delivered... This should normally not be a problem, but QQuickWindow is reusing the QQuickPointerEvent object for each incoming QEvent, which meant that when we were delivering the release event, it would reuse (and overwrite) the QQuickPointerEvent that the press event handler is still using.... This then caused some assumptions that the code made to be wrong. This only avoids the crashes, and doesn't really fix the "out-of-order" delivery and the state inconsistency that this can lead to (e.g. mouse button states might be still wrong). But on the other hand, it is not the recommended way of making a long-running handler not block the application. The proper way is to create a thread that will run in the background, so that there would be no need to call processEvents() in the event handler. Change-Id: I6fa5d4f5748ef30d082a210f03ef382922bd4b29 Task-number: QTBUG-65454 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Doc: Add precision to scene graph descriptionPaul Wicking2018-07-301-4/+4
| | | | | | Task-number: QTBUG-60913 Change-Id: I3a9d8925337a12a849e39a70f168dbfc7f007e5f Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Remove const from QQuickPointerEvent::device propertyShawn Rutledge2018-07-271-1/+1
| | | | | | | | | A property never has const pointer as its type. Getting this wrong also causes problems with the QML type registration not matching the actual type. Task-number: QTBUG-61749 Change-Id: Ic3c47499cc4dff6df0beecf5b1413c76509ca6f5 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Doc: Fix broken link targetsPaul Wicking2018-07-251-0/+1
| | | | | | | | | * Rename two section titles that caused confusion for the autolinker. * Add see also link to correct location from SpriteSequence QML type. Task-number: QTBUG-58640 Change-Id: I62b941d00198ac56d998ca14b926c7bb37f6c91e Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* QQuickRenderControl: Grab framebuffer with alpha if the window uses itAndy Shaw2018-07-121-1/+2
| | | | | Change-Id: Ie11e86be997d749e6f82f0fb81a82bb0b50ab1f1 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Item, QQuickItem: document which properties are used in map functionsMitch Curtis2018-07-101-0/+28
| | | | | Change-Id: Idf3aecf88319a2967ca51985003be32c7e7ef42a Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Don't leak components in QQuickLoaderColin Ogilvie2018-07-051-2/+6
| | | | | | | | | | | Only create source component in loadFromSource if it does not already exist. Previously toggling the active status when loading from source would create a new source component every time active became true. [ChangeLog][QtQuick][Loader] Don't leak components when changing source url. Change-Id: I1e4cfd5613e3851fcb4f3f55e78981f7c070cc77 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Doc: add a section that demonstrates various contentX/contentY statesMitch Curtis2018-07-041-1/+26
| | | | | | | This makes it easier to visualize how the properties work. Change-Id: I04cb1a99a1f831e5c892cb27e4a0cd127fe450e0 Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
* Doc: clarify behavior of QQuickItem's constructorMitch Curtis2018-07-021-0/+3
| | | | | | | | It uses the parent argument as both a visual parent and a QObject parent. Change-Id: Ib6c645c072462501c77f27085cba7538703c5966 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Build without the draganddrop featureAndy Shaw2018-06-252-3/+2
| | | | | Change-Id: I5e3a3ebd36d49fdf649eec5a3fb0a8fdb048ce0d Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* QQuickPathViewPrivate: fix heap-use-after-freeMitch Curtis2018-06-251-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The TabBar auto tests in Qt Quick Controls 2 repeats the following process very quickly for several data rows: 1. Creates a TabBar (PathView, when using the Universal style) 2. Moves items in its QQmlObjectModel 3. Deletes the TabBar When run with ASAN, this test would fail, because the TabButtons (which are child items of the PathView) would try to access a deleted QQuickItemChangeListener upon their destruction. The underlying issue is that QQuickPathView::modelUpdated() is called, and before a refill() can happen, the view is deleted. QQuickPathView::refill() was the only execution path that was releasing the cached items (QQuickPathViewPrivate::itemCache), and since part of releasing an item involves removing the QQuickPathView as a change listener from the item, the item would access the deleted view (listener) when the item was being destroyed. This patch fixes the issue by also releasing cached items in QQuickPathViewPrivate::clear(), which is always called by the destructor. Task-number: QTBUG-68964 Change-Id: Ic5bf0943be79948c86bf7c07ef13ecd1a7b971ba Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io> Reviewed-by: Robin Burchell <robin.burchell@crimson.no>
* Doc: Move the code snippets to a separate snippet fileVenugopal Shivashankar2018-06-221-5/+1
| | | | | Change-Id: I17671563f2beebe16ae1d08552854eaf44ae43ee Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Doc: Add missing dots (qtdeclarative)Paul Wicking2018-06-1940-71/+71
| | | | | | Task-number: QTBUG-68933 Change-Id: Ibb5aa227e82825085e7214e17dcffcb17fd44157 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Flickable: fix another possible cause for out-of-sync moving flagsNils Jeisecke2018-06-191-4/+2
| | | | | | | | | | | | | | | | | | In addition to d868bb4f3e4b0424fd4a2989ff1c82692b0f014c this removes the check for scrollingPhase in movementEnding. If movementEnding is invoked by some codepath other than timerEvent (e.g. setContentY) and scrollingPhase is true this will again prevent any further invocation of movementStarting from within the drag method (see d868bb4). As this check was introduced together with the movementEnding timer (QTBUG-63026) and scrollingPhase is now checked inside the timerEvent there should be no need for the check in movementEnding. Task-number: QTBUG-67460 Change-Id: I88ad6e3ee56b88a66bb61798b8876324f4842f1e Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Fix subrect of mismatched dpr sprite imageAllan Sandfeld Jensen2018-06-011-5/+5
| | | | | | | | | Scale the subrect to fit image dpr. Task-number: QTBUG-68490 Task-number: QTBUG-68582 Change-Id: I6b0a9af73013dc6cf2b65103d5868f45da8e338e Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* setGrabberItem: consistently call touchUngrabEvent or mouseUngrabEventShawn Rutledge2018-05-152-8/+7
| | | | | | | | | | | | Calling grabberItem() to get the old grabber must come before setting m_exclusiveGrabber. Then we call oldGrabberItem->touchUngrabEvent() or oldGrabberItem->mouseUngrabEvent() as appropriate. Now the responsibility for this is moved from QQuickItem::grabMouse() to QQuickEventPoint::setGrabberItem() (which it calls). Task-number: QTBUG-65648 Change-Id: Ia6219cb798d7f671ccc4006d51eeb87dbdbda3ef Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* Pass the arguments correctly to QRadialGradientAndy Shaw2018-05-151-1/+1
| | | | | | | | | | The parameters for createRadialGradient indicate the position and radius for the two circles. Therefore the radius arguments should be used with their respective circle positions. Task-number: QTBUG-67960 Change-Id: Ifacba4d43939bafeed451e713250f716a11d30d1 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Fix for input method commit that ends with newlinePaul Olav Tvete2018-05-141-1/+7
| | | | | | | | | | | | | | | | | If the input method event contains a commit text that ends with a newline, text, the commit string is inserted first. This changes the current block. This change makes sure that we apply the formatting changes (including removing the old preedit text) to the old block in this specific case. This is a copy of change 6cece0f43a18dc8c9dbf5bc49ce515714f090725 in qtbase, since the code is duplicated. Task-number: QTBUG-67836 Change-Id: I531d3f1dce51d840acc0ef7fda9e7affb3192327 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Fix build without features.gesturesTasuku Suzuki2018-05-143-1/+24
| | | | | | Change-Id: Id2fb6419be9a35ddaa24106d3022e72070cb908d Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* MouseArea: set pressed state to Qt::NoButton not nullptrShawn Rutledge2018-05-131-1/+1
| | | | | | | Correction to 499ec43937e926e4f2fa57a9baa455fcb3862262 Change-Id: I9f9fb7cf3a0a04611e7f0a31f57147fbbc03c1a5 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Fix bug where Ungrab event was not sentJan Arve Sæther2018-05-111-1/+2
| | | | | | | | | | | | clearGrabbers() will also clear QQuickWindow::mouseGrabberItem(), so we have to retrieve a copy of the mouse grabber item in advance of calling clearGrabbers(). This could happen when a filtering parent actually called grabMouse() on mouse release(!) event. Change-Id: I287214dbdff802707be625d73c38dd9c5d723aef Task-number: QTBUG-68030 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Fix crash when changing the source of AnimatedImage after a frame changeLouis du Verdier2018-05-081-5/+11
| | | | | | | | | | | | | | | | | | | | | | QMovie emits the signals updated() and frameChanged(), and restarts right after its timer to prepare for the next frame. Since AnimatedImage destroys its underlying QMovie when its source changes, the lines after emit frameChanged() in QMovie will use free'd memory and will most of the time produce a crash. This fix delays the destruction of the underlying QMovie of AnimatedImage using deleteLater() to prevent this kind of behavior from happening without impact/behavior change in the code of QMovie. Unit tests added as well to cover this situation. This commit also fixes a similar crash when Component.onCompleted is called and when the source changes in the associated callback. Task-number: QTBUG-67427 Change-Id: Ic6568a1bc251e5fa2ee1cf8e5f50eaa56c3007db Reviewed-by: VaL Doroshchuk <valentyn.doroshchuk@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Louis du Verdier <louis.du.verdier@free.fr>
* QQuickItem: Guard against null deref in transformationsRobin Burchell2018-04-301-0/+6
| | | | | | | Change-Id: Ieb14322c104d816842e04e521b556bfc11855f1c Task-number: QTBUG-67024 Reviewed-by: Robin Burchell <robin.burchell@crimson.no> Reviewed-by: Michael Brasser <michael.brasser@live.com>
* Fix crash when using drag with Drag.AutomaticFriedemann Kleint2018-04-262-3/+12
| | | | | | | | | | QQuickPointerTouchEvent::m_event is 0 when calling QQuickPointerTouchEvent::isPressEvent(). Add a convenience function with a check returning the Qt::TouchPointStates. Task-number: QTBUG-44976 Change-Id: I2433ec3c56adeda2de190ca46aed8413a1357c55 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Add handling of device pixel ratio to animated spritesAllan Sandfeld Jensen2018-04-266-23/+54
| | | | | | | Change-Id: I472f61241d1875daf0de0a597bf27c019314f48f Task-number: QTBUG-50119 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* Fix QQuickListViewPrivate::snapItemAt for lists with spacingJohan Klokkhammer Helsing2018-04-251-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If lists had spacing, snapping would have gaps where snapItemAt would return nullptr eventhough there were items above and below in the list. I.e. if we have a list with items of size 100, and a spacing of 100, and scroll to 110 (right below the first item), then the first item would fail because this is false: itemTop+itemSize()/2 >= pos (50 >= 110) And the next item (the one we should have snapped to), would fail because this is false: itemTop-prevItemSize/2 < pos (200-100/2 < 110) The meaning of first part was probably to see if the middle of the current item is inside the view. The meaning of the second part was probably to see if the middle of the previous item is outside the view. This patch refactors the code so it's more visible what's happening and fixes the bug by taking the spacing into account when computing the position of the halfway positions. Task-number: QTBUG-59852 Change-Id: I60eec0d16e91d2f22d70b97d11bcde5d88ac2997 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Fix Text with ElideRight not being rendered when reparentedMitch Curtis2018-04-171-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Consider the following example: Item { width: 100 height: 30 Text { width: parent ? parent.width : 0 height: parent ? parent.height : 0 elide: Text.ElideRight text: "wot" } } When setting the Text item's parent to null, its explicit width and height are set to 0. When restoring its parent (the Item), its explicit width and height are set to 100 and 30 again, but the text itself is still not rendered. The cause can be seen here: if (!(widthChanged || widthMaximum) && !d->isLineLaidOutConnected()) { // only height has changed if (newGeometry.height() > oldGeometry.height()) { if (!d->heightExceeded) // Height is adequate and growing. goto geomChangeDone; heightExceeded was false, because 30 > 12 (or whatever the implicit height happened to be), so the text was not laid out again, even though it went from having an explicit height of 0 to an explicit height of 30. Fix the issue by only executing the goto if the old explicit height wasn't 0. Task-number: QTBUG-60328 Task-number: QTBUG-67145 Change-Id: I7f4d2f95bc95c850133ba91ac2d1a02c7ee159b6 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Doc: Describe new 5.11 features in Image elementv5.11.0-beta4Eirik Aavitsland2018-04-131-2/+44
| | | | | | | | Add user documentation of the compressed texture file support and the file extension auto detection. Change-Id: Icfae8574dd3acba30e8275ccd6ff3438fa037868 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* clear() the loader before destroying itLars Knoll2018-04-091-4/+1
| | | | | | | | | | | This prevents bindings in children being evaluated and removes spurious qml errors on the command line. Amends 2eb2d6386da304cd1164264ae0bff685c796d89c. Task-number: QTBUG-63729 Change-Id: I88b85ed40c6b8c5fbb422831055942cc0f4ee424 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Improve QQuickItemGrabResult::image() docsMitch Curtis2018-04-091-1/+1
| | | | | | | | | It can return a null image. An "empty" image is confusing, as there's no function in QImage with that name, requiring the user to consult the docs. Change-Id: Iaa805510804162fe3a7df00394b4a9ad61ac1d20 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* Fix Flickable mouse wheel handling on macOSNils Jeisecke2018-04-061-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On macOS a special movementEnding timer was added to the wheelEvent handling to fix QTBUG-63026. This has introduced a regression with wrong vData/hData.moving flags: When the timer fires before the Qt::ScrollEnd phase is reached, movementEnding is invoked early (can be reproduced with very slow scrolling using the Magic Mouse). In this case movementEnding sets vData.moving = false but not vMoved = false because scrollingPhase is still true. This will prevent any further invocation of movementStarting from inside the drag method (it expects a change in vMoved) so once this situation has occurred the "moving" flags will be out of sync. Visible effect: If a ListView has a currentItem set with setCurrentIndex, its viewportMoved method will no longer correctly set the moveReason to "Mouse" because the check depends on "moving" flag as an indicator for mouse interaction. This results in the view permanently jumping back to the current item on any scroll operation because the moveReason will be stuck at "SetIndex". The fix is to ignore the timer event if scrollingPhase is still true. Task-number: QTBUG-67460 Change-Id: I7cf02b8c625b7baf249ad26c4e0c3df874a18eae Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Doc: correct Sprite's detailed descriptionMitch Curtis2018-04-051-2/+2
| | | | | | Task-number: QTBUG-58641 Change-Id: Ib339746d459328bdac8fa0eeff80300df99ff482 Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
* When deactivating a loader, do not immediately clear its contextErik Verbruggen2018-03-161-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In 2eb2d6386da304cd1164264ae0bff685c796d89c, deactivating/clearing the loader would now prevent any subsequent bindings from being evaluated. The problem there was that the item created by the loader wouldn't have a parent item (among things) anymore, so references to it in the bindings would result in errors. The way to prevent it was done by invalidating the context of the item, which in turn would detach it from the root context. This is a problem if objects in the root context are referenced after deactivating/clearing the loader: onSomethingChanged: { loader.source = "" objectInRootContext.doIt() } This would result in a ReferenceError when resolving objectInRootContext and break the behavior present before the fix mentioned above. The correct way is to recursively clear the context set on all bindings, but leave everything in place. This way, no subsequent bindings will be evaluated, but the currently "running" scripts will still be able to reach the root context. Task-number: QTBUG-66822 Change-Id: Ic9c2ab0a752093a26967da4783cb4c29cf83d2ca Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Michael Brasser <michael.brasser@live.com>
* Improve AnimatedSprite's documentationMitch Curtis2018-03-161-16/+16
| | | | | | Change-Id: Icc86afe67fd5a432798ce3173da51275bed1bf64 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
* Improve SpriteSequence's documentationMitch Curtis2018-03-161-12/+12
| | | | | Change-Id: I7e9e09ba3b6c0ec3c0b4bed75b24ed87fbe9660f Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
* QQuickWindow: skip mouse synthesis for touch events from trackpadsShawn Rutledge2018-03-162-1/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | A trackpad is primarily a mouse-emulating device, which can also recognize gestures, and furthermore can send raw touches iff it is asked to. So, every touch event from a trackpad is likely to be followed by a mouse or gesture event (especially when the MouseEmulation capability confirms that it is able to do that). Therefore mouse event synthesis is redundant. In this bug scenario, MultiPointTouchArea enables touch events within its rectangular bounds. A Flickable is on top. As you flick with two fingers on the trackpad, macOS sends touch events with two touch points (because MPTA enabled touch events) and also a series of QWheelEvents as it recognizes the flick gesture. The Flickable receives mouse events sythesized from one touch point, and reacts as if you were dragging with one finger on a touchscreen, while it simultaneously also reacts to the QWheelEvents. Meanwhile the remaining touchpoint falls through to the MPTA underneath; so the user ends up interacting with both at the same time and making the Flickable jump around besides. This patch just fixes the jumpiness in Flickable: it will no longer receive the synth-mouse events, so it will not be dragged, and will react only to the wheel events. But MPTA still gets the touches. Task-number: QTBUG-66329 Change-Id: I6f535a2c9e47bcb284eaf9ae1fdaa39f8b510af9 Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* Add an example of binding LayoutMirroring to the app's layoutDirectionMitch Curtis2018-03-081-0/+7
| | | | | Change-Id: I81aa96641d9bef35e003b67e691607a926c087d7 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* touchDevice: don't lose bits from QTouchDevice::capabilitiesShawn Rutledge2018-03-081-2/+1
| | | | | | | | | | | | It was a bug that we made a local QQuickPointerDevice::Capabilities instance and didn't pass it to the QQuickPointerDevice constructor. Further, we've now reserved the entire lower byte for storing QTouchDevice::capabilities, and the upper byte for storing QtQuick- specific capabilities, so we can copy the whole lower byte instead of just the lower nybble. Change-Id: Ia21b6a1503ea870a1e16cebe70a20f4e21903054 Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* doc: Fix another link to page titleMartin Smith2018-03-021-1/+1
| | | | | | | Added the word OpenGL, which was missing. Change-Id: Ie09ba1ec59615d2f139ef72e0743f67b6c8ff33d Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* allow DeviceType and PointerType enums 16 bits each; bit packingShawn Rutledge2018-03-021-11/+13
| | | | | | | | | | | | Now in QQuickPointerDevice, the types, flags and capabilities take up 64 bits together, and we reserve enough bits to add more types later. In C++11 enums can be strongly typed by "inheriting" an integer type, so we do that. They are signed because button count and maximum touch points are signed, and because MS compilers do that by default with enums. Change-Id: I45f27bcceeef275cbee256472b35f78fbdeeaad6 Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* Doc: add code examples and GIFs of AnimatedSpriteMitch Curtis2018-02-281-3/+61
| | | | | Change-Id: Ie1c7541e526e2777af83a46d6ff01b3f7a9a0d3e Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* finish renaming of containsMask -> containmentMaskShawn Rutledge2018-02-283-6/+6
| | | | | | | | Followup to 6fa746fa6 to rename setContainsMask and registerAsContainsMask Change-Id: Ifdfaf58dccb5fd3665615418e7f1ea09cb914c55 Reviewed-by: Paolo Angelelli <paolo.angelelli@qt.io>
* doc: Fix some odds and ends in qdoc commentsMartin Smith2018-02-282-5/+9
| | | | | | | | | | | A few incorrent link commands were fixed. A few "No such parameter..." errors were fixed. A \qmlproperty return type qwas adjusted. A comment was removed from between a qdoc coment and its function definition. And a missing \reimp comment was added. Change-Id: I79c0882d730c77a179a4daf98bc6a46916c585d5 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Martin Smith <martin.smith@qt.io>
* doc: Fix some odds and ends in qdoc commentsMartin Smith2018-02-281-1/+1
| | | | | | | | | | A few incorrent link commands were fixed. A few "No such parameter..." errors were fixed. A \qmlproperty return type qwas adjusted. A comment was removed from between a qdoc coment and its function definition. And a missing \reimp comment was added. Change-Id: Ia1775715b5343d279ca3701e6875abacfadb0cfe Reviewed-by: Martin Smith <martin.smith@qt.io>
* rename containsMask to containmentMaskShawn Rutledge2018-02-272-9/+9
| | | | | | | | | It was pointed out that containsMask sounds like it ought to be a boolean property. Change-Id: I2b56823b60d64f9903b0d5108c6428e691c09ed0 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Paolo Angelelli <paolo.angelelli@qt.io>