aboutsummaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* Fix flow text objects in beginning of RTL blockEskil Abrahamsen Blomfeldt2016-11-142-0/+28
| | | | | | | | | | | | | If the block is right-to-left and starts with a text object, it should be aligned to the right edge of the QTextLine instead of the left one. [ChangeLog][QtQuick][Text] Fixed placement of flowing text objects in the start of a right-to-left block. Task-number: QTBUG-43133 Change-Id: Id790e88f3464280f124c38b4260386b84cac8826 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Quick: Do not calculate the difference in a geometryChangeErik Verbruggen2016-11-101-6/+6
| | | | | | | | | | | This difference is only used by the ListView, so calculating it and storing it (on the stack) introduces a penalty for all items. As the new geometry is already applied, the old geometry is passed along. This has the added advantage that the ListView does not have to re-calculate that either. This fixes a performance regression. Change-Id: Id5e67bb663a5b11a55ec15ff24ca5b213d1fcef5 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* Merge remote-tracking branch 'origin/5.7' into 5.8v5.8.0-beta1Liang Qi2016-10-276-14/+95
|\ | | | | | | | | | | | | Conflicts: tests/auto/quick/qquicktextedit/BLACKLIST Change-Id: I0b9e5bea5da5d2666887c202e62d889b4aa56900
| * Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-10-275-14/+31
| |\ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/quick/items/qquickwindow.cpp tests/auto/quick/qquicktext/BLACKLIST tests/auto/quick/qquicktextedit/BLACKLIST Change-Id: I8bd68b0b5e853b7908791d2cbddd18dd527c76ae
| | * Add a test for bitmap font rendering in Qt QuickEskil Abrahamsen Blomfeldt2016-10-251-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The "fixedsys" font is available on Windows at least, so while this test may not add any value on other platforms, it won't hurt either, and this was something that regressed on Windows before. Task-number: QTBUG-56659 Change-Id: Id01dedcbdc2fe74027caf31dd0dde6729ade8c63 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
| | * Make tst_qquicktextedit::mouseSelection() passJ-P Nurmi2016-10-242-7/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since qtbase commit beef975, QTestLib avoids generating accidental double click events by adding 500ms timestamp delta on release events. The test requires a press-and-drag-and-release type of sequence with double and triple clicks. The triple-click case is handled fine with QTest::mouseDClick() + press + move + release, but the double-click case is using QTest::mouseClick() + press + move + release and relies on the accidental double-click event generation that QTestLib now deliberately prevents. I can't think of a nice way to inject the move event in the middle of a double-click sequence generated by QTest::mouseDClick(), so we just send the missing double-click event by hand. We can also remove the QStyleHints::mouseDoubleClickInterval waits, which were there to prevent the aforementioned accidental double click events that can no longer happen. This reduces the total execution time of mouseSelection() by roughly 90%. Task-number: QTBUG-50022 Change-Id: I252e87d6a49ea86a44cfa347a29eebee12fd36d1 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
| | * tst_qquicktextedit: remove mouseDoubleClickInterval waitJ-P Nurmi2016-10-231-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since qtbase commit beef975, QTestLib avoids generating accidental double click events by adding 500ms timestamp delta on release events. Thus, now we can remove the QStyleHints::mouseDoubleClickInterval wait, which were there to prevent the aforementioned accidental double click events that can no longer happen. The default inverval is 400ms, so this saves us nearly half a second on most platforms. Change-Id: I7a670b70c012ac027dc951ebafdf5e7d53b89ce9 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| | * tst_qquicktext: remove bogus blacklistingJ-P Nurmi2016-10-231-2/+0
| | | | | | | | | | | | | | | | | | | | | There's no such test as mouseSelection in tst_qquicktext. Change-Id: I09bf4c61b53acd9811e020379a29c80fce9fe48b Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
| | * QQuickWindow: don't discard timestamps for wheel eventsJ-P Nurmi2016-10-151-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Noticed while debugging QTBUG-56075 on XCB. QQuickFlickable did not receive timestamps for wheel events provided by XI2. This alone does not fix the flicking speed issue with high-precision trackpads, but is needed to be able to calculate the appropriate velocity. Task-number: QTBUG-56075 Change-Id: I458e6302aee72863cdc1f8e8f7d99449016905a9 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
| * | QQuickShortcut: allow setting a custom context matcherJ-P Nurmi2016-10-261-0/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows Qt Quick Controls 2 to register a shortcut context matcher that makes shortcuts behave well with QQC2's item-based popups, which QQuickShortcut is not aware of. Task-number: QTBUG-56562 Change-Id: Ia2518fd6ac7140f60aa38c7d9af557007e9db23b Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* | | Fix crash when loop peeling and basic block mergingSimon Hausmann2016-10-251-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When trying to merge the second (original) loop header block of a peeled loop, we would end up with dangling references to that block from the loop body blocks. There's no trivial way to find all these quickly from the header, so for now don't merge these blocks into the predecessor. Change-Id: I2b5e39c5596ffd8c21ca9871af3a8150a019f2a8 Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
* | | Fix crash with v4 lookups on changing objectsSimon Hausmann2016-10-221-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When lookups are enabled for property access and the property exists, we change the type of the lookup from the generic fallback to a more specialized direct property access. When upon subsequent access the internal class has changed, we fall back to the case of two alternating classes/shapes. If during that fallback we fail to find the property altogether, then we should revert back to the overall fallback, instead of continuing with an invalid property data index. Ran into this while running the typescript compiler in V4 itself. Change-Id: If5975d6c18ff41b9fb21c40f0cbaeed37da4b489 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | | Merge remote-tracking branch 'origin/5.7' into 5.8Liang Qi2016-10-208-10/+56081
|\| | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/quick/items/qquickitemsmodule.cpp tests/auto/quick/rendernode/tst_rendernode.cpp Change-Id: I90582df69feb95a4e4aafb0b9793c23714654f19
| * | Fix tst_rendernode::renderOrder() on high DPI displaysMitch Curtis2016-10-171-7/+9
| | | | | | | | | | | | | | | | | | | | | | | | When QT_SCALE_FACTOR is 2, fb.width() is 400 instead of 200, for example. Change-Id: Iec02d7cfd49d29fceda6645377b75e4607cceb6f Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
| * | Item: sort out mapFromGlobal() and mapToGlobal()J-P Nurmi2016-10-132-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The commit message of 08327da, and the change log of Qt 5.7.0 promised that mapFromGlobal() and mapToGlobal() were available in QML. But since the revision 7 of QQuickItem was not registered, this was not entirely true. Due to a little quirk in the QML engine's handling of revisioned methods, mapFromGlobal() and mapToGlobal() were only accessible via an identifier or property, but not directly: // works MouseArea { id: ma; onClicked: console.log(ma.mapToGlobal(Qt.point(mouse.x, mouse.y))) } // ReferenceError: mapToGlobal is not defined MouseArea { onClicked: console.log(mapToGlobal(Qt.point(mouse.x, mouse.y))) } Furhermore, this is inconsistent with how mapFromItem() and mapToItem() are exposed to QML. Even though the C++ versions of these methods take QPointF and QRectF, the QML versions take 2-4 number specifying x, y, width and height: object mapFromItem(Item item, real x, real y) object mapFromItem(Item item, real x, real y, real width, real height) object mapToItem(Item item, real x, real y) object mapToItem(Item item, real x, real y, real width, real height) Therefore the signature of mapFromGlobal() and mapToGlobal() should be: object mapFromGlobal(real x, real y) object mapToGlobal(real x, real y) This change implements the QML versions of these methods using QQmlV4Function, and adds the missing documentation for the QML API. NOTE: This is QML-only API. Change-Id: I2ced4836d274c7d1e644ea29fc25dbdd2045001b Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-10-121-0/+14
| |\| | | | | | | | | | Change-Id: Ib31008e593442ca5813fb14ae6b02f7ab2577395
| * | Make tst_qqmlapplicationengine pass when JIT is not availableDmitry Shachnev2016-10-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | When the platform does not have JIT, a warning about this is printed into the process stderr, so the test fails. Change-Id: I67c605bd09659c444d0a05f476314e9c7fc2ce6d Reviewed-by: Lisandro Damián Nicanor Pérez Meyer <perezmeyer@gmail.com> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * | BC data files for QtDeclarative (5.7)Milla Pohjanheimo2016-10-104-0/+56053
| | | | | | | | | | | | | | | | | | | | | | | | Added the generated data files for the binary compatibility tests for QtDeclarative for Qt 5.7. Change-Id: Iadaf798312e0e59b0c6d48ce31e912994d82ba4e Reviewed-by: Sergio Ahumada <sahumada@texla.cl>
* | | Fix excessive invalidation of QML disk cachesSimon Hausmann2016-10-181-0/+100
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We use an MD5 checksum over the meta-object data to verify that the types a QML file depends on haven't changed since the cache was generated. However when the dependent types are QML types, then the meta-object data contains dynamically generated type names such as QMLTYPE_1234, which is non-deterministic. To address this, we resort to the checksum over the meta-object data only for C++ types (if those change it's likely an incompatible change) and for QML types use the fact that all the information about the QML declared types comes from the QML file only, which means we can in that case simply use a checksum over the QV4::CompiledData memory chunk. In addition we need to ensure that the generated CompiledData memory chunk is deterministic by avoiding any uninitialized bytes (memset) and using a map instead of a hash for the mapping of object index to object id. Task-number: QTBUG-55926 Change-Id: I27c840b1960ad36b486198e504b70989c22a3972 Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
* | | Fix written time stamp in QML cache files for QRC sourcesSimon Hausmann2016-10-141-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For loading and verification we compare against the time stamp of the executable, so we should do the same thing when generating the cache data. Task-number: QTBUG-55926 Change-Id: If5922e76b8ae86185f6eacb6aeeb5c3afbc1f8d5 Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
* | | Merge remote-tracking branch 'origin/5.6' into 5.8Simon Hausmann2016-10-131-0/+14
|\ \ \ | | |/ | |/| | | | Change-Id: I175b27337b534c0b8f46a4a792d2c43cde73ffc4
| * | Fix corruption when adding or changing properties of JS objectsArnaud Vrac2016-10-101-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 833c99db20 introduced this regression by only moving part of the value data to the proper offset. Task-number: QTBUG-53261 Change-Id: I11241c57057a57794bc3ca60ee437206e524f355 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | | Fix enums in QSGGeometryLaszlo Agocs2016-10-121-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Minor fixes based on comments from the 5.8 API changes review: Revert to using Qt-style enum values (POSITION -> PositionAttribute). Use ByteType, FloatType, etc. instead of TypeByte, TypeFloat, ... Add comments about magic GL values. Add missing docs for Attribute::createWithAttributeType(). Change-Id: I1b8242efd3936f000ce8df6c11ff9ab7affb5713 Reviewed-by: Gunnar Sletta <gunnar@sletta.org> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | | Merge remote-tracking branch 'origin/5.7' into 5.8Liang Qi2016-10-1015-31/+54894
|\ \ \ | | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/quick/quickwidgets/quickwidget/main.cpp src/qml/jsruntime/qv4jsonobject.cpp src/qml/jsruntime/qv4qobjectwrapper.cpp src/qml/jsruntime/qv4qobjectwrapper_p.h src/qml/qml/qqmlengine.cpp src/qml/qml/qqmlpropertycache.cpp src/qml/qml/qqmlpropertycache_p.h src/quick/items/qquickanimatedsprite.cpp src/quick/items/qquickitem.cpp src/quick/items/qquickitem.h src/quick/items/qquickitem_p.h src/quick/items/qquickview_p.h src/quick/scenegraph/qsgcontext.cpp src/quick/scenegraph/qsgdefaultrendercontext.cpp Change-Id: I172c6fbff97208f21ed4c8b6db3d1747a889f22b
| * | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-10-051-0/+45
| |\| | | | | | | | | | Change-Id: I081d9b15796b4133d2ba6f1a862f15b873a4846d
| | * Flickable: add a trackpad (touchpad) autotestShawn Rutledge2016-10-041-0/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We've had this feature for a long time, to use pixel deltas and scroll phase effectively, but no autotest until now. It's still not very thorough but it's a start. Task-number: QTBUG-55871 Change-Id: Iaf6e7a842ce90828da3253e8673cac9905abd046 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
| * | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-10-047-13/+54510
| |\| | | | | | | | | | Change-Id: I48764527fa1ab6d8d59c24552394459b1cdc58ee
| | * Fix vtable for QQuickPaintedItemSimon Hausmann2016-09-302-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | As mentioned in QTBUG-54404 this is an unfortunate breakage we choose to accept. Change-Id: Id511188a2dcd35e8e16e7651c9764c8be1b5afb1 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
| | * BC test data files for Qt 5.6 for QtDeclarativeMilla Pohjanheimo2016-09-304-0/+54475
| | | | | | | | | | | | | | | | | | | | | Data files for bic test added for QtDeclarative Change-Id: Id576ca010b9f18a6b8a4c79625375ee4cc3cbf93 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| | * qv4jsonobject: Make use of QVariant::toString in stringificationRobin Burchell2016-09-302-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | This covers a whole host of missing cases, notably QUrl stored in a QV4::Value. Task-number: QTBUG-50592 Change-Id: I8afd772046c7bfbbcf916a7e90a57be5257b9df8 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| | * Fix crash with window-less QQuickItemsSimon Hausmann2016-09-301-13/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Mark QQuickItem visual children directly in QQuickItem instead of relying on the item being a (grand) child of a window. [ChangeLog][QtQuick] Fix crash with QQuickItems created via JavaScript being garbage collected sometimes when they're not assigned to a window. This may happen even in qmlscene when between the creation of the root item and the assignment to the QQuickWindow the garbage collector runs. The previous approach of a persistent in QQuickView marking the visual item hierarchy relies on the existence of a view. The only thing left to do in the view and qml window implementation is enforcing the CppOwnership policy set on the content item in QQuickWindow by ensuring the presence of the JS wrapper, replacing the persistent with a weak value. This also introduces a new internal mechanism for QObject sub-classes to provide their own V4 JS wrapper types. Task-number: QTBUG-39888 Change-Id: Icd45a636a6d4e4528fc19165b13f4e1ca7967087 Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
| * | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-09-307-1/+255
| |\| | | | | | | | | | | | | | | | | | | Conflicts: tests/auto/quick/qquicktext/tst_qquicktext.cpp Change-Id: I241cd418bb7e7b95e0a0a2ee4c465d48be2a5582
| | * Fix incorrectly aligned text whose size depends on its implicit sizeMitch Curtis2016-09-292-0/+73
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The if statement in QQuickTextPrivate::setupTextLayout() was missing an OR clause for the case where the line width is neither greater nor less than the old width/natural width, but has actually changed. If that sounds confusing, it's because it is. Basically, the outer layouting loop in that function needs to run twice for this scenario, so that's what this patch makes it do. Change-Id: I13777667eb13506d50f05e9766785a1c2c46125c Task-number: QTBUG-50738 Task-number: QTBUG-50740 Reviewed-by: Liang Qi <liang.qi@qt.io>
| | * QQuickText: fix paddings when wrapping or eliding is usedJ-P Nurmi2016-09-291-0/+12
| | | | | | | | | | | | | | | | | | Change-Id: I8ec8c8eff41e77225ef42f7bd9e52f4558d00130 Task-number: QTBUG-55779 Reviewed-by: Liang Qi <liang.qi@qt.io>
| | * Flickable: do not emit movementEnded until it really doesShawn Rutledge2016-09-292-1/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was occurring when using a physical mouse wheel: movementEnded was emitted, then contentYChanged would still be emitted a few more times. Task-number: QTBUG-55886 Change-Id: Ib5e833d5d84633bb07b8c240ea3ccc9977e443f8 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
| | * Fix crash on Array.prototype.join.call(0)Robin Burchell2016-09-291-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | We (incorrectly) didn't check the return value to make sure we had a valid self. At the same time, rename the self variable to match up with other methods. Task-number: QTBUG-53672 Change-Id: Ia0ae5a553e49c4c3b2834c7fdf649fe6373951a2 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| | * Fix MouseArea sticky grab with drag.filterChildren enabledMartin Jones2016-09-222-0/+137
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-56036 Change-Id: Iad776f42cc776e0d397173b3d2f3922eb7914392 Reviewed-by: Andrew den Exter <andrew.den.exter@qinetic.com.au>
| * | Fix Flickable state being reset when it replays a delayed press.Andrew den Exter2016-09-232-17/+85
| | | | | | | | | | | | | | | | | | | | | | | | | | | Ignore mouseUngrabEvents() triggered by giving mouse grab to a child item when replaying a delayed press event. Change-Id: I6c8db61167e21bf10d533b17f7cc65e4754bd432 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Martin Jones <martin.jones@qinetic.com.au>
* | | QML: Also check for correct destroy() chainingErik Verbruggen2016-10-061-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Check that the destroy() method of Heap::Base was called when a Managed object needs destruction. This checks if a call to the parent's destroy() method was accidentally omitted. Change-Id: Id025ecd6d4744bf3eab23503fbe317ed2a461138 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | QML: Make Heap::Object and all subclasses trivialErik Verbruggen2016-10-061-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | GCC6 might dead-store-eliminate out our secret write to Base::mmdata, because it expects all memory content to be "undefined" before constructor calls. Clang might take the same approach if the constructor of Heap::Object is removed. By making these structs trivial, it also makes them memcpy-able. Change-Id: I055b2ad28311b997fbe059849ebda4d5894eaa9b Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | QML: Introduce destroy() on Base subclassesErik Verbruggen2016-10-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | This removes the destructors of subclasses of Base, making them nearly trivial. Change-Id: Ia6f7d467e87899b5ad37b8709a8f633a51689d59 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | Run tst_TouchMouse::buttonOnDelayedPressFlickable with both scenariosFrederik Gladhorn2016-10-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | I commented the first data row out when debugging, it should have been active in the commit. Change-Id: I18ffc1ef4f67cd48a4bfbd9ec23362e07df32c7f Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | | Fix behavior of Flickable::setPressDelayFrederik Gladhorn2016-10-041-18/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | This expands the test and fixes the code. Before this patch, items would see the press event, but get the press stolen again immediately. Change-Id: Iece1d5ffbc09a98fb4bec8d810c7ad78b0f50afe Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | | Add a test that verifies that keepMouseGrab worksFrederik Gladhorn2016-10-032-0/+70
| | | | | | | | | | | | | | | Change-Id: I17c736994f05a63574b518b1d23facde001eacbf Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | | Merge remote-tracking branch 'origin/5.7' into 5.8Liang Qi2016-09-2110-3/+182
|\| | | | | | | | | | | | | | | | | | | | Conflicts: src/qml/qml/qqmltypeloader.cpp Change-Id: I07647700fc86764c95a5ef95c568e700a70fe45f
| * | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-09-167-3/+62
| |\| | | | | | | | | | Change-Id: Ib45654e3e79087da4754377f0d78b70c44ed4695
| | * Propagate window enter event as hover enter event in QQuickWindowEike Hein2016-09-151-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QQuickWindow currently propagates window leave events as hover leave events to its content item, but it does not propagate window enter events as corresponding hover enter events. Instead, hover enter is only triggered implicitly by mouse moves. This can cause problems when there is no mouse movement inbetween the window being entered and a subsequent button press event. A common example where this occurs is dismissing a mouse-grabbing popup window (e.g. a QMenu) by clicking outside the popup, and then clicking in the same spot that was clicked to dismiss the popup. Without this patch, hover state is not realized until movement occurs, so there may be no no visual feedback and code that needs to update state based on what is being hovered prior to handling a press event can't work correctly. This patch synthesizes a QHoverEvent and delivers it in response to QEvent::Enter, similar to how QEvent::Leave is already handled. QWidget handles this correctly via QWidget::enterEvent. The equivalent in Qt Quick is QQuickItem::hoverEnterEvent, ultimately called with the synthesized event. The patch also updates the touchmouse::hoverEnabled autotest. Due to the window enter event now being handled correctly, exitSpy2 would run up a count() of 2, as the cursor was not in a neutral position after previous test cases. The change makes sure the cursor is in a neutral position before test case activity. [ChangeLog][QQuickWindow] The relevant child item is now sent a hover event when the window receives a QEnterEvent, making sure hovering is recognized without waiting for mouse movement. Change-Id: If0586f6cd971df0dfc266bb1a39c9cdb184fd286 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
| | * Destroy an incubating delegate if it is removed before incubation completesMartin Jones2016-09-151-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | Removing an item from a model after its delegate has started incubation, but before it has completed results is an orphaned item. Task-number: QTBUG-55901 Change-Id: I3d3136dc05a950ca38d53687ae7d38a6d0c7ec35 Reviewed-by: Andrew den Exter <andrew.den.exter@qinetic.com.au>
| | * Allow for garbage collection of types with errors in trimCache()Michael Brasser2016-08-305-0/+54
| | | | | | | | | | | | | | | | | | | | | Change-Id: I821ea14f60871735bface4e2cf4e61fcb61b2784 Task-number: QTBUG-55567 Reviewed-by: Michael Brasser <michael.brasser@live.com> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
| * | Fix crash on exit when using default property aliases with layoutsMitch Curtis2016-09-153-0/+120
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The layout was being destroyed before the text, which meant that the removeItemChangeListener() call never got hit. To ensure that the listener is always removed, loop through each child in QQuickLayout's destructor. This is a manual cherry-pick of 59c6c0e0b1b5b46747595a58e11311b7393d7e70. Task-number: QTBUG-51927 Change-Id: I669f42beb8c3dd6b4b741cae0b16e017bb3409df Reviewed-by: J-P Nurmi <jpnurmi@qt.io>