aboutsummaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* CMake: Fix framework buildsAlexandru Croitor2020-09-291-1/+1
| | | | | | | | | | | After 5c1ed8bb74ee4eed9ffc9537b880104445b43cd7 in qtbase, the framework version was changed from '6' to 'A'. qtdeclarative had the '6' hardcoded for the qmldevtools module. Switch it to 'A'. Fixes: QTBUG-87031 Change-Id: I21a9e83dfe27904cd67a14371bbc8bb008175dc1 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* QQItemPriv::localizedTouchEvent: don't skip parents of passive grabbersShawn Rutledge2020-09-281-0/+12
| | | | | | | | | | | | | Some subtests of tst_FlickableInterop::touchAndDragHandlerOnFlickable() check whether Flickable can continue to filter child mouse events, even when the only thing going on is that we are delivering a TouchUpdate QTouchEvent to a TapHandler inside the Flickable's content item (such as inside a ListView delegate) due to its having a passive grab. So during filtering only, localizedTouchEvent() needs to localize the event for any item that has passive grabbers somewhere in its children. Change-Id: Icff0438ddba97bd916feedc9dcd6a71ae47671e5 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Port from devicePixelRatioF() to devicePixelRatio()Morten Johan Sørvig2020-09-2811-24/+24
| | | | | | | This ports all of QtDeclarative. Change-Id: Ie6eb4d96b4d49fbed1e8be514d03e331549cd712 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* qqmlimport: Use stable_partition instead of stable_sortFabian Kosmale2020-09-281-2/+2
| | | | | | | | | | | | We do not actually need to sort the imports list, we just require that all inline component imports come before all other imports. This avoids triggering a MSVC STL debug assertion about the used Compare function not actually creating a strict ordering. Fixes: QTBUG-86989 Pick-to: 5.15 Change-Id: I381852392545287ec02b186fcb4f33be3ae95b33 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Export QQmlLocale symbolsVolker Hilsheimer2020-09-281-4/+4
| | | | | | | | | After 8e222a70d19d5eef616e1d6306415da64fbab4cb, QQmlLocale is a namespace and doesn't export any symbols. Export the member functions explicitly, as they are needed by Qt Quick Controls. Change-Id: I867cb5c0325c6c19200408b514c086c8057c82a9 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Handle ungrab and grab-cancel consistently; inform handlersShawn Rutledge2020-09-263-34/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Call onGrabChanged on Pointer Handlers during grab transitions: this was missing in a97759a336c597327cb82eebc9f45c793aec32c9. Flickable needs to receive an ungrab by child-event-filtering, in order to set its pressed state back to false (as in the cancelOnHide autotest). This is best done as a result of the QPointingDevice::grabChanged signal, while trying to send the ungrab to the item that was the grabber, rather than as a special case. Thus, QQuickWindowPrivate::onGrabChanged (the handler for the QPointingDevice::grabChanged signal) is now the only place from which we call QQuickItem::mouseUngrabEvent() and touchUngrabEvent(). But the result is that they are called in more cases than before, so some tests need adjustment. touchUngrabEvent() is not sent unless the event is available and we can verify that all points have been released. This is important for MultiPointTouchArea: it will react by ending interaction with all points at once. Another thing that's important to MPTA and multi-touch handlers is that QQuickWindowPrivate::deliverPointerEvent() must not clear grabbers of points that are not yet released, in the case that only some points are. QQuickWindowPrivate::removeGrabber() now calls QPointingDevicePrivate::removeGrabber() with its optional cancel argument, so that it will emit either a cancel or an ungrab transition. That's only relevant for Pointer Handlers, whereas QQuickItem mouseUngrabEvent and touchUngrabEvent don't make a distinction. Task-number: QTBUG-86729 Change-Id: Idf03aef2e2182398e0fc4a606c0ddbb2aaed5681 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* QQuickTextControl: Adapt to API change for retrieveData()Ulf Hermann2020-09-252-2/+2
| | | | | Change-Id: I7010c3fc1e922672eece4e2fee15e747ff21589c Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Adapt to changes in QMetaSequenceInterface and iterablesUlf Hermann2020-09-251-7/+7
| | | | | | | | metaSequence() became metaContainer() and we should ask for canConvert() as there are two ways to convert to a container. Change-Id: Iba868491ff9d2cc8fc89de1cab29818b834b53f4 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* QQmlDirParser: Treat dependencies like importsUlf Hermann2020-09-252-24/+15
| | | | | | | In particular, allow auto and latest versions. Change-Id: I4a6b26112950d066ae2d8a37dc0e9fa1dec24724 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* CMake: Rename internal functions to contain qt_internalAlexandru Croitor2020-09-251-4/+10
| | | | | | | | | Offer compatibility wrapper functions until we update all of the Qt repos to use the new names. Task-number: QTBUG-86815 Change-Id: I834ac1d5d6549bd4e33b9916a2198a7a03c0d183 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Get rid of QMutableEventPoint::stationaryWithModifiedPropertyShawn Rutledge2020-09-242-7/+3
| | | | | | | | | | | | Omitting stationary points from touch events is such a marginal optimization that this code probably isn't worth maintaining. It wasn't implemented correctly this time either, according to the tst_QQuickMultiPointTouchArea::stationaryTouchWithChangingPressure() test. Task-number: QTBUG-77142 Change-Id: I1ccc8ffe0451d6417add2b03c063ac1aebe36e8e Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* QQuickDrag: Do not crash when changing supportedActionsFabian Kosmale2020-09-231-0/+2
| | | | | | | Fixes: QTBUG-82157 Pick-to: 5.15 Change-Id: I9d694dd543f41b1ce2b6976983d03a3dc659245d Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* QQmlTypeCompiler: Resolve aliases earlierFabian Kosmale2020-09-231-11/+12
| | | | | | | | | This is a prequisite for determining whether a change handler of an alias should use its change signal, or whether it can use the alias target's bindable interface. Change-Id: I6f5220a6889601327cb478479c7c9e58f1a64d97 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Condense the different value type creation functions into oneUlf Hermann2020-09-236-51/+26
| | | | | | | They all did the same thing. Change-Id: I7661b19ad16c0713d46c4df337899e3897349b2e Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Eliminate QQmlValueTypeProvider::storeValueType()Ulf Hermann2020-09-234-51/+4
| | | | | | | | | | | | It was only used for QColor. The string representation of QColor was funneled through the color provider to get a numerical RGBA value and that one was passed to storeValueType() which would create a QColor object. The RGBA value was retrieved by creating a QColor object. We can just directly create the QColor from the string, and we can use the generic create() method for that. Change-Id: If36775830882237e5e36f748872ce23530c3bb71 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Eliminate QQmlValueTypeProvider::createVariantFromString()Ulf Hermann2020-09-234-75/+1
| | | | | | | This can be expressed as constructing the variant from a QJSValue. Change-Id: I3140958469423acdc498e26129e349bcfb601198 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Eliminate QQmlValueTypeProvider::createFromStringUlf Hermann2020-09-237-123/+71
| | | | | | | It can be expressed as a special case of create() with a QJSValue. Change-Id: I7342026ad694077d2780dd8a852714fa72dd68d0 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Remove QQmlValueTypeProvider::variantFromJsObjectUlf Hermann2020-09-234-137/+93
| | | | | | | This can be expressed in terms of create(). Change-Id: Id1950390bf4a1c9dfd9364ea351b81c75eb7e28f Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* QQmlValueTypeProvider: Pass arguments as QJSValueUlf Hermann2020-09-234-99/+62
| | | | | | | | This is so that we can replace them with factory functions as a next step. Change-Id: Ic8619e4e779bd3e47471642c556601555758697b Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Allow proper registration of value typesUlf Hermann2020-09-2315-286/+338
| | | | | | | | | | | | | | | | | | | | You can now have an extension object on a value type that offers additional properties. This is how we model the QtQuick value types. It allows us to retrieve the extension's metaobject without using the virtual functions in the value type provider. As before, this mechanism is still rather dangerous and not fit for public consumption. It relies on the extension object having exactly the same layout as the original value type, and it hides any properties the original value type might expose. Furthermore we enforce now that gadgets should have lowercase names. The ones that didn't before are split up into an anonymous value type and a namespace that contains all the addressable bits. Task-number: QTBUG-82443 Change-Id: Ic93d6764538d6ccc0774b3c5648eee08ba0939c0 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Fix ubsan errorAllan Sandfeld Jensen2020-09-231-5/+9
| | | | | | | | memcpy can't officially copy from nullptr, not even 0 bytes. Pick-to: 5.15 Change-Id: Ie6ede9a861cb2ae7ab35a50db5aa6c82cea6ad76 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Map swap interval 0 to NoVSync with all the APIsLaszlo Agocs2020-09-232-2/+16
| | | | | | | | | What exactly this will cause is another question. But at least now the traditional OpenGL way of setting the QSurfaceFormat's swapInterval 0 will have an effect with the other APIs as well. Change-Id: I6d50952502a70e84828ed87347e2a948299f6f42 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* Avoid crash when module version cannot be resolvedEskil Abrahamsen Blomfeldt2020-09-231-1/+5
| | | | | | | | | | | | | | | When QQmlMetaType::latestModuleVersion() returned an invalid version, we would fail importStaticPlugin() without adding any error. Since we unconditionally called takeFirst() on the errors list, we would later crash. The precondition here is that any failure adds an error, so we now assert to make this explicit. Also, add a simple module not found error when we can't resolve it. Change-Id: I7a13775b2ef56d95b7738ac53e58501b8c68895f Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Prevent crash when destroying asynchronous LoaderJoni Poikelin2020-09-231-1/+1
| | | | | | | Fixes: QTBUG-86255 Pick-to: 5.15 Change-Id: I30488b64d910a1409a43e2e98ee7ab084aec33d2 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* QQmlPropertyCapture: Replace list with forward listFabian Kosmale2020-09-222-1/+11
| | | | | | | | This required adding one missing function from QFieldList to QForwardFieldList, but saves one pointer and one quint32. Change-Id: I022fcd2e6bffe39b2d01f4664fd2ab154445fb00 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Fix compilation for OpenVG pluginEskil Abrahamsen Blomfeldt2020-09-2210-34/+30
| | | | | | | Adapt to changes in RHI and Qt 6 in general. Change-Id: I1f8f148530e8ca1db482430b6147fc5fbba9f813 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* Replace QmlVoidT with std::void_tUlf Hermann2020-09-221-14/+11
| | | | | | | Now that we can use C++17 we don't need to invent our own. Change-Id: I6c6e02ac9b48f2fbe88160e7f9ebf9655092c9fc Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* CMake: Install public qmake .prf files into the prefix mkspecs dirAlexandru Croitor2020-09-211-0/+9
| | | | | | | | | These are needed for qmake projects. Fixes: QTBUG-86802 Task-number: QTBUG-86498 Change-Id: I09c05a358fa580a3a9eab002c6ada42ad70e999c Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Doc: Update the depends listVenugopal Shivashankar2020-09-211-1/+1
| | | | | | | | Some of the modules are not part of the 6.0 release. Change-Id: I1a7ce0fb34b579b2eb08c8e977e67930f561ef44 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Handle QProperty inside bindingsFabian Kosmale2020-09-215-6/+74
| | | | | | | | | | | | | | | | | | | If we have a binding containing QProperties, and the binding target is an old style binding, still we have to trigger an update if any of the captured properties changes. We cannot reuse the QQmlJavaScriptExpressionGuards as those depend on Qt's signals, and a QProperty is not associated with a change signal in the general case. Therefore, we introduce a new list of QPropertyChangeHandler, which when triggered cause a reevaluation of the binding. As an optimization, we skip the whole capturing process for QQmlPropertyBinding, as that one already takes care of updating itself. Reverts 845bbb99a41a3e4f05c2b3d05d6db748c825dca0 (because skipping the capture is only possible when _both_ the bindee and the property in the binding are QProperty based.) Change-Id: Iafed2a41dcd708bcc33912ce810d803949379c63 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Rename QQmlQPointer to QV4QPointerUlf Hermann2020-09-218-14/+14
| | | | | | | You can wrap QObject pointers in plain JavaScript. Change-Id: I246a72a7d5d7b2562e722bf9eafc7880b772a806 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Rename QQmlSequence to QV4SequenceUlf Hermann2020-09-213-72/+72
| | | | | | | This feature is available without QML, in pure JavaScript. Change-Id: Iec8a52ed10ed3eeaec24d3955c8c132bf2bd9677 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Register StandardKey as foreign namespace rather than elementUlf Hermann2020-09-211-4/+3
| | | | | | | | | We are only interested in the enum of the same name. StandardKey is not creatable nor does it have any properties. It is also written in uppercase. Logically it therefore is a namespace. Change-Id: I98217625161f8d6f04bc328620cb2d93aa601fae Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Rename PointingDeviceUniqueId QML type to lowercaseUlf Hermann2020-09-193-4/+3
| | | | | | | | | Value types should be lowercase and this one is not a QObject. It's also undocumented. Therefore we should be able to rename it without much drama. Change-Id: I7ae75aca5e592c9bee2a33ec3c36ed2ffa1edecd Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Remove redundant definition of QMutableTouchEvent::addPointShawn Rutledge2020-09-181-12/+0
| | | | | Change-Id: I17f5074a2ecbcf7b078def79cedf179d1d25f089 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Remove QQuickPointerEvent etc.; deliver QPointerEvents directlyShawn Rutledge2020-09-1834-3107/+993
| | | | | | | | | | | | | | | | | | | | | | | QEventPoint does not have an accessor to get the QPointerEvent that it came from, because that's inconsistent with the idea that QPointerEvent instances are temporary, stack-allocated and movable (the pointer would often be wrong or null, therefore could not be relied upon). So most functions that worked directly with QQuickEventPoint before (which fortunately are still private API) now need to receive the QPointerEvent too, which we choose to pass by pointer. QEventPoint is always passed by reference (const where possible) to be consistent with functions in QPointerEvent that take QEventPoint by reference. QEventPoint::velocity() should be always in scene coordinates now, which saves us the trouble of transforming it to each item's coordinate system during delivery, but means that it will need to be done in handlers or applications sometimes. If we were going to transform it, it would be important to also store the sceneVelocity separately in QEventPoint so that the transformation could be done repeatedly for different items. Task-number: QTBUG-72173 Change-Id: I7ee164d2e6893c4e407fb7d579c75aa32843933a Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Remove the pointId += deviceId << 24 hackShawn Rutledge2020-09-181-4/+0
| | | | | | | | | 1204ed14dc11e6343a569646428a7ffddd098f8c did this in some places but not others. Now we remove the remaining vestiges when delivering mouse and tablet events. Change-Id: I0aaecab49543ad65952d84f375e78936d737483e Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Adapt to QEventPoint changesFawzi Mohamed2020-09-182-20/+20
| | | | | | | | adapt to changes done in qtbase 2692237bb1b0c0f50b7cc5d920eb8ab065063d47 QTouchEvent.touchPoint -> points,... Change-Id: I3ba1d54ff4f3375c781d765e806ac95392ad6c3c Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Adapt to change in QMetaSequenceInterface::valueMetaTypeUlf Hermann2020-09-181-1/+1
| | | | | | | | valueMetaType is a QMetaTypeInterface* now. Change-Id: If7e12e89b1801258d9e0892cbfb3b70b85b52376 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Fawzi Mohamed <fawzi.mohamed@qt.io>
* Don't capture bindable propertiesUlf Hermann2020-09-171-1/+1
| | | | | | | We don't need notify signals for those. Change-Id: If78329d1c9e98aee3fb9cd028963a881179ba02f Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* CMake: Fix in-source example buildsAlexandru Croitor2020-09-171-2/+2
| | | | | | | | | | | | QT_QMLTYPES_FILENAME can contain a path including subdirectories, so before creating the marker file in the .generated subfolder, we need to recreate the whole directory structure. Amends 1d67ecd790fe08a7cea1327ee754a9b8e74d113f Change-Id: I20ad48202d4e643df1ed3b86e631abb12d179b9d Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Match new qHash() signatureEskil Abrahamsen Blomfeldt2020-09-1712-15/+15
| | | | | | | | As documented in Qt 6 porting guide, qHash() should now also accept a size_t as seed in addition to returning it. Change-Id: I2b3ea26f631203468c071fa6ff65f95d82566132 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Doc: Add porting guides for all modules to porting guidePaul Wicking2020-09-163-0/+138
| | | | | | | Task-number: QTBUG-84051 Change-Id: Iffc8774898dba5bda329fa572289cc0134fddb6f Reviewed-by: Kai Koehne <kai.koehne@qt.io> Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Fix additional warnings from usage of deprecated APIsVolker Hilsheimer2020-09-164-8/+8
| | | | | | | | | | Replace more QLibaryInfo::location with QLibraryInfo::path Replace old event accessors APIs, including relevant comments. Change-Id: Ie205fc93b6e1c0dfb3dca9100fbde417ab68fc9f Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* QQmlValueTypeProvider: Use QMetaTypeUlf Hermann2020-09-163-174/+18
| | | | | | | | We can create, compare, convert registered types without going through special virtual value type providers. Change-Id: I0431256540b8dd6861ff3a945570ea7df45ed98d Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* QQmlValueTypeProvider: Remove dead codeUlf Hermann2020-09-163-88/+0
| | | | | | | | | The more adventurous variant/string conversions are luckily unused. Let's remove them before anyone gets ideas. Change-Id: I6f95cbdf9ead12ab723cafdbb2b0f02a0ff461fa Reviewed-by: Maximilian Goldstein <max.goldstein@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* QQmlStringConverters: Remove dead codeUlf Hermann2020-09-161-86/+1
| | | | | | | | | createFromString() is only ever called for QVector2D, QVector3D, QVector4D, and QQuaternion. Those are all handled by the QtQuick implementation. Change-Id: Iaf2662207bf1110cb21761e4ffb401d8ebe521c6 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* CMake: Make reconfiguration work for in-source buildsAlexandru Croitor2020-09-161-2/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | Qml plugins can either use a plugins.qmltypes file from the source repository, or opt into generating it if the file doesn't exist. There is a use case for the file not to be generated for some Qml tests. To protect against accidentally overriding the source repo file, an error is shown if the file exists in the source directory and we also also try to generate it. With an in-source build, all plugins.qmltypes files are generated in the source directory, and this causes the above check to be triggered on reconfiguration. To avoid the false issue, create a new "${CMAKE_CURRENT_BINARY_DIR}/.generated/plugins.qmltypes" file to serve as a marker that the actual file was generated, and is not part of the source repository. If the marker file exists, don't error out. Change-Id: Ieca28b4da0251f67f8c066cbac471c8e6e955758 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Fix additional warnings from usage of deprecated APIsVolker Hilsheimer2020-09-162-2/+2
| | | | | | | | Replace QLibaryInfo::location with QLibraryInfo::path, and remove usage of Qt::AA_EnableHighDpiScaling, which doesn't have any effect anymore. Change-Id: I347e8a83e0f4c2b4405f2512e569ad3234f05a98 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Avoid various warnings about deprected QMetaType methodsUlf Hermann2020-09-1621-71/+75
| | | | | Change-Id: I8f4b2703fdd08ff341904219cec33c321e0511c7 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>