aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* tst_qqmlproperty: Skip crashing interfaceBindingMaximilian Goldstein2020-11-171-0/+3
| | | | | | Task-number: QTBUG-84416 Change-Id: I79048233041802fe74e28b07def5ca0a3181c358 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* QV4Engine: Fix conversion of char16_tUlf Hermann2020-11-172-2/+18
| | | | | | | | This is a single char16_t, not an array of them. Pick-to: 5.15 Change-Id: I55d23ebb5f2abebd43cd4160a75d373706392ddf Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Don't synthesize mouse from touch for items that accept touchShawn Rutledge2020-11-178-163/+145
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Followup to 1457df74f4c1d770e1e820de8cd082be1bd2489e : if an item that has acceptTouchEvents() == true merely fails to accept one touch event, that does not mean a mouse event should be sent. Finish changing the default to false: handling touch events is opt-in, just like handling mouse events; most items don't. And if you opt in, then you MUST handle touch events, because you will NOT receive mouse events as a fall-back. Now that Flickable handles touch, filtering multi-touch events becomes relevant. There was a failure in tst_touchmouse::mouseOnFlickableOnPinch when Flickable grabs a stationary touchpoint at the same time as another touchpoint is pressed, preventing a child PinchArea from reacting. So there's a new rule: just as we start over with event delivery when a new point is pressed, QQuickFlickable::filterPointerEvent() should also not immediately grab when any point is newly pressed; it can afford to wait, because it's filtering, so it will be able to see if one point is dragged past the drag threshold later on. When a parent (such as Flickable) contains only mouse-handling items (such as MouseArea), the parent should filter the touch event if it is able (if acceptTouchEvents() returns true). Flickable is now able to. Filtering parents that are not able to filter touch events can still filter a synth-mouse event as before. But filtering both must be avoided: then we would have the problem that Flickable filters a touch move, sees that it's being dragged past the drag threshold, and sets d->stealMouse to true to indicate that it wants to steal the _next_ event; then it filters a synth-mouse move, and that's perceived as being the next event even though it's just a different view of the same event, so it steals it. In tst_qquickflickable::nestedMouseAreaUsingTouch we rely on the delay caused by waiting for the next event: the MouseArea is trying to drag an item and the Flickable wants to flick; both of them decide on the same event that the drag threshold is exceeded. But MouseArea calls setKeepMouseGrab() immediately, whereas Flickable doesn't try to steal the grab until the next event, and then it sees the keepMouseGrab flag has been set, so it doesn't do it. If Flickable could filter the same event twice (once as touch, once as synth-mouse), this logic doesn't work, so it's effectively "more grabby" than intended. So it works better to have it filter only the actual touch event, not the synth-mouse that comes after. When the child has pointer handlers, we need to visit them, and therefore we should let Flickable filter a touch event on the way. tst_FlickableInterop::touchDragFlickableBehindButton() depends on this. [ChangeLog][QtQuick][QQuickWindow] In Qt 6, a QQuickItem subclass must explicitly call setAcceptTouchEvents(true) to receive QTouchEvents, and then it must handle them: we no longer fall back to sending a QMouseEvent if the touch event is not accepted. If it has additionally called setFiltersChildMouseEvents(true), then it will filter touch events, not any synthetic mouse events that may be needed for some children. Task-number: QTBUG-87018 Fixes: QTBUG-88169 Change-Id: I8784fe097198c99c754c4ebe205bef8fe490f6f4 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Update dependencies on 'dev' in qt/qtdeclarativeQt Submodule Update Bot2020-11-171-2/+2
| | | | | Change-Id: Ia7f63103a32fbdd0f80d77483893ee458b9fdd6e Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Update dependencies on 'dev' in qt/qtdeclarativeQt Submodule Update Bot2020-11-161-2/+2
| | | | | Change-Id: Id0eaa7a167ebd69ce568bd9c19a7c78ed276874b Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Stabilize tst_QQuickMultiPointTouchArea::inFlickableWithPressDelayShawn Rutledge2020-11-161-9/+17
| | | | | | | | Flickable moves after taking over the grab, but this test was failing anyway. Might as well check for everything in one loop of move events. Change-Id: Iafa21cdfb88df36337e4350934d3bf569418bdca Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Blacklist tst_qquickpointhander::tabletStylus on macOSShawn Rutledge2020-11-161-0/+2
| | | | | | Task-number: QTBUG-88541 Change-Id: I35b3f99c4268b6615da373f90b53b6ca6ef16fce Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Add past major version 1 to QtQuick.tooling and 6 to its componentsUlf Hermann2020-11-162-1/+11
| | | | | | Change-Id: I09e29b85949eac270c6cee711408b8a09dea79a8 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Maximilian Goldstein <max.goldstein@qt.io>
* Don't copy or assign QEvent instances in testsVolker Hilsheimer2020-11-166-593/+788
| | | | | | | | | | | | | | | Copying/assigning polymorphic types is a code smell, use separate instances instead in the tests. Those should perhaps be rewritten to use a data driven testing approach, there's a lot of code repetition. In the test API implementation, first evaluate the parameters for the event, then construct the event once with the correct values. Change-Id: I2572772698cb0204f5ff950741b9fe3805fae15d Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Don't copy QKeyEvent instances, store the data explicitlyVolker Hilsheimer2020-11-162-17/+45
| | | | | | | | | | QEvent is a polymorph type, and even though it has a copy constructor, we shouldn't use it. Use the pattern as in QQuickMouse/WheelEvent. Change-Id: I26ab7b831e1e8dd156c32417f74bc7d800bcf71c Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Do generate typeinfo qmldir entries for pure QML modulesUlf Hermann2020-11-161-3/+1
| | | | | | | | | | As we generated qmltypes files (albeit empty), we also have to advertise them in the qmldir files. Otherwise qmllint will complain, as that is a common mistake in old modules where qmldir files were written manually. Change-Id: I4c96610930d89558cd363b7f9db28ec6e21ed4d5 Reviewed-by: Maximilian Goldstein <max.goldstein@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Update dependencies on 'dev' in qt/qtdeclarativeQt Submodule Update Bot2020-11-161-2/+2
| | | | | Change-Id: I987e0b8860cf7bba2307bfdbe3dab5d4a5099fc6 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Use QFileInfo constructor explicitlyVolker Hilsheimer2020-11-151-2/+3
| | | | | | | Prepare for upcoming changes in qtbase. Change-Id: I592fe857dde13ce570f1525b5f327a07773be123 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* YarrParser: compile with explicit QChar(int) constructorDavid Faure2020-11-151-7/+7
| | | | | Change-Id: I10d30d1ba83f8db9568cef18a32baac1627b2c17 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Update dependencies on 'dev' in qt/qtdeclarativeQt Submodule Update Bot2020-11-141-2/+2
| | | | | Change-Id: Id2e3e94f2c7775157d977b4e833083217c67e5fb Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Add logging category qt.quick.pinchareaShawn Rutledge2020-11-131-2/+10
| | | | | Change-Id: Iacfffdc774d5ea6980af7a29da07a82f17799e33 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* QQuickWindow: better hover debug, and a reminderShawn Rutledge2020-11-131-1/+7
| | | | | | | | | | | | | In the qt.quick.hover.trace category, the position is the most important thing for now. The output for "q" is verbose and usually there's only one window anyway, so just put the title last, in case we need to debug a multi-window scenario. Dealing with hover in multi-device scenarios is going to be interesting one of these days. Change-Id: I2b687085432ce2e02ca764b8b4669282e0180c54 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Update dependencies on 'dev' in qt/qtdeclarativev6.0.0-beta5Qt Submodule Update Bot2020-11-131-2/+2
| | | | | Change-Id: I7d98ad372754f039dabd16c95e2af7819f1bd694 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Add Qt 6.0.0 changes fileJani Heikkinen2020-11-131-0/+17
| | | | | | | | | | Qt 6.0.0 is new major version for Qt and so on we don't need to list changes to the previous Qt release but guide readers to check porting guide. Task-number: QTBUG-88099 Change-Id: If79efc0d715c57f9f5acb22ac751820e5bff9a43 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* QmlCompiler: Mark dataPtr as unused for void AOT functionsUlf Hermann2020-11-131-0/+1
| | | | | | | Otherwise we get lots of "unused" warnings from the compiler. Change-Id: I7744715c476350dd3bba34500589cb1c62672c9f Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* tooling: List the actual QML files in the qmake projectUlf Hermann2020-11-131-3/+8
| | | | | | Fixes: QTBUG-88471 Change-Id: Ifc023fdc82b728931ff88c0c634ad71e2b2995a2 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Update dependencies on 'dev' in qt/qtdeclarativeQt Submodule Update Bot2020-11-131-2/+2
| | | | | Change-Id: I0db9ff00b953ed97f7e49262ccedceac8cf9f4c5 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Update dependencies on 'dev' in qt/qtdeclarativeQt Submodule Update Bot2020-11-131-2/+2
| | | | | Change-Id: I532e68d038d3899046fc2af746aa75665ea9c86d Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* qmltyperegistrar: Use QString rather than string for stringsUlf Hermann2020-11-122-4/+6
| | | | | | | | All other type names are actual C++ type names. Also, correctly resolve qreal if its type is overridden at configure time. Change-Id: Ia2a1b4309f94e8c72461ee69005b1bdee6337370 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Update dependencies on 'dev' in qt/qtdeclarativeQt Submodule Update Bot2020-11-121-2/+2
| | | | | Change-Id: Ibb8871a1931e8c9024949479d5f82ef8a73ef1cc Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Add a module describing the qmltypes formatUlf Hermann2020-11-1213-1/+428
| | | | | | | | | | It's turtles all the way down. And now we can verify builtins.qmltypes using qmllint. Change-Id: I10c98ff8837c04838c3fd9803ef4ea0fd5d7bd0e Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* CMake: Change Quick.Window into a pure Qml moduleAlexandru Croitor2020-11-124-7/+53
| | | | | | | | | | | This fixes apps using Qt.Window with static Qt builds when deployed to a machine that doesn't have Qt installed. This will need a counterpart fix in qmake land. Change-Id: Ife11f9d1f1826e1188ef3dc3933af2f243860b6f Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* CMake: Allow building pure QML modules not backed by C++ sourcesAlexandru Croitor2020-11-124-21/+110
| | | | | | | | | | | | | | | | When no C++ sources are passed to qt_internal_add_qml_plugin (a pure QML module), create a C++ backed Qt plugin anyway. In such a case, generate a dummy plugin.cpp containing a QQmlEngineExtensionPlugin subclass. The class name is autogenerated from the QML import URI. The class constructor will call the qmltyperegistrar generated void qml_register_types_foo() function, to ensure the needed module versions are registered for the QML module. Change-Id: I19959dafdf0dc837c6037e7dc1d549b7420110a7 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* QmlCompiler: Add method to get first non-composite base scopeUlf Hermann2020-11-121-0/+9
| | | | | | | That's a recurring thing. Change-Id: I8dc049a559e337c70089dd1f81ff23bf7d2140fe Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* QQmlEngine::captureProperty(): Don't capture constant propertiesUlf Hermann2020-11-121-1/+1
| | | | | | | That is a noop and produces a warning. Change-Id: I75787aee66b55522005247524140e3f3a7dd56ba Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* QQmlListModel: use alignof for alignmentFabian Kosmale2020-11-121-1/+1
| | | | | Change-Id: I1dac3e33289516ec677d6db0d8d7cf1e02addc16 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* QQuickViewTestUtil: mark QAIM method overridesShawn Rutledge2020-11-121-6/+6
| | | | | | | | Fixes a few -Wsuggest-override warnings with gcc 10.2 (but there are more). Change-Id: I36c29c6f2dc1577a05514950ce1a6b3a24da4f55 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: David Skoland <david.skoland@qt.io>
* Allow removing attractor particlesystem at runtimeKaj Grönholm2020-11-123-2/+19
| | | | | | | | | Don't crash and make it work as expected. Task-number: QTBUG-37491 Change-Id: I0b94fdfa0a79dd43b762b03b24e3415762eecd95 Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* QmlCompiler: Correctly store AOT functionsUlf Hermann2020-11-121-2/+5
| | | | | | | | There always has to be an empty last function. Otherwise we might access invalid memory when loading them. Change-Id: I5e7a784c14ac8a12450926b895664a98c03f85f1 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Take pixel ratio into account with point particlesKaj Grönholm2020-11-1216-1/+16
| | | | | | | | | | | | Particles using DrawTriangles are taking pixel ratio into account, while particles using DrawPoints used raw pixel sizes. Change points to also scale based on dpr. This way particles with different backends and performance levels remain the same size. Task-number: QTBUG-88240 Change-Id: I3988a0ad8e741626a56a41b08aed0500e5be0c62 Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* QQuickView docs: show correct usage of setInitialPropertiesFabian Kosmale2020-11-122-0/+13
| | | | | | Pick-to: 5.15 Change-Id: If63f4c59f18bc0754ce2e68e424f6efd0f512d30 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* QmlCompiler: Store values QQmlJSMetaEnum when availableUlf Hermann2020-11-123-1/+26
| | | | | | | | | | | | | When parsing QML files, we need to keep the enum values around as this is the only place where we can find them (without parsing the same file again, that is). With C++ types we don't strictly need them as they are also available from the C++ header, but if the qmltypes file is nice enough to provide them, we can use them. (Which will be for types that are not actually C++ types, but rather types produced by registering a QML file with qmlRegisterType()). Change-Id: Ibcc93b30e523a00e1eeb80029943c48b83d0e1b5 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Use QDate::startOfDay() rather than QDateTime(,QTime(0, 0),)Edward Welbourne2020-11-121-3/+2
| | | | | | | | Makes no difference in this case, as it's UTC, but is terser and perhaps slightly clearer. Change-Id: I7de315def2f45ec4a12d2a682e5d1d7a4d0a3e6d Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* ListModel: support URLsFabian Kosmale2020-11-124-3/+127
| | | | | | Fixes: QTBUG-88379 Change-Id: I6e2ea550d8f8972c5fdcdc21a5e3851992c591a5 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* QmlCompiler: Allow more convenient access to enums in QQmlJSScopeUlf Hermann2020-11-125-9/+14
| | | | | Change-Id: Ibac4dd7641a89b686bee63cf974b2257a35631a2 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Fix QQWinPriv::deliverSinglePointEventUntilAccepted for wheel, gesturesShawn Rutledge2020-11-122-3/+1
| | | | | | | | | | | | | | | | | | | | | | WheelHandler was only reacting to one wheel event between mouse moves, because it got added to the QQPointerHandlerPriv::deviceDeliveryTargets() vector, and was not removed at the beginning of delivery of subsequent events, as QQuickWindowPrivate::deliverPointerEvent() does. (In Qt 5 the equivalent vector was cleared in QQuickPointerMouseEvent::reset().) Wheel events are delivered via deliverSinglePointEventUntilAccepted() (grabbing the wheel is still not implemented). Native gesture events are delivered that way too; and sure enough, the same bug happens on the macOS trackpad, whether you are attempting to do pinch zoom or just two-finger-flick. tst_QQuickWheelHandler::nestedHandler() sends multiple wheel events in a row, so we do have some test coverage, and hopefully this issue explains why it needed to be blacklisted. Fixes: QTBUG-88428 Task-number: QTBUG-86729 Change-Id: Id1ed4a38dfa3eb2253c4a60f09f80aea0f69707e Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Pass QWheelEvent by reference, not by copyVolker Hilsheimer2020-11-121-1/+1
| | | | | | | | It's bad enough that we have a copy constructor for QEvent, but passing a rather heavy type like QWheelEvent by value is inefficient anyway. Change-Id: I0d1736a272c941f17f4290d37e0ae1d2ddc610c8 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Update dependencies on 'dev' in qt/qtdeclarativeQt Submodule Update Bot2020-11-121-2/+2
| | | | | Change-Id: Ifb1fb9b43ebfb9a7f6b40f711b355ac0182a84fc Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Make text example work in static CMake buildsFabian Kosmale2020-11-111-0/+2
| | | | | | | | Task-number: QTBUG-87702 Task-number: QTBUG-86947 Change-Id: I9dd1b6ca633be60977109acf6b00123d4492b726 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Mostly un-blacklist Flickable and MultiPointTouchArea testsShawn Rutledge2020-11-112-25/+2
| | | | | | | | At least they pass again locally. Ubuntu is being problematic still. Task-number: QTBUG-86729 Change-Id: I3085b4070475f52f6e1f37b8455429a5bad08177 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Fix QQuickImageParticle resetting loopKaj Grönholm2020-11-112-28/+27
| | | | | | | | | | | Animating properties like color caused resetting loop because PerformanceLevel never reached new value before resetting again. Fix this by only resetting when we are already not targeting correct level. Task-number: QTBUG-88368 Change-Id: Id22ac03b6fbd716fba07a8c9b7e6942f58e25fc5 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Add simpler non point particle levelKaj Grönholm2020-11-1122-76/+199
| | | | | | | | | | | | | | | Add one more PerformanceLevel which is similar to Color, except it draws using triangles instead of points. This is optimal for d3d11 which doesn't support VertexShaderPointSize. Also rename first levels to *Point to be clear. Testing this on my windows laptop shows ~15% decrease in RAM usage for imageparticle/colored example. Task-number: QTBUG-88294 Change-Id: Ib93bc9fd0d2ef4f1cb8e0d9dcba0db652f288398 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Add Qt 6 API changes doc from qtdocJerome Pasion2020-11-111-1/+162
| | | | | | | | | | -changes to QQuickItem and QQuickWidget -changes to scenegraph's QSG* and QQuick* APIs -content from qtdoc/doc/src/source-breaks.qdoc Task-number: QTBUG-87156 Change-Id: I5d75791b888573a4ad9a9103de56a6c3f7445c7a Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* QmlCompiler: Allow AOT compilation of JS functionsUlf Hermann2020-11-112-0/+17
| | | | | | | Previously, only bindings were compiled. Change-Id: I6e76c3f5e628e60538a0ed754fdd915978b88c1d Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* blacklist tst_QQuickListView::sectionsSnap in CI on macOSShawn Rutledge2020-11-111-0/+2
| | | | | | Task-number: QTBUG-86729 Change-Id: I38048b9b76de5356d50cf0313a06c3fbb3b35d89 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>