aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items
Commit message (Collapse)AuthorAgeFilesLines
...
| * | Merge remote-tracking branch 'origin/5.10.1' into 5.11Qt Forward Merge Bot2018-02-151-3/+4
| |\ \ | | | | | | | | | | | | Change-Id: I64bf7d183bbd8af7282270097809d14a54ba0188
| | * | skip filtering during post-delivery if there are no PointerHandlersv5.10.1Shawn Rutledge2018-02-061-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In QQuickWindowPrivate::deliverMouseEvent() we call childMouseEventFilter on parents of items which have pointer handlers before we give the pointer handlers one last chance to handle un-handled events. This last-chance delivery is a new feature in 5.10. (Maybe letting filtering happen in that scenario is dubious anyway. The reason it was done in 7042cfd9cb1b552c5fd753b6912439ce604eb1a0 was to allow Flickable to steal the grab from a passively-grabbing TapHandler.) But certainly if there aren't any pointer handlers as children of an item, it doesn't make sense to let the item's ancestors do filtering because in 5.9 and previous versions they would not have gotten that chance. Task-number: QTBUG-65651 Change-Id: I7a14a1f6cac03bf9beb4fa9ab47193df1bd773a8 Reviewed-by: Paolo Angelelli <paolo.angelelli@qt.io>
| | * | Make sure passive grabbers are cleared on releaseJan Arve Saether2018-02-021-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This got regressed by change e6d4df156e9aec62054740dc99ab8ba2855eaafc. Before that change, we always cleared both the exclusive and passive grabbers. Task-number: QTBUG-66152 Change-Id: I93d2568bd2a23ddd55a5294d544f978a50a5543e Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
| * | | Merge remote-tracking branch 'origin/5.10' into 5.11Liang Qi2018-02-128-45/+79
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/imports/shapes/qquickshape.cpp src/imports/shapes/qquickshape_p_p.h src/qml/compiler/qqmlpropertycachecreator_p.h src/qml/jsruntime/qv4value_p.h src/quick/items/qquickloader_p.h tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp tools/qmlprofiler/qmlprofilerapplication.cpp Change-Id: Iafc66ae84bf78630ed72a986acb678e9d19e3a69
| | * | Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2018-02-025-32/+43
| | |\| | | | | | | | | | | | | Change-Id: I41ca9120a470a905c2f5c168c1de4cf970fa0fff
| | | * Fix transition when removing the last item from ListView/GridViewKari Hautamäki2018-02-021-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use the previous item view boundaries (before a remove was applied) when defining transition properties. Task-number: QTBUG-64311 Change-Id: I66870a7267ac26ea430c364383f32fd5c47d4a5d Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
| | | * If Loader loads Window, set its transient parent to the Loader's windowShawn Rutledge2018-02-023-4/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This makes the Item { Loader { sourceComponent: Window { } } } case consistent with the Item { Window { } } case: the inner Window is transient for the outer Window. It works even if the Loader's Window has a visible: true declaration: in that case, until now, the Loader's Window would become visible at component creation time, before the outer Item became visible. So the test to check whether it had a transient parent did not work. We now change the delayed-visibility mechanism in QQuickWindowQmlImpl to wait for the parent Item to acquire a window of its own rather than waiting for the transient-parent-if-any to become visible. It should still take care of all the old cases too, e.g. in the Window { Window { } } case, the inner Window's QObject parent is actually the QQuickRootItem. (Amends 701255c76f671f100338a799f0194bf10e26c9d1) [ChangeLog][QtQuick][QQuickWindow] When a Window is declared inside another Item or Window, the window will not be created until the parent window is created. This allows it to have the correct transientParent and be managed as a transient window. Task-number: QTBUG-52944 Change-Id: Iaf4aafbd696f6e8dd0eec1d02db8bd181483bd07 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
| | | * Prevent invalid characters being entered at the appropriate timesAndy Shaw2018-02-021-27/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a validator does not allow for certain characters to be entered, then it should not allow these to be entered in even if an input mask is set. This fixes a regression introduced in 1b21b73e89942d567c90a17a3bf7a7ecae3de258. The test modified is because this is in fact a general limitation when combining validators and input masks, when a separator is used. Whereas the original patch did allow this to be possible, this is now not possible again. Task-number: QTBUG-64616 Change-Id: Ic6a3f40a9faa7c04abc055cfc2752044fddd33a0 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io> Reviewed-by: Robin Burchell <robin.burchell@crimson.no>
| | * | Merge "Merge remote-tracking branch 'origin/5.9' into 5.10" into ↵Liang Qi2018-01-311-2/+4
| | |\ \ | | | | | | | | | | | | | | | refs/staging/5.10
| | | * | Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2018-01-311-2/+4
| | | |\| | | | | | | | | | | | | | | | Change-Id: Idde38761897f078cd9957f01d34a9751217e4c53
| | | | * QQuickItem::stackBefore/After: print more useful warningsMitch Curtis2018-01-241-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before this patch, you'd get the following warning: QQuickItem::stackAfter: Cannot stack after 0x7f9e668368c0, which must be a sibling After this patch, you get this warning: QQuickItem::stackAfter: Cannot stack QQuickItem_QML_131(0x7ff548f44d70, name="hoverPathDelegate", parent=0x7ff54a871c90, geometry=0,0 0x0) after QQuickItem_QML_131(0x7ff548f3c8f0, name = "hoverPathDelegate"), which must be a sibling This tells you which type caused the warning, and, if you've set it, its objectName. Change-Id: I7b20f1ac089f42d73f02bcca0382022905d0cb57 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
| | * | | Do not stop delivering to handlers if all points are acceptedJan Arve Saether2018-01-311-7/+1
| | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some Pointer Handlers can perform the desired interaction using only passive grabs. When such a handler is used to modify behavior of another event-handling Item or Handler which needs to take the exclusive grab, this allows them to cooperate: both can see the updates, and neither prevents delivery of events to both. Change-Id: I312cc301c52fcdf805245bbe0ac60fd28f92c01f Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
| | * | Fix Shapes not playing well with QtGraphicalEffectsPaolo Angelelli2018-01-312-4/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch allow shapes to skip the sync optimization in situations where the shape is added to a shader effect either directly or as nested inside another item, and is set to be invisible. Task-number: QTBUG-63105 Change-Id: I595fbc052032f420982be1267d22a24bcffb7212 Reviewed-by: Robin Burchell <robin.burchell@crimson.no>
| * | | Fix misleading doc for kerningRobert Loehning2018-02-083-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It currently sounds as if activating kerning would speed up drawing while the opposite is true. Change-Id: I7ba8caa82931617213c70570b6b81f82d5b61e52 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
| * | | Fix clang 5 warningsAllan Sandfeld Jensen2018-02-071-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes clang develop-builds Change-Id: If262d7038fc36bcec281be4c218b3cf3d4ae4deb Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * | | Merge "Merge remote-tracking branch 'origin/5.10' into dev" into ↵Shawn Rutledge2018-02-0617-151/+235
| |\ \ \ | | | | | | | | | | | | | | | refs/staging/dev
| | * | | Merge remote-tracking branch 'origin/5.10' into devLiang Qi2018-02-0217-151/+235
| | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/qmltooling/qmldbg_profiler/qqmlprofilerservice.cpp src/qml/compiler/qqmlirbuilder.cpp src/qml/compiler/qqmlirbuilder_p.h src/qml/compiler/qqmltypecompiler.cpp src/qml/compiler/qv4codegen.cpp src/qml/compiler/qv4codegen_p.h src/qml/compiler/qv4compileddata_p.h src/qml/compiler/qv4compiler.cpp src/qml/compiler/qv4compilercontext_p.h src/qml/compiler/qv4isel_moth.cpp src/qml/compiler/qv4jsir.cpp src/qml/compiler/qv4jsir_p.h src/qml/jit/qv4isel_masm.cpp src/qml/jsruntime/qv4engine.cpp src/qml/jsruntime/qv4functionobject.cpp src/qml/jsruntime/qv4runtimecodegen.cpp src/qml/jsruntime/qv4script.cpp src/qml/jsruntime/qv4script_p.h src/qml/qml/qqmltypeloader.cpp src/quick/items/qquickanimatedimage.cpp src/quick/items/qquickanimatedimage_p_p.h src/quick/scenegraph/compressedtexture/qsgpkmhandler.cpp tests/auto/qml/qmlplugindump/qmlplugindump.pro tests/auto/qml/qmlplugindump/tst_qmlplugindump.cpp tools/qmlcachegen/qmlcachegen.cpp tools/qmljs/qmljs.cpp Done-with: Shawn Rutledge <shawn.rutledge@qt.io> Done-with: Lars Knoll <lars.knoll@qt.io> Done-with: Ulf Hermann <ulf.hermann@qt.io> Change-Id: I010e6525440a85f3b9a10bb9083f8e4352751b1d
| | | * | Make sure we send the UngrabMouse event when clearing grabbersJan Arve Sæther2018-01-261-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This caused a regression in QtLocation autotest declarative_ui\tst_map_mouse.qml where the sequence of tests test_basic_press_release() and test_enabled() caused test_enabled() to fail. Change-Id: I53621a9a18d0574163260674c11bdcb02c3e1218 Reviewed-by: Paolo Angelelli <paolo.angelelli@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
| | | * | Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2018-01-2417-147/+227
| | | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf src/qml/compiler/qv4codegen.cpp src/qml/compiler/qv4compileddata_p.h src/qml/debugger/qqmlprofiler_p.h src/qml/jsruntime/qv4engine.cpp src/qml/memory/qv4mm.cpp src/qml/qml/qqmlcomponent.cpp src/qml/qml/qqmlobjectcreator.cpp src/qml/qml/qqmlobjectcreator_p.h src/qml/types/qqmldelegatemodel.cpp src/quick/items/qquickitem_p.h src/quick/items/qquickwindow.cpp tests/auto/quick/touchmouse/BLACKLIST tests/benchmarks/qml/holistic/tst_holistic.cpp Change-Id: I520f349ab4b048dd337d9647113564fc257865c2
| | | | * Fix quadratic behavior in QQuickRepeater::clear(), take 2Lars Knoll2018-01-171-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This amends 52874a0e6f739ce410c8401e19b0a9ef6d02cabf, to also fix the quadratic behavior when removing the repeaters item from their parent. Change-Id: I24ad7ca4f66a765a5e991846d65803ccf84c2cab Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| | | | * Partially revert "Optimizations for Repeater::clear() and ~QQmlItem()"Lars Knoll2018-01-171-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reversing the destruction order in ~QQuickItem, and searching from the back in removeChild() wasn't such a good idea after all, as it breaks some assumptions people have about removing. We'll need to find a different solution for the quadratic behaviour coming from QQuickRepeater::clear(). This reverts parts of commit 52874a0e6f739ce410c8401e19b0a9ef6d02cabf. Change-Id: I5a6ff9f5ddd9f0f6667142dbcc568b6aba6f8ee9 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| | | | * Optimizations for Repeater::clear() and ~QQmlItem()Lars Knoll2018-01-151-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QQmlRepeater::clear() had quadratic complexity in the number of items, because the items where removed from the back. Fix this by searching the cache from the back as well as searching for child items to remove from the back. Change-Id: I92e491a8abf47cee9d382ef15cd2471f722fa6dd Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| | | | * GridView: Fix an off-by-one offset of positioning of itemsJan Arve Sæther2018-01-101-7/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The block for finding the position for the item *before* needs to be applied for the case where visibleItems is empty too, so we separate it out. Change-Id: I60a7e3a44d01a0087970e37bf4e73b94da5ebd48 Task-number: QTBUG-49218 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
| | | | * Initialize member variableJesus Fernandez2018-01-101-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | >>> CID 186477: Uninitialized members (UNINIT_CTOR) >>> Non-static class member "padding" is not initialized in this Change-Id: I1861a959ec8027b62321885de5d48e6e1df1ccc4 Coverity-Id: 186477 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
| | | | * Doc: state that childrenRect is read-onlyMitch Curtis2018-01-051-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-64115 Change-Id: I0246124a438328c062c37560b1b45c025078c681 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
| | | | * QQuickAnimatedImagePrivate::setMovie: check for re-assignment; cleanupShawn Rutledge2017-12-272-71/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There's no need to delete the movie if the same one is being re-assigned. Also, reorder, rename and clean up the variables. Followup to bb02a577f0fbf3bd2a273129e6cb57cfc9a338c8 Task-number: QTBUG-62913 Change-Id: I1fc57b411bfbd819b88be20f5933db8c13e9aba0 Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
| | | | * Move setVisible into QQuickItemPrivatePaolo Angelelli2017-12-242-9/+16
| | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I6bda48f5e982d8e93b8d9a604c275bc0cc0434de Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
| | | | * Doc: correct Keys::shortcutOverride code snippetMitch Curtis2017-12-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | c4eefa4a added a snippet where an onEscapePressed handler had: event.accepted = true which is unnecessary, as the documentation says that handlers for specific key events set event.accepted to true by default. Change-Id: I1a40e6e82240a517ba5059a1d5d2217cc7968302 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
| | | | * QQuickItemView: Clear pending changes when refillingUlf Hermann2017-12-181-35/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Generally the bufferedChanges are an "extension" of the currentChanges, which can just not be applied at the moment because we are in a layout phase. If we regenerate or clear the whole view in the mean time, the bufferedChanges become just as invalid as the currentChanges. On top of that, refilling can trigger further changes, part of which will be applied during the refilling. As that leaves us in an inconsistent state, we need to loop the refilling until no further changes are generated. As the changes might affect items that are already visible, and therefore not subject to refilling, we need to clear all the items before refilling in this case. In QTBUG-46488 things are added in the onCompleted callback of the delegates (by expanding the tree view, which translates into adding rows to the list view). Depending on where you add the new items, the list view might pick them up when iterating the model on refill() or it might create delegates for the same model entry twice. So, if that happens we need to discard the result and refill again. Task-number: QTBUG-46488 Change-Id: Ie4e0a731f7feda6aa962b6cb9a6cd5c3bf90486e Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
| | | | * QQuickList/GridViewPrivate::fixupPosition: don't set moveReasonShawn Rutledge2017-12-162-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In QQuickItemViewPrivate::applyModelChanges(), if moveReason = QQuickItemViewPrivate::Other, then QQuickItemView::trackedPositionChanged() will fail to call d->setPosition(pos), which is normally what keeps the Flickable moving for a while. Leave the reason as-is (it will be SetIndex in this case), so as not to forget that we were actually trying to move down when the sequence window->polishItems() -> QQIV::updatePolish() -> layout() -> fixupPosition() did its part of the work of moving down. Task-number: QTBUG-62864 Change-Id: I1021e2ea39265de9e1285e2ee17c5733189ab939 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
| | | | * Add new logging category qt.quick.window.transientShawn Rutledge2017-12-156-3/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | to monitor the increasing number of places from which the transient parent relationship can be detected; and a debug operator for QQuickWindow so that these log messages are more useful. [ChangeLog][QtQuick][QQuickWindow] added logging category qt.quick.window.transient to check detection of transient windows declared inside other Items and Windows Change-Id: Ic899af648765fcdc59b8da7dd1f1bed20db300f2 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
| | | | * Fix QSGTexture* leak in QQuickFramebufferObjectLaszlo Agocs2017-12-141-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Ownership is not taken by the node. The dtor already destroys the QSGTexture correctly so follow suit when recreating the FBO due to a resize. Task-number: QTBUG-65156 Change-Id: I13a9f0332bf75a4c624ea7dd24633625ca07c8d4 Reviewed-by: Paolo Angelelli <paolo.angelelli@qt.io> Reviewed-by: Andy Nichols <andy.nichols@qt.io>
| | | | * remove unimplemented QQuickItemPrivate::_q_windowChanged declarationShawn Rutledge2017-12-131-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It was added in 4c5445ddb0e7388247783c868925c086bdd666f7 but never implemented. Change-Id: I748295b2a1d82ed19444c0e447e1d7e88baf34b1 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
| | | | * Flickable: don't jump after premature movementEnding due to timerShawn Rutledge2017-12-131-3/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Followup to ef8c6f6a0bf5e4c9ee41306f2df59048ab96038f: we emit movementEnding for the benefit of the user, scrollbars, decorators etc. in case the ScrollEnd phase means that movement really ended (it means the user lifted his fingers from the trackpad, but momentum events can cause the movement to continue after that). But in case movement didn't end, we don't want to have a jump when it resumes. But scrollingPhase will be true after an event with ScrollBegin phase, and false after an event with ScrollEnd, also false if the mouse is an ordinary wheel mouse without phases. So when the timer fires, if the user has not yet lifted his fingers, scrollingPhase is true, and that means scrolling isn't really ending, so we should not set vMoved to false. Setting vMoved to false will cause the drag() function to reset vData.dragStartOffset to the current dy value, which ultimately causes the jump in contentY. It should be done only when scrolling really ends. If the timer fires and scrollingPhase is false, we can be sure it really ended. But if you flick, then rest your fingers, then lift them, there is no momentum, so the final event has scroll phase ScrollEnd, and we need to run the timer one more time to detect that there are no more updates and finish the transition back to the default state (set vMoved back to false, emit signals such as movementEnded, etc.) The ultimate solution is to add another Qt::ScrollPhase enum, such as ScrollMomentum, but we should not do that in the 5.9 series. Task-number: QTBUG-63026 Change-Id: I854c52a680028cb1d43b133be65653d87a05a0b1 Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
| | | | * Handle the application state changes so items update appropriatelyAndy Shaw2017-12-112-2/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the application state is no longer active, then the items should be acting as if the window deactivated in this case. This allows MouseAreas for instance to ungrab the mouse when the application goes into the background on mobile devices. Task-number: QTBUG-53036 Change-Id: I5c9a56a5fd3ad3a2ef03ff114561c671874a9391 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
| | | | * Fix valgrind warning about uninitialized variableLars Knoll2017-12-111-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The flaky qmltest autotest triggered these warnings quite a bit, so maybe this helps stabilize that autotest. Change-Id: Ib03a9fbbbde376296e7bea4cbd4ba2422907fe44 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| | | | * Make deletion of transitions safeLars Knoll2017-12-111-8/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-63844 Change-Id: I65029e9039ea3db85152fc3cdefaac3deee0db6c Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * | | | Remove double indirection between QJSEngine and QV4::ExecutionEngineUlf Hermann2018-02-024-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As QJSEngine's handle() method is internal, we can redefine it to return a pointer to an ExecutionEngine. That makes many things easier. Change-Id: Ie3df99e0bad5f00ad4fe73182896cd135fa82994 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| * | | | QQuickTextEdit: Simplify node handlingUlf Hermann2018-02-022-42/+46
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We don't need to manually manage pointers to nodes as QList can do that for us. Change-Id: I0185db2d5909178b3e36c8d1b7921bdbb1858ca6 Reviewed-by: Anton Kudryavtsev <antkudr@mail.ru> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
| * | | Support masking of QQuickItemsPaolo Angelelli2018-01-255-3/+83
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adding a new property, containsMask, to QQuickItem, that can be set to any QObject defining a Q_INVOKABLE bool contains(const QPointF &point). When this property is set, the mask object contains method is used in place of the item own contains method. [ChangeLog][QtQuick][QQuickItem] Added containsMask property. Task-number: QTBUG-20524 Change-Id: I5b0696e2cddc6ae3e217ce149c5f44980fdb69aa Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
| * | | Add support for getting the flags from the original mouse eventAndy Shaw2018-01-184-6/+26
| | | | | | | | | | | | | | | | | | | | Change-Id: Ifdf0b8cb43b1e88f3931f49ac6ca72019548ddcf Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
| * | | Add a speed property to AnimatedImageLouis du Verdier2018-01-164-1/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QMovie handles most of AnimatedImage's behaviors and already provides a speed property (that is a percentage, 100% by default). This commit only offers the possibility to change its value from the QML. Task-number: QTBUG-62203 Change-Id: I8b7b79053181c1544aee1e95054b3b48229381fb Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
| * | | Add a feature Qt Quick RepeaterUlf Hermann2018-01-154-3/+19
| | | | | | | | | | | | | | | | | | | | Change-Id: I863e721c623f7916ea36a34edd2d6faece1d06a4 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| * | | Convert canvas2d methods to new calling conventionLars Knoll2018-01-121-457/+459
| | | | | | | | | | | | | | | | | | | | Change-Id: I543ae856a5c56ee69f7e7cc6f1ff9a8ce2a6b489 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * | | Introduce Q_FALLTHROUGH()Friedemann Kleint2018-01-102-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Silence g++ 7.X warnings. Change-Id: Iba80ab547111d883ff8b3e99173cc5f3a79ae81f Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
| * | | Merge remote-tracking branch 'origin/5.10' into devLiang Qi2018-01-0912-69/+126
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf src/qml/memory/qv4mm.cpp src/qml/qml/qqmlbinding.cpp Change-Id: I98e51ef5af12691196da5772a07d3d53d213efcc
| | * | Prevent errors when unloading LoaderMichael Brasser2018-01-051-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Invalidate the context of the object so that destruction is signaled and bindings no longer run. Task-number: QTBUG-47321 Task-number: QTBUG-51995 Task-number: QTBUG-60344 Change-Id: I194a2fefe4e769a58c9ce022d39fe76cbe230de7 Reviewed-by: Michael Brasser <michael.brasser@live.com>
| | * | Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2018-01-0411-69/+114
| | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/qml/memory/qv4mm.cpp src/qml/memory/qv4mmdefs_p.h src/quick/items/qquickwindow.cpp src/quick/items/qquickwindow_p.h tests/auto/qml/debugger/qqmlprofilerservice/qqmlprofilerservice.pro tests/auto/qml/debugger/qqmlprofilerservice/tst_qqmlprofilerservice.cpp Change-Id: I7021fa1edf076627a67048f41f7b201220262b09
| | | * grabMouse() and QQWPriv::removeGrabber(): be clear whether mouse or touchShawn Rutledge2017-12-053-41/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The bug was that a MouseArea could be stuck in pressed state if a touch tap occurred simultaneously on a second MouseArea while the first was held pressed by the actual mouse. QQuickWindowPrivate::setMouseGrabber(QQuickItem *) had too little information to make the right choice in case the given item argument is null. It should not mean ungrab everything: in this use case, the mouse and the touchpoint can be pressing two different MouseAreas, and releasing either one should ungrab only the MouseArea that is being released. However the only place it was called with nullptr was in removeGrabber(), and in that context we are given all the information: which item to ungrab and whether we want to ungrab mouse, touch or both. It's better to have a little code duplication between QQuickItem::grabMouse() and QQuickWindowPrivate::removeGrabber() than to lose this information about which device(s) and Item to ungrab. Task-number: QTBUG-64249 Change-Id: I0710534a05f3ceeb66105a03ab0f32a61df8a522 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
| | | * QQuickListView/GridView: load items that results from model changes ↵Richard Moe Gustavsen2017-11-302-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | synchronously The current implementation created new items with default incubation mode, which is AsynchronousIfNested. But from reading the code, it seems like changes to the model were really expected to be handled synchronously, since there aren't any sections in the code that will recover from situations were requested items ends up incubating async. This is also backed by the fact that the second argument used to be a bool set to 'synchronous'. The fact that this was translated to AsynchronousIfNested later down the chain didn't seems to be taken into account. A bug with this is found in ListView when it's embedded inside an async Loader. In that case, all list items will be incubating async at startup, which is normally expected and fine. But if the model assigned to the ListView is modified before the loader has finished, async loading will also happen to the items created because of the change. And then the situation described above will occur. This patch will force any items loaded because of a model change to be synchronous. This seems to be in line with the synchronous logic that already exists. And its also quite acceptable, since changing the model before everything is completed is a corner case, and can naturally lead to some stuttering in the list view anyway. A potential for improvement on this logic is to try to recover whenever creating an item fails. But this takes a lot of work because of the way model changes are structured and stored, and can easily cause regressions. Since this is a corner case, it is probably not worth it. [ChangeLog][QtQml][ListView] Fixed a bug in ListView that sometimes make items end up with wrong geometry when changes to its model happens while the ListView is being loaded async (e.g if wrapped inside an async Loader). Task-number: QTBUG-61537 Change-Id: I8d6857beaf8ef98b02bb46282a1312749b0fb801 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>