aboutsummaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* CMake: Fix singleton declaration in qt6_target_qml_targetJoerg Bornemann2020-10-201-1/+1
| | | | | | | | The declaration is to be written without the square brackets. Fixes: QTBUG-87684 Change-Id: I8fb7fb1f9204cb56d2fa1e2c10ec585ff0e2b512 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* QmlCompiler: Drop the metaobject revision from exportsUlf Hermann2020-10-193-22/+18
| | | | | | | | | Instead, output a warning if the revision doesn't match the version. We want to get rid of generic version/revision matching. To this end, add a way to retrieve the version from an export. Change-Id: Ie887103eba910f14e49faa684ac559cc72cab199 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* QmlCompiler: Add hasMethod() and hasProperty() to QQmlJSScopeUlf Hermann2020-10-191-0/+2
| | | | | | Change-Id: I29e38054a5adcf398f63df7f367ed4bc24c09c75 Reviewed-by: Maximilian Goldstein <max.goldstein@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Doc: mention that clipping can affect performance and link to pageMitch Curtis2020-10-191-0/+3
| | | | | | Pick-to: 5.15 5.12 Change-Id: I85e60dd5c8643a8e443a14250987b2b38c78dc08 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* doc: Update sg rhi backend sectionLaszlo Agocs2020-10-191-5/+5
| | | | | | | | Use the now preferred GraphicsApi enum value (e.g. Vulkan instead of VulkanRhi). Drop a reference to the long gone QSG_RHI env.var. Change-Id: I233611b40186884a70e9680b3dfef7284b3e3c73 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* Do grabs out of orderLaszlo Agocs2020-10-192-77/+79
| | | | | | | | | | | | | ...while extending the autotest to cover more complicated cases, such as grabbing again after show-hide and doing show-grab-hide-grab-show-grab. In fact some of these cases have not been working in Qt 5. Now the basic render loop is fixed up to support the all the combinations threaded does. Task-number: QTBUG-87399 Change-Id: Id01995bc3a2660b16cfb2f8bedc84becea0be1bb Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* CMake: Adjust to public API renaming in qtbaseAlexandru Croitor2020-10-181-1/+1
| | | | | | Task-number: QTBUG-86827 Change-Id: Ibeae878cbd7cc43031aeb13b2c480215c849f8bc Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Adapt QMutexLocker to qtbase changeFabian Kosmale2020-10-182-2/+2
| | | | | Change-Id: Ica9561a42217f5a509a6e84e9e48036ec6348e48 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* QmlCompiler: Read the "bindable" attribute from plugins.qmltypesUlf Hermann2020-10-163-43/+44
| | | | | | | | | And refactor QQmlJSMetaProperty to use setters rather than a gigantic constructor. Also, notice that we don't have to construct the same property twice just to update its type. Change-Id: Ia6c195fa7088f6ecdff868daae17d4284c1edb22 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* QmlCompiler: Retrieve warnings from qmltypes parserUlf Hermann2020-10-161-0/+4
| | | | | Change-Id: I83292c9db42e39e52fbf20e92c036d789bbdb2d6 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Add undefined to builtins.qmltypesUlf Hermann2020-10-161-2/+7
| | | | | Change-Id: Ie7c8a28fdc417c43a9f24061171b342447b15272 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Fix typoes in builtins.qmltypesUlf Hermann2020-10-161-16/+16
| | | | | | | It's isReadonly, not isReadOnly. Change-Id: Ia4c372468447bd4f6c0ad21ba36a228052912220 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* CMake: Mark some of the public APIs as TPAlexandru Croitor2020-10-161-1/+6
| | | | | | | | | | We don't have tests for them yet. The API surface is quite big. Some options might not make sense anymore. Task-number: QTBUG-86827 Change-Id: I4aebdb2cdfa716433681d32967ab32f1c171925c Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Promote suffixless names in GraphicsApiLaszlo Agocs2020-10-162-12/+21
| | | | | | | From API review. Change-Id: I3cda6f4b4e5a2e33356e7af4f7720e0b019b546d Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* Have a depth buffer when doing the heavy offscreen readbackLaszlo Agocs2020-10-161-1/+8
| | | | | | | | | | | | | | The opaque pass will rely on it (by default at least). Not having a depth buffer will almost certainly lead to rendering errors, albeit silently since technically it's not an error not to have one. Just make sure there is one. The assumption is that the Z order problem mentioned in the comments in the referenced bug is caused by this. Task-number: QTBUG-87399 Change-Id: Ifbf5564848f17e7ce3498190d663c1ec693e86c9 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* QQmlJSScope: Add a way to retrieve a single method or propertyUlf Hermann2020-10-162-5/+8
| | | | | Change-Id: Icf8f2aae869176ed864dcdd3b4231e71043cb0bc Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* QmlCompiler: add operator!= to QDeferredPointerUlf Hermann2020-10-151-0/+10
| | | | | Change-Id: I2191660b731d85495d0e90152e0fe493553b7a2f Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Rely on default parameter in QUnifiedTimer::updateAnimationTimerVolker Hilsheimer2020-10-151-1/+1
| | | | | | | | Allows that parameter to be removed in qtbase. Change-Id: If409d91d0e3a542106790759b8916858eca546e4 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io> Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* doc: Group QSGTexture native interfacesTor Arne Vestbø2020-10-151-2/+13
| | | | | Change-Id: I1b305bf1b74e7e7a078d7bd4b1358d773f5d2580 Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
* QmlCompiler: Pass source location to all scopes from QML filesUlf Hermann2020-10-152-20/+32
| | | | | Change-Id: Ic0aeb152acb0d90d15cc48a55c0ad5b15a60a6eb Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* doc: Don't overwrite native interface docsTor Arne Vestbø2020-10-152-17/+1
| | | | | | | | It doesn't look like qdoc can document the Quick specific namespace docs. Change-Id: Ic3eca2d0834c0a461f696762070e9f099e3e2641 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Declare native interfaces using helpersTor Arne Vestbø2020-10-153-36/+12
| | | | | Change-Id: I24c792fea1c5317466a155dcb3b050fac0f765b6 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* doc: Update native interface accessor wordingTor Arne Vestbø2020-10-151-2/+2
| | | | | Change-Id: I1c6e9a6f949fa44265f05ce3d461d151d7e3763f Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Further unify findwarnings.cpp and qqmljsimportvisitor.cppUlf Hermann2020-10-152-4/+201
| | | | | | | | Most of the logic in findwarnings.cpp applies also to imported files and should live in the base class. Change-Id: I65f326f50a8bfab0dff4b5b31f7bee7300b20704 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* QDeferredPointer: Remove the factory before executing itUlf Hermann2020-10-152-10/+9
| | | | | | | Only this way we avoid infinite recursion on cyclic references. Change-Id: I4d6323a093d17f7d55965dc40f9dc5f1a647df9c Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* CMake: Add generated qrc files to the qmlimportscannerCristian Adam2020-10-151-1/+7
| | | | | | | | | | | | The list of generated qrc files is passed to qmlimportscanner via the -qrcFiles parameter. qt_import_qml_plugins(pointer) needs to be explicitly called in CMake unlike qmake which does the equivalent behind the scenes. Task-number: QTBUG-85994 Change-Id: Ia49a5e1fe5df11c0b3b8ff4c1765377767ca2478 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* QQuickShaderEffect: fix crash when hiding parentMitch Curtis2020-10-151-1/+5
| | | | | | | | | | | | It's possible for itemChange to be called during destruction when deleting the QQuickShaderEffectImpl. We nullify m_impl before deleting it via another pointer to it, so we must check that it's not null before trying to use it. Pick-to: 5.15 Fixes: QTBUG-86402 Change-Id: If4955445f7cc0d1f376bc9b86b95e1cca4d88ede Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Unify QQmlJSImportVisitor and FindWarningsVisitorUlf Hermann2020-10-155-106/+199
| | | | | | | | | They are both pretty much doing the same thing, except that the import visitor is not as thorough. We need the full analysis in QtQmlCompiler, so we successively move the code over. Change-Id: If7fb47f88165fd8b61f4ccc408ccfbb7dad533e6 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* qmllint: Defer resolution of types read from QML filesUlf Hermann2020-10-158-26/+253
| | | | | | | | | | When importing a directory we most likely don't need all of the files in the directory. Therefore we now parse them only when they are accessed. This speeds up the execution and will allow us to process imports recursively without running into infinite recursion. Change-Id: I0c79313de792249e6bb86144b5014a7787dbdc5b Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* qmllint: Unify the printing of diagnosticsUlf Hermann2020-10-155-27/+53
| | | | | | | | We can use QQmlJS::DiagnosticMessage to carry message, type, and location. Change-Id: I3868bc8035b4da13efad0d1b7d2f8dfeff1ef234 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Add setFlags to QSGMaterialShader for symmetryLaszlo Agocs2020-10-142-0/+10
| | | | | | | From API review. Change-Id: Ib1b3280b83222bb1b370640c4f733554f60d8104 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* Replace forwarding header in public header includesLaszlo Agocs2020-10-142-2/+2
| | | | | | | From API review. Change-Id: Icc4f571603fe8d59851f768fec408070989623c3 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* CMake: Use qt_internal_add_plugin in qt_internal_add_qml_moduleAlexandru Croitor2020-10-131-1/+1
| | | | | | | | | The implementation means to call qt_internal_add_plugin because that's the one that handles the 'QML_TARGET_PATH' option. Task-number: QTBUG-86827 Change-Id: I3289741458cb8038f576bc4b08617f42fce98710 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Fix alwaysRunToEnd==true prevented complex Anim from stoppingPiotr Mikolajczyk2020-10-134-0/+14
| | | | | | | | | | AnimatorProxyJob would not forward loopCount to the controlled job causing the sequential or parallel animation to go infinitely after attempt to stop Task-number: QTBUG-82890 Pick-to: 5.15 Change-Id: I6a1ca787f06789064e05407bbe9ae5e5861f24d5 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* CMake: Rename qt6_quick_compiler_process_resources to be internalAlexandru Croitor2020-10-131-2/+2
| | | | | | Task-number: QTBUG-86827 Change-Id: Idb9934d18dbe54baf223d30923b03becd3e53a50 Reviewed-by: Simon Hausmann <hausmann@gmail.com>
* Fix QProperty property interaction with aliasesFabian Kosmale2020-10-125-5/+24
| | | | | | | | | | | | | | | | With this change, an alias of a bindable property is also bindable, and shares its bindable interface with the target. Moreover, the logic in QQmlTypeCompiler is adjusted so that a change handler of an alias uses the bindable interface if possible, instead of connecting to the alias' change signal. That would never be emitted if the target is a QProperty without a notify signal. Alias properties still have a change signal, but those never get emitted. Change-Id: I857dfdbe51048a2b604ad632982e7f4adac6b907 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Rename QQmlJSImportedMembersVisitorUlf Hermann2020-10-125-15/+15
| | | | | | | We need to make this a general import visitor. Change-Id: I735378fc9139cb4891f8b113d86395df856fb4e9 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Register QAbstractItemModel in QtQml.ModelsMitch Curtis2020-10-121-0/+9
| | | | | | | | | So that users can assign to QAbstractItemModel* properties in QML. Pick-to: 5.15 Change-Id: Ifba0da3d777ec47f53b257c39468ed3f5785d40f Fixes: QTBUG-86428 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* QQmlMetaType: Cast the type interfaces to const when deletingUlf Hermann2020-10-121-2/+2
| | | | | | | | We don't need them to be mutable, and the return type of the function will become const soon. Change-Id: I3016d80df31db981d47296e468e93336d3a79ce1 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* QPropertyChangeTrigger: Inherit directly from QPropertyObserverFabian Kosmale2020-10-123-11/+15
| | | | | | Change-Id: If2ffeef14d33200e39fb8b3e7fd88c232164a241 Reviewed-by: Maximilian Goldstein <max.goldstein@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Adapt to platform API renameTor Arne Vestbø2020-10-097-49/+49
| | | | | Change-Id: I1f2171e18ec3df71f7eaec1be0e0e0d1442a3860 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Update QStringConverter usageMårten Nordheim2020-10-091-2/+2
| | | | | | | Following fa8d021fa6fcb040fb702b6ffd2deee52a3b748a Change-Id: I89c0231655ec853cef9465e5a88a92d7e0085d30 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* QQmlPropertyValidator: only use string converter for stringsFabian Kosmale2020-10-091-10/+26
| | | | | | | | | | | | | A recent change in fromIsoTimeString exposed the fact that we are using QML's string converters to check whether a binding expression is valid for a given property. However, while we begrudgingly accept that string representations shall be converted to value types via the string converters, the same shouldn't hold true for things that aren't actually strings - for instance, numbers. Fixes: QTBUG-87299 Change-Id: Iefd390efae7c193dc32d37e63943b39e09c9295a Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Don't assume the event given to childMouseEventFilter() is QPointerEventShawn Rutledge2020-10-081-2/+2
| | | | | | | | | | It can also be an UngrabMouse event, a plain QEvent, sent from QQuickWindowPrivate::onGrabChanged(). So we have to test isPointerEvent() before casting, rather than asserting beforehand. Amends 9ce346411eb5bd71ae84647999030ae47c3c544a to fix a crash. Change-Id: I1d169b4e8c8a58f3736a3d95dfc43fa21e123403 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Allow optional imports in qmldir filesUlf Hermann2020-10-088-77/+115
| | | | | | | | | | This is useful for modules that select their imports at runtime using qmlRegisterModuleImport(). We can list all possible variants as optional imports so that tools can see what types might be available. Task-number: QTBUG-87130 Change-Id: I8a37bdde79aef3619fd1f05e5ea6781d521afa88 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* CMake: Allow installation of qmltypes filesUlf Hermann2020-10-0811-0/+28
| | | | | | | | This is what qmake does on install_qmltypes and we do want to install the qmltypes files of our own modules. Change-Id: Iad430aab87f21331abf332ca5c92f9d7edc47bb0 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* QQuickTextEdit: ensure we update document width when padding has changedRichard Moe Gustavsen2020-10-081-2/+3
| | | | | | | | | | | | | | | We use an if-test to check if the document width has changed before we set the new value. The problem is that the value we test against is different than the value we set. The result is that we can sometimes skip setting a new width on the document, even if padding has changed. This patch ensures that we use the same width for both testing and setting. Pick-to: 5.15 Change-Id: Ia8391999e8cc2b5be72fe525d396bf8c17ba0fa2 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Amend QQFlickablePrivate::wantsPointerEvent() to take QPointerEventShawn Rutledge2020-10-083-18/+6
| | | | | | | | | | ...now that we're done with the cherry-pick to 5.15. Amends 6857ad3e686a5e2b45d28a7f47dca3210608da50. Task-number: QTBUG-74046 Task-number: QTBUG-85302 Change-Id: I3c2ec091976bcfc170ff58d8fcd226dcdf4c90d2 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Prevent touch->mouse synth from altering the localized touchpointShawn Rutledge2020-10-081-2/+3
| | | | | | | | | | | | | | | | | | | | | | QEventPoint is explicitly shared, so a QMouseEvent synthesized from a QTouchEvent shared the same QEventPoint instance. When QQuickFlickable::filterMouseEvent() calls cloneMouseEvent(), it was re-localizing the point for the flickable, after it had already been localized for delivery to the original receiver item. This caused a lot of failures in Controls, e.g. for any button inside a Flickable, QQuickAbstractButtonPrivate::handlePress() would be given the wrong position. After filtering, we need to be able to resume delivery to the original receiver item without re-localizing the point. During filtering, the filtering parent should receive the same version of the touch event that contains only the points that would be sent to the receiver item, not the potentially more-complete original event. Fixes: QTBUG-87157 Change-Id: I7eec6f5ecfe9f042199f0944897c04fbffb2172e Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Add missing typeinfo to labsanimation/qmldirUlf Hermann2020-10-071-0/+1
| | | | | Change-Id: I265710165249e7c6e892d00fc3594dbe1ac71816 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>