aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Fix QJSValue singletons only supporting object typesMaximilian Goldstein2021-02-221-0/+42
| | | | | | | | | | | Now primitives such as integers and strings should also work. Fixes: QTBUG-85615 Change-Id: I201d1844b7272ca50e32f1e33e9ac357b5e68dfe Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> (cherry picked from commit 64102ae231317eb6f637304918e55153dadef72d) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QML: Warn about usage of injected signal parametersUlf Hermann2021-02-121-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | You should declare functions with formal parameters if you want to use parameters passed by the signal. We need to generate two different warnings because there are two code paths by which such parameters are injected. If we compile with qmlcachegen, it simply inserts a lookup instruction in to the byte code. This lookup then triggers our special hack expressly made for signal parameters. If we don't compile using qmlcachegen, a function declaration with formal parameters is synthesized. We mark those formal parameters as injected and warn if we see one of them used. [ChangeLog][QML][Important Behavior Changes] The automatic injection of signal parameters into signal handlers is deprecated. This is because we cannot determine the names of the signal parameters at compile time. Furthermore, also for human readers it is difficult to discern between arguments, context properties, properties of the current object, and properties of the root object of the component. Requiring the signal parameters to be explicitly named resolves some of this confusion. You can turn the deprecation warning off using the "qt.qml.compiler" and "qt.qml.context" logging categories. Task-number: QTBUG-89943 Change-Id: If0a5082adb735a73efd793868b3a55bc7d694cbe Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Andrei Golubev <andrei.golubev@qt.io> (cherry picked from commit df70d4f76f9c1c7b3de9ae91877df803c18b1264) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix QJSValue string parameters used in signalsMaximilian Goldstein2021-02-101-0/+21
| | | | | | | | Fixes: QTBUG-86482 Change-Id: If938fad22f51b08fe3cb20b94634efe46a1eed47 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> (cherry picked from commit e887f25dd6c4c9630a7367c3a2ed95a284191843) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Return errors if validation of inline components failsUlf Hermann2021-02-081-0/+17
| | | | | | | | Fixes: QTBUG-90038 Change-Id: Ic01b5d097e0b9e6720bcec7ccb18c22abb5418f4 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit 001596d472557bca08eb93159e724301dea88ad6) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QmlCompiler: Allow for multiple extensions per objectUlf Hermann2021-02-011-0/+21
| | | | | | | | | | | | | | | | | | | Previously, the assumption was that each object could only have a single extension object. As proven by the new qqmllanguage test this is not the case. Each registered object in the type hierarchy can have its own extension. Therefore, adjust the algorithms that generate qmltypes and iterate the extension objects when analyzing them. This leads us to the realization that anonymous types can in fact meaningfully carry extensions and implement interfaces. Adapt qmltyperegistrar accordingly. For the test to compile, however, we need to realize that the class declaring interfaces needs to befriend all potential subclass's QmlInterface structs. Fix that, too. The rabbit hole went deep. Change-Id: Ia451897e927e03b95c3062e829edf1dfcd216613 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* QML_SINGLETON: Handle local create() functions with foreign typesMaximilian Goldstein2021-01-201-0/+11
| | | | | | | | Previously only the foreign type was searched for a create method. Now the wrapping type can also contain it. Change-Id: I05fb9e0c0a54c14530eb9adcae5a44df5c208be3 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* qqmlengine: Fix crash when encountering bad singletonsMaximilian Goldstein2021-01-111-0/+22
| | | | | | | | | Previously errors occurring when parsing QML singletons would just be ignored resulting in a crash. The errors are now properly printed and the execution is aborted in time. Fixes: QTBUG-85932 Change-Id: I61cef5f97546ce2e0753bc46c548838a21b1f506 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Avoid crash for deep aliasesMaximilian Goldstein2021-01-111-0/+7
| | | | | | | | | Aliases are seriously broken and need a larger overhaul. This patch at least prevents the application from crashing. Task-number: QTBUG-89822 Change-Id: Ib6acc5b6f621a902f7f5ce370043986486f3c0d0 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Fix IC properties in same fileFabian Kosmale2020-12-101-0/+1
| | | | | | | | | | | Also fixes typename and metatype registration for inline components. Done-with: Fabian Kosmale <fabian.kosmale@qt.io> Pick-to: 5.15 Fixes: QTBUG-89173 Change-Id: I97d65d5539b577a8828d5711e5f2e79c8568b441 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* QML engine: Use QMetaType instead of metatype-id in propertydataFabian Kosmale2020-11-261-1/+1
| | | | | | | | | | | | | | We don't want to convert back and forth between QMetaTypes and ids. This change is the first step towards using QMetaType directly everywhere. By reordering the members of QQmlPropertyData to avoid a gap caused by alignment, we can replace the typeid int with a QMetaType without requiring more space. There are still a few places left using metatype ids, notably the value type logic. Task-number: QTBUG-82931 Change-Id: Ic38f38d10c71ed20655877976c9cb5ee3cbe2d77 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Update tests to use new metaType systemDavid Skoland2020-11-021-68/+67
| | | | | | | | Change from the QVariant enum to the QMetaType enum and prefer typeId over userType where possible Change-Id: Ic89c55978d46cc23d23b8e9c82c475c0c220fae3 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* QML: Allow singleton types to be extendedUlf Hermann2020-11-021-0/+23
| | | | | | | | | It seems we never stated that singletons can not be extended in our documentation. Therefore this is technically a bug fix and doesn't need separate documentation. Change-Id: I7877289bd5a52ecf709f80ba1975137981ec65f0 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* QML: Allow singletons to be created with a factory functionUlf Hermann2020-11-021-0/+17
| | | | | | | | | | This is in line with what we do on qmlRegisterSingletonType(), and it allows us to return singleton objects created independently of the instantiation mechanism. Change-Id: Ia6a077f5d22241593acd8cc87b3f65ae20f95667 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Maximilian Goldstein <max.goldstein@qt.io>
* QML: Allow namespaces as extensions to typesUlf Hermann2020-11-021-0/+21
| | | | | | | | | | | | | | | | | This way we can access the enums of namespaces as properties of the primary type. This is achieved by: 1. Making enums of extended types available in the base type 2. Allowing the extension to be specified as plain metaObject rather than as type name. 3. Refraining from creating the extension if the create function does not exist. The goal of this is to declare the Qt namespace in a civilized way, but will also help with cleaning up the QtQuick value types and their enums. Change-Id: I13399741d30ce38d1bff753cfa1b11e72ccfbf6a Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Inline components: Fix custom parser supportFabian Kosmale2020-10-281-0/+11
| | | | | | | | | Fixes: QTBUG-85713 Fixes: QTBUG-87464 Pick-to: 5.15 5.15.2 Change-Id: I5c190ad2d02190de90260042cc06e51c1da01c63 Reviewed-by: Maximilian Goldstein <max.goldstein@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* QQmlMetaType: Grudgingly accept uppercase value typesUlf Hermann2020-10-051-2/+2
| | | | | | | We throw a warning instead of an error. Change-Id: I0f5886a2d46582405ae1d57879ccb3937e27950f Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* qqmlimport: Use stable_partition instead of stable_sortFabian Kosmale2020-09-281-12/+18
| | | | | | | | | | | | 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>
* Allow proper registration of value typesUlf Hermann2020-09-231-0/+78
| | | | | | | | | | | | | | | | | | | | 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>
* tst_qqmllanguage: Use namespaces for registering enum containersUlf Hermann2020-09-221-2/+6
| | | | | | | The uppercase names indicate that we don't actually want value types. Change-Id: Id9b64be8770b7fcf49e668dfd0994e9c4e85b948 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Adapt to changes in qtbaseUlf Hermann2020-09-151-0/+2
| | | | | | | | | Due to qiterable.h specializing a template declared in qmetatype.h we temporarily need to include it in a few tests so that the iterables work. Change-Id: Ia32392419dead76eaf2b91b2ec4157b726d8de74 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Always group the metaType and listType togetherLars Knoll2020-08-281-3/+3
| | | | | | | | They are always created and destroyed together, so grouping them makes the required memory management of them easier. Change-Id: Ia1980f31f9bdff6a1accd229bc8380ae153edf67 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Unify "variant" and "var" properties in QMLFabian Kosmale2020-08-241-36/+1
| | | | | | | | | | | | | | | | | | | | variant and var properties differ in two important ways: - variant properties trigger "magic" string conversions: variant v1: "red" // contains a QColor var v2: "red" // contains a string - variant properties behave differently for value types: they create copies, instead of references. However, as variant properties were marked as obsolete and this behavior was effetively undocumented, it should be safe to give "variant" "var semantics". With this change, we can also avoid doing magic conversions when storing data in QVariant properties of QObjects/QGadgets Change-Id: I549b1beb98e6af9639c1ee81f316bda513d5ff65 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* QQmlObjectCreator: fix member func call with this == nullptrEvgeniy A. Dushistov2020-08-221-0/+10
| | | | | | | | | | | | | | | | The test example is based on qtvirtualkeyboard/src/virtualkeyboard/content/components/PopupList.qml Luckily ((QQmlPropertyCache *)nullptr) -> property(-1) is ended without access to this, so this was not caught before. But this is UB, plus I can not run Qt and my application compiled with -fsanitizer=X, because of it crashed after the first member function call with nullptr as this Fixes: QTBUG-85605 Change-Id: If6a71fde9a14cc4f73139dfa0e6ee3005453104d Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* tst_qqmllanguage: Fix failure due to stricter equality of QVariantFawzi Mohamed2020-08-201-1/+4
| | | | | | | add explicit conversion to QDate to handle strict comparison Change-Id: I5e2ce46e13dc2b1580fc463f88d2cd8401371235 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Support required list propertiesFabian Kosmale2020-07-281-0/+6
| | | | | | | | The corresponding rules were missing so far. Fixes: QTBUG-85716 Change-Id: Ic97546ea2e574f694a96d974ee355ac84f8650b5 Reviewed-by: Fawzi Mohamed <fawzi.mohamed@qt.io>
* URL: Allow non-string parametersMaximilian Goldstein2020-07-031-0/+13
| | | | | | | | | | Previously we only allowed string parameters as the first parameter of the URL constructor. This excluded types like url. The behavior of instead trying to convert the parameter to a string and then interpreting this as an url matches the specification more closely. Change-Id: I6ef8db9d8c0f238ba8c51b1023decdfcc1caad87 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Add ; to Q_UNUSED and UNUSED_PARAMLars Schmertmann2020-06-261-1/+1
| | | | | | | | | This is required to remove the ; from the macro with Qt 6. Task-number: QTBUG-82978 Change-Id: Iead53d18fd790fb2d870d80ef2db79666f0d2392 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Do not resolve URLs when assigning them to a propertyUlf Hermann2020-06-221-3/+3
| | | | | | | | | | | | | | | We don't know in advance if a URL is part of the source code and should be relative to the current element, or if it is part of the application data and should not be touched. [ChangeLog][QtQml][Important Behavior Changes] URLs are not resolved or intercepted anymore when assigning them to a "url" property. Instead they are resolved and possibly intercepted when used to access an actual resource. Fixes: QTBUG-76879 Change-Id: Iaa2385aff2c13aa71a12e57385d9afb5dc60a073 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* qqmltypecompiler: Be more careful when resolving enumsFabian Kosmale2020-06-221-0/+57
| | | | | | | Task-number: QTBUG-83703 Pick-to: 5.15 Change-Id: I60c0811e47e0cd3b63b3ddfebb9bb6e9ab7f4f40 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* QV4Engine: Fix type conversionFabian Kosmale2020-05-191-0/+26
| | | | | | | | | | When converting JS arrays to sequence<T> type, check first for the existence of a QJSValue -> T converter function. This restores the behavior from Qt <= 5.14. Amends ecdb4ed275a0869dc668d73d774735575d43a0a3 Fixes: QTBUG-84104 Change-Id: I14c86ab37e34a3c8cff072574d4b90fe9e558535 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Allow using lowercase enum namesMaximilian Goldstein2020-05-191-11/+6
| | | | | | Fixes: QTBUG-83395 Change-Id: I98dd953497c6e28a1cfb5228095f05547e49b11d Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Add a default message to QML_UNCREATABLEMaximilian Goldstein2020-05-061-0/+12
| | | | | | | | | [ChangeLog][QML][Feature] Add a default message to QML_UNCREATABLE when proving an empty string as a reason Fixes: QTBUG-83842 Change-Id: Ifd2044fa6c56c3a382d451ec47d5f92a1ac16b81 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Fix build with latest QHash from qtbaseSimon Hausmann2020-04-141-7/+6
| | | | | | | std: :reverse_iterator is not supported anymore on QHash's iterators. Change-Id: I755ef69e1c2cc9427a77c49ae2ff85055345ff12 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2020-04-091-4/+21
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/qml/jsruntime/qv4executablecompilationunit.cpp src/qml/jsruntime/qv4executablecompilationunit_p.h src/qml/qml/qqmlobjectcreator.cpp src/qml/qml/qqmlpropertycachecreator_p.h src/qml/qml/qqmltypecompiler.cpp src/qml/qml/qqmltypedata.cpp tests/auto/qml/qmlformat/tst_qmlformat.cpp tools/qmllint/scopetree.cpp src/qml/qml/qqmlapplicationengine_p.h Adjusted tools/qmllint/findunqualified.cpp to use newer API Change-Id: Ibfb4678ca39d626d47527265e3c96e43313873d4
| * tst_qqmllanguage: Avoid use after freeUlf Hermann2020-03-261-5/+12
| | | | | | | | | | | | | | | | | | Apparently we're poking into the unit data during the last evaluate(). We need to keep it alive until then. Change-Id: I3a08766503a3508720b3ac154171e6fc8bd280d1 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * Check that QJSValue to set conversion worksFabian Kosmale2020-03-241-1/+7
| | | | | | | | | | | | | | | | | | | | Also, fix the check to actually test the correct capabilities by using the containerCapabilities function; testing _iteratorCapabilities only worked by chance so far. Task-number: QTBUG-82743 Change-Id: I64f20c6bf1e47737c7b927f79e1e78c1a1603741 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
| * tst_qqmllanguage: Don't leak malloc()'d unit dataUlf Hermann2020-03-241-2/+6
| | | | | | | | | | | | | | | | | | When intrusively playing with compilation units, we need to play by the rules and actually free them when we are done. Task-number: QTBUG-82768 Change-Id: I75ac0d01d48922a6a214df0c9d2345e27fb39bff Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Encapsulate QQmlContextDataUlf Hermann2020-03-231-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This class is not a private detail of QQmlContext. And it is incredibly hard to see who owns what in there. Let's add some civilization ... We enforce refcounting for QQmlContextData across the code base, with two exceptions: 1. QQmlContextPrivate may or may not own its QQmlContextData. 2. We may request a QQmlContextData owned by its parent QQmlContextData. For these two cases we keep flags in QQmlContextData and when the respective field (m_parent or m_publicContext) is reset, we release() once. Furthermore, QQmlContextData and QQmlGuardedContextData are moved to their own files, in order to de-spaghettify qqmlcontext_p.h and qqmlcontext.cpp. When the QQmlEngine is deleted, any QQmlComponents drop their object creators now, in order to release any context data held by those. Before, the context data would be deleted, but the object creators would retain the dangling pointer. [ChangeLog][QML][Important Behavior Changes] QQmlContext::baseUrl() does what the documentation says now: It prefers explicitly set baseUrls over compilation unit URLs. Only if no baseUrl is set, the CU's URL is returned. It used to prefer the CU's URL. Change-Id: Ieeb5dcb07b45d891526191321386d5443b8f5738 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2020-03-181-0/+25
|\| | | | | | | | | | | | | Conflicts: tools/qmllint/findunqualified.cpp Change-Id: I2593b5cc0db1d14e0c944aec4b88a80f46f5b0c1
| * Inline components: Abort if two IC's with same name existFabian Kosmale2020-03-161-0/+14
| | | | | | | | | | Change-Id: Ic52fa388711a76d729ae28678932f4a150da9583 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
| * Prefer Inline Components over any other imported nameFabian Kosmale2020-03-161-0/+11
| | | | | | | | | | | | | | | | | | | | | | After processing all other imports, there might be other imports both in front and behind of the inline component imports in the import list. To avoid having to search for them, we sort the list so that they are in front. Fixes: QTBUG-82302 Change-Id: I9f6deb03608b1ebd0cbe0eddd1a1e5d39837a783 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* | Adapt to the the new QMetaType changeOlivier Goffart2020-03-091-3/+3
| | | | | | | | | | | | Fixes: QTBUG-82453 Change-Id: I7e5682945a07c3af183becd3947a69568f139d16 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2020-03-091-11/+20
|\| | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/qml/compiler/qqmlirbuilder_p.h src/qml/qml/qqmlpropertycachecreator_p.h src/qmltyperegistrar/qmltypesclassdescription.cpp src/qmltyperegistrar/qmltypesclassdescription.h src/qmltyperegistrar/qmltypescreator.cpp src/quick/items/qquicktext_p.h src/quick/util/qquickvaluetypes_p.h Change-Id: Ic209741592e7b85820bf3845722023a190ebc1c5
| * Provide a way to statically register namespacesUlf Hermann2020-02-251-11/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, qmltyperegistrar would stumble over any QML_* macros in namespaces, as the namespaces could not be used as template arguments. However, namespaces are intended to be usable by QML as uncreatable "types". Now, qmltyperegistrar checks the namespace flag that moc records in the JSON output, and if that is given, registers an uncreatable metaobject instead of a type. Therefore you can use QML_ELEMENT and friends to register namespaces, just like you would register classes (except that they're implicitly uncreatable, of course). Task-number: QTBUG-68796 Change-Id: I186d7e9425471c32fb1a1f29c0c0b946afb2a9d2 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2020-02-211-0/+11
|\| | | | | | | | | | | | | Conflicts: tests/auto/quick/qquickmousearea/BLACKLIST Change-Id: I3de2c6377d57f5f9204d2cfc688d50a7a0b4150c
| * ResolvedList: attempt read from correct meta objectFabian Kosmale2020-02-191-0/+11
| | | | | | | | | | | | | | Fixes: QTBUG-82171 Change-Id: If14b10d703aa1b69cd697024ada2fae0453103d7 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Aleix Pol Gonzalez <aleixpol@kde.org>
* | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2020-02-171-0/+60
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/imports/qtqml/plugin.cpp src/qml/qml/qqml.h src/qml/qml/qqmlmetatype.cpp src/qml/qml/qqmlmetatype_p.h src/qml/qml/qqmltypeloader.cpp src/qml/types/qqmlbind.cpp src/quick/items/qquickitemsmodule.cpp tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp Change-Id: I52548938a582cb6510271ed4bc3a9aa0c3c11df6
| * QQmlCustomParser: Resolve import namespacesUlf Hermann2020-02-111-0/+30
| | | | | | | | | | | | | | | | | | Also, don't use plain QObject for testing registrations with extensions and foreign types. This interacts with other tests. Change-Id: I43df8a4e5b22def5a87f508130f1c7b4833ecfb6 Fixes: QTBUG-81970 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2020-02-061-0/+27
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf src/qml/types/qqmlbind.cpp src/quick/items/qquicklistview.cpp tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp Change-Id: Id6805c13256ad13d5651011e5dd09bba0ec02987
| | * Enable conversion from QJSValues containing arrays to container typesFabian Kosmale2020-01-311-0/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We started to convert containers to QJSValues, so that we could use them as JavaScript arrays. Unfortunately, this would then lead to a type missmatch when those same values where to be stored in a property of the container type. This commit fixes this by converting them back to the original type. Fixes: QTBUG-80916 Change-Id: I30a3b03e17c34b171d4a6881dfd7801c13e94d80 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>