aboutsummaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
...
* tst_qqmlenginecleanup::test_customModuleCleanup(): Add error outputFriedemann Kleint2021-01-041-2/+10
| | | | | | | | | The test fails for MinGW in the CI for unknown reasons. Output the error string on failure. Pick-to: 6.0 Change-Id: I96415c9d5753f9013be22b55884175fda6604130 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Fix compilation warning in lancelot testEirik Aavitsland2020-12-281-1/+1
| | | | | | | | Use new qChecksum overload Pick-to: 6.0 Change-Id: Ia2990e3491ee0c4029bba8e645109b03ac5001db Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Extend blacklisting of tst_QQmlImport::importPathOrder to MinGWTony Sarajärvi2020-12-281-0/+1
| | | | | | Task-number: QTBUG-88643 Change-Id: I51d346c127e3269eca49e387db578c16480a0565 Reviewed-by: Liang Qi <liang.qi@qt.io>
* Blacklist qqmlenginecleanup::test_customModuleCleanup() for MinGWFriedemann Kleint2020-12-231-0/+2
| | | | | | | | The test fails for MinGW in the CI for unknown reasons. Pick-to: 6.0 Change-Id: I20199704a9c810499551b8952375926902a75aa0 Reviewed-by: Tony Sarajärvi <tony.sarajarvi@qt.io>
* QJSValue: Add a toPrimitive() methodUlf Hermann2020-12-192-0/+48
| | | | | | | We need a way to easily get a primitive from a QJSValue. Change-Id: I91a55d92ffa4ba6139b1e3f2e9308800b7047563 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* QJSManagedValue: Throw an exception when trying to call a non-callableUlf Hermann2020-12-191-12/+29
| | | | | | | The JavaScript engine does this, so we should do the same here. Change-Id: I011a60bc2c013f19306c843da7a9c22dc80a39cb Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* QJSPrimitiveValue: Add a toVariant() method and ctor from QVariantUlf Hermann2020-12-181-0/+40
| | | | | | | | This is rather handy. Without it, we have to go through either QJSValue or QJSManagedValue, which causes much greater overhead. Change-Id: I40e2ecb6e2005f80c8f52b5e9a59028b3984eea4 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Add a QJSManagedValueUlf Hermann2020-12-188-0/+1906
| | | | | | | | | | | | | A QJSManagedValue is a view on a QJSValue which always knows the engine the value belongs to. This allows us to implement the JavaScript semantics of the various QJSValue methods in a much more rigorous way. [ChangeLog][QtQml] The new QJSManagedValue should be used instead of QJSValue for manipulating properties and prototypes of JavaScript values, as well as for calling JavaScript functions. Change-Id: I9d445ffcf68dfa72dba9bae0818e83c80665ad66 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* ecmascript tests: Also raise timeout when built with cmakeUlf Hermann2020-12-181-0/+4
| | | | | | | | | | pro2cmake did not convert the QTEST_FUNCTION_TIMEOUT environment variable. As a result, when the test runs for more than 300s, it gets killed by the watchdog. Pick-to: 6.0 Change-Id: I370d2c1b7a129c41d690d41e84f0a51810d37160 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Allow JavaScript primitive type transformations inline in C++Ulf Hermann2020-12-186-0/+249
| | | | | | | | | | We don't want to call into the engine just for adding two numbers. This implements the most common operators on primitive JavaScript values. More are to follow in the future. Change-Id: Id51a5af59a3af9fec78a2d8f293e59e6567e9204 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* QML: Fix proxy iterationFabian Kosmale2020-12-172-0/+39
| | | | | | | | | | | If the target of a proxy was extensible, we did not set the iteratorTarget to its correct value, and thus the ForInIteratorObject would not be usable. Pick-to: 6.0 5.15 Fixes: QTBUG-86323 Change-Id: Id1924ac4087bab38c006b8eba92b619b79d36b7a Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Windows/MinGW: Fix qqmltimer warnings floodFriedemann Kleint2020-12-171-19/+6
| | | | | | | | | | | | | | | | | | Replace the dubious function eventLoopWait() by QThread::msleep() since it causes a warnings flood when using MinGW: tst_qqmltimer::stopWhenEventPosted() QEventDispatcherWin32::wakeUp: Failed to post a message (Not enough quota is available to process this command.) tst_qqmltimer::stopWhenEventPosted() QEventDispatcherWin32::wakeUp: Failed to post a message (Not enough quota is available to process this command.) tst_qqmltimer::stopWhenEventPosted() QEventDispatcherWin32::wakeUp: Failed to post a message (Not enough quota is available to process this command.) tst_qqmltimer::stopWhenEventPosted() QEventDispatcherWin32::wakeUp: Failed to post a message (Not enough quota is available to process this command.) tst_qqmltimer::stopWhenEventPosted() QEventDispatcherWin32::wakeUp: Failed to post a message (Not enough quota is available to process this command.) tst_qqmltimer::stopWhenEventPosted() QEventDispatcherWin32::wakeUp: Failed to post a message (Not enough quota is available to process this command.) tst_qqmltimer::stopWhenEventPosted() QEventDispatcherWin32::wakeUp: Failed to post a message (Not enough quota is available to process this command.) tst_qqmltimer::stopWhenEventPosted() QEventDispatcherWin32::wakeUp: Failed to post a message (Not enough quota is available to process this command.) Pick-to: 6.0 Change-Id: I161d1d025f79560b21aaaeb510e4956eba54bdea Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* qqmltypeloader: Allow pluginless qmldir + declarative type registrationFabian Kosmale2020-12-155-0/+34
| | | | | | | | | | | | | | Assume an application which uses a QML singleton (so needs qmldir), and wants to use declarative type registration. This currently breaks because we find the qmldir, see that there is no plugin to load, and thus never search for registration functions. Requiring the creation of a plugin is rather pointless for an application which doesn't reuse the QML types; so instead enable this usecase to work. Note that qmldir + imperative registration did always work, as the imperative registration code did always run. Change-Id: Iac40020eb97d602d10eb8c4eecac5195ffeabe14 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* qmlformat: Remove import sortingMaximilian Goldstein2020-12-117-285/+24
| | | | | | | | | | | Remove import sorting due to the fact that sorting imports can break code. [ChangeLog][QML Tooling][qmlformat] Remove import sorting and the (now obsolete) -n parameter to disable it Fixes: QTBUG-89295 Pick-to: 6.0 Change-Id: I5ff13d0ae3c715db7645b412152aadb31811ce5a Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Refactor QQuickTextInput test to use QKeyCombinationVolker Hilsheimer2020-12-101-75/+35
| | | | | | | | | | Makes the code typesafe, simplifies the data structures, and fixes a compiler warning from implicit conversion from/to int. Pick-to: 6.0 Fixes: QTBUG-89356 Change-Id: I52d834811fa7325788fc71ea20f78b4afe3fdb86 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* qqmltypeloader: Fix plugin not loading on MinGWMaximilian Goldstein2020-12-101-1/+1
| | | | | | | | | | | Usually libraries get a lib prefix when using MinGW but plugins are expected to not have a prefix, causing the plugin to not load properly. This change fixes this by using the MODULE keyword. Pick-to: 6.0 Fixes: QTBUG-89187 Change-Id: Icd543015805a8157d59c20e86134421911930ea1 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Regenerate projects using pro2cmake one last timeAlexandru Croitor2020-12-1019-23/+202
| | | | | | | | | And fix up some incorrect qmake project files Pick-to: 6.0 Change-Id: Ia6d27ac68195635021fe7c4a5f06386a60f3f323 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Support namespaced QML_ELEMENTMaximilian Goldstein2020-12-102-1/+17
| | | | | | | Fixes: QTBUG-87266 Change-Id: Iad8c7765b339c5498f541702bbf7df64164f5358 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Fix IC properties in same fileFabian Kosmale2020-12-102-0/+12
| | | | | | | | | | | 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>
* Show a tableview even if the syncView has an empty modelAndy Shaw2020-12-091-0/+43
| | | | | | | | | | By showing the tableview, we can be sure that headerviews will be visible even in the syncView has an empty model. Fixes: QTBUG-87526 Change-Id: I68c8b119122a2d2f88c2afbeb2d6c71a83a3ce33 Pick-to: 5.15 6.0 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* qqmlistmodel: Fix crash when modelCache is nullMaximilian Goldstein2020-12-081-0/+22
| | | | | | | Fixes: QTBUG-89173 Pick-to: 5.15 Change-Id: Ife82518808fc5504ec42407e80ed3de89ed4adeb Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Blacklist testTransitionsWithImplicitFrom on openSUSE againLiang Qi2020-12-081-1/+1
| | | | | | | | This amends f87c4c7c2a0866662143fdbb3060e7d6ccaf337c. Task-number: QTBUG-89023 Change-Id: I4d3e03df6071b4fbaef3d1c60605dc68ca37aaad Reviewed-by: Tony Sarajärvi <tony.sarajarvi@qt.io>
* QJSValue: Add toVariant() overload with conversion behaviorUlf Hermann2020-12-071-14/+69
| | | | | | | | | | | | The QJSValue to QVariant conversion is traditionally messy. The recent addition of a special case for FunctionObject did not make that better. Rather, we now add a way of specifying that the conversion should be lossless, which avoids all conversions of JS objects and arrays. Amends commit 6b08c24297f39f3c67bc5c16f46198b33af66529. Change-Id: I6d4506b52d3175ed2f2984f8a26d560cf6311ab6 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Allow checking for and catching errors from QJSEngineUlf Hermann2020-12-071-0/+14
| | | | | | | | | As you can manually throw an error, you should be able to catch it again, too. Change-Id: I82475df1969a1fd76f4cf5fc0a8d921dfafaef89 Reviewed-by: Maximilian Goldstein <max.goldstein@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Allow the QML console methods to be called from outside JSUlf Hermann2020-12-072-0/+16
| | | | | | | There may not be a stack frame and that is OK. Change-Id: Iccac4db1530c9a4b316905a3a283d36674c146a8 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Pointer manual test: double up flickablesWithHandlers.qmlShawn Rutledge2020-12-054-13/+25
| | | | | | | | It was one Flickable before, with stuff in it; now it's two of the same, side-by-side, so as to test flicking the two in parallel on a touchscreen. Change-Id: Iec1ef935ee1c0a97bed49959b117b85d65fa84af Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* qv4qmlcontext: Fix bounded signal expressions when debuggingMaximilian Goldstein2020-12-041-3/+9
| | | | | | | Fixes: QTBUG-83599 Pick-to: 5.15 Change-Id: I8909f0b2d3eca909512b99c172c8dc5e93e48482 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* tst_qqmlecmascript: Avoid memory leak on failureFabian Kosmale2020-12-031-3/+2
| | | | | | Pick-to: 6.0 Change-Id: Icf31fbe473e5b0659cfe09d5bef8652c22a2b1ce Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* QML engine: Fix binding setupFabian Kosmale2020-12-034-0/+33
| | | | | | | | | | | We set QProperty bindings up in the wrong way: Parent components would overwrite their child component's binding. This patch reverses the order, fixing the bug. Task-number: QTBUG-87153 Pick-to: 6.0 Change-Id: I3e90d1d14a41a7c5c337745f1453484d360a3979 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* QML engine: Deprecate DefaultMethodFabian Kosmale2020-12-032-2/+6
| | | | | | | | | | | | | | | | | | | | | | Assigning objects to signal handlers can be convenient, as seen in the examples which use it together with ListView.onRemove. However, that convenience makes it hard to reason about what actually happens. Moreover, the only user of that functionality are the Animation classes, and the usage of DefaultMethod is not documented anywhere. [ChangeLog][QtQml] Assigning an object to a signal handler is deprecated. Instead, create the object, give it an id, and call the desired slot from the signal handler. For instance, instead of of ListView.onRemove: SequentialAnimation {...} use SequentialAnimation {id: removeAnimation; ...} ListView.onRemove: removeAnimation.start() A warning will be printed whenever an assignment of an object to a signal handler occurs. The warning can be controlled via the qt.qml.defaultmethod logging category. Change-Id: I001ddf4d7933871977f84a5e012d020fb043cc64 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* qmldom: DomItem and common APIFawzi Mohamed2020-12-035-0/+232
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit adds the main API of the Dom model: The idea of the Dom Model is to expose a simplified an uniform model, while keeping typed objects (as one is used in C++, and ideally using the modern C++ approach with containers, and avoiding manual memory management). In particular this approach avoids reducing everything to an untyped model. The central object in this is the DomItem, it is a value type that keeps a pointer to the actual element. A non empty DomItem always keeps some context (a canonicalPath) and one can explore its containers and its contents. Non existing or missing values simply translate to empty DomItems and one does not need to check at each step for invalid things. See the DomItem documentation for more information. The as() ad ownerAs() templates let one cast back the DomItem to the underlying elements. To expose an element with minimal effort one has to mainly implement the method iterateDirectSubpaths(), and iterate through all elements contained in that element (see the documentation of DomBase for more details). Containers, simple data and references can be wrapped in DomItem elements just when accessed, so the underlying C++ object can use the usual containers/datatypes. A good model should not just be easy to browse, reference and extend with new elements, it should also have a clear parallelizazion/ multithreading policy. This is less relevant for a single pass compiler, but for is relevannt for a code model. The fact that the current code model now somehow works only from the GUI thread show the importance of a clear policy when multiple people can contribute. In the Dom model there is the following idea: - During build time pointers to the elements can change (MutableDomItem should be used) - Access to sub elements normally has no locks, they should be either accessed by a single thread or immutable. - OwningItem are the unit of multithread safe updates, the have a mutex and protect the parts that need protection - A DomEnvironment can refer to a parent Environment, perform several changes (in a separate thread), and commit them all at once (in a sparate commit). This commit contains all the main API, and tests for it. The bulk of the concrete element will be in followup patches. Task-number: QTBUG-74840 Change-Id: I9e14e8560e3b4aa3268a733fed37e9090c18e3ab Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* QQmlPropertyCache: Remove unused copyAndAppend overloadFabian Kosmale2020-12-031-3/+3
| | | | | | | Original-patch-by: Lars Knoll <lars.knoll@qt.io> Task-number: QTBUG-88765 Change-Id: I85dad61a1c3ade29137be9870ce8af726be81a28 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Use QMetaType instead of metatype-id, take 2Fabian Kosmale2020-12-031-3/+3
| | | | | | | | | This time, the ValueTypeFactory gets converted. As a consequence, many callers get touched again. Task-number: QTBUG-88766 Change-Id: I3a8b7d5cfeb7fac85daf1702febba205971d4256 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Mark url as builtin typeUlf Hermann2020-12-022-0/+20
| | | | | | | | | Also, allow conversion from UrlObject and String. We allow the string conversion because we treat string and url as interchangeable in various places. Change-Id: Ib229c6d190e1c5d849ea18798925965b8dbeef7e Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Un-blacklist tst_TouchMouse::hoverEnabledShawn Rutledge2020-12-011-3/+0
| | | | | | | Task-number: QTBUG-86729 Task-number: QTBUG-40856 Change-Id: I6936833236b584d9f91cca1583434fa9982ec569 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* qmldom: Add Path and ErrorMessage to DomFawzi Mohamed2020-12-018-0/+409
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds more groundwork for the Dom library. QQml::Dom::Path represents a path in the Dom model. It goes from an element of the Dom model (DomItem) to another. It can be created either from a string, with the path static functions or by modifying an existing path Path qmlFilePath = Path::fromString(u"$env.qmlFilesByPath[\"/path/to/file\"]"); Path imports = qmlFilePath.subField(u"imports") Path currentComponentImports = Path::current(u"component") .subField(u"imports"); This is a way to refer to elements in the Dom models that is not dependent from the source location, and thus can be used also be used in visual tools. A Path is quite stable toward reallocations or changes in the Dom model, and accessing it is safe even when "dangling", thus it is a good long term reference to an element in the Dom model. In this commit the element of the Dom Model (DomItem) is represented just by a stub object, it will be added in a subsequent commit. This commit also introduces the ErrorMessage object. ErrorMessage is an object used to represent error, warning and other messages in the Dom model. Errors are grouped by tags (ErrorGroups). ErrorMessages might have a unique identifying string (using a number in a base library that cannot have a list of all possible errors does not work well. ErrorMessages should be localized and *can* be pre-registered, but do not have to be. ErrorMessages can be associated with a QQml::Dom::Path, a file and a Sourcelocation. The path (if present) might allows one to show errors also in more visual tools. Task-number: QTBUG-74840 Change-Id: I77fb4b78e15ba3674d74937106d40dba4076cedc Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Blacklist testTransitionsWithImplicitFrom on openSUSELiang Qi2020-12-011-0/+1
| | | | | | Task-number: QTBUG-89023 Change-Id: I620d47ef6f519d59436fe096ccaa78216b23d98a Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Blacklist testTransitionsWithImplicitFrom on Ubuntu 20.04Fabian Kosmale2020-12-011-0/+3
| | | | | | Task-number: QTBUG-89023 Change-Id: I76b3920de3cd933f573f1a800fe800a8d5413798 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Adjust toolsupport test to qtbase changeFabian Kosmale2020-12-011-1/+1
| | | | | | | Change-Id: Id12b484634d66d3f46c7905e233beb6cd5897979 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> (cherry picked from commit 468888cf08c181366df94627522b9e282d364b81) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Relax the timings on the new testTransitionWithImplicitFrom testRobert Griebl2020-11-301-6/+6
| | | | | Change-Id: Ie9fae8a7edb07c6df499a06fdc9d539e114b789e Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Allow parent to filter out-of-bounds synth-mouse for grabbing handlerShawn Rutledge2020-11-305-40/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Consider Flickable { Text { TapHandler { gesturePolicy: TapHandler.ReleaseWithinBounds } } } On press, TapHandler gets the exclusive grab. Now drag vertically. The Text is short in stature, so your finger soon strays out of bounds of the Text, likely before you have dragged past the drag threshold. In this case, we want Flickable to continue to filter the move events because of the fact that TapHandler is the grabber. If it was a MouseArea instead of a TapHandler, it already worked that way; so this makes behavior of handlers more consistent with that. More specifically: QQuickPointerTouchEvent::touchEventForItem() now generates a touch event even if the touchpoint is not within the bounds of the given item, but is grabbed by one of that item's handlers. Until now, we had that exception only if it was grabbed by the item itself. tst_FlickableInterop::touchAndDragHandlerOnFlickable now always drags the delegate at index 2 (the third one) from its upper-right corner, upwards and to the left. The first drag goes outside the delegate's bounds, but the Flickable/ListView/TableView filters and takes over anyway (on the next drag), to prove that it is correctly depending on the grab that the TapHandler (or DragHandler) took on press. Pick-to: 5.15 Pick-to: 6.0 Fixes: QTBUG-75223 Change-Id: Ie4e22c87be0af9aa3ff0146067b7705949b15c40 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Replace some more foreach with ranged forVolker Hilsheimer2020-11-301-1/+1
| | | | | | | | Fix coding style as a drive-by. No need for qAsConst as QVarLenghArray is not an implicitly shared class. Change-Id: I8a9ec3c76f8f6459a1605b02f4682ab3ce091d1a Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Speed up tst_FlickableInterop::touchAndDragHandlerOnFlickableShawn Rutledge2020-11-296-0/+54
| | | | | Change-Id: I9d01dc00c68979aa9288820fddaaa7b0208bec9b Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Fix Animators requiring an explicit from valueRobert Griebl2020-11-284-4/+142
| | | | | | | | | | | | | | | | | | | Contrary to the documentation, Animators have always had the requirement that an explicit from value was specified, which isn't very convenient e.g. in Transitions. This patch was tested against a (quite big) real world customer application using Qt 5.12 and Qt 5.15. Also a new unit test was added to test this feature. I couldn't find another way to access the actual AnimatorJob besides querying the window's AnimatorController, so I had to add an auto-test only export on that class. Task-number: QTBUG-66475 Pick-to: 6.0 6.0.0 Change-Id: Icc2a220a13f587d69594a4b2ed345abf0438e29e Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Modernize the Animators auto test buildRobert Griebl2020-11-282-10/+12
| | | | | | | | | The pro file was adapted to the state of the qquickanimations one and the cmake part regenerated. Pick-to: 6.0 6.0.0 Change-Id: I5dbc2c985a84019e42c974468db4b8dc0fa3d210 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Correct height properties for QQuickText with reducing lineHeightReinhard Raschbauer2020-11-261-2/+16
| | | | | | | | | | | | | | | If the property lineHeight is used to reduce the line height, either by setting a proportional factor smaller 1.0 or a pixel size smaller than the font size, the offset calculated in lineHeightOffset is not taken in to account to calculate the height properties. But the offset is used to position the the rendered text. In the current implementation the property lineHeight does not have an effect on single line texts. This change takes that into account and adds lineHeightOffset to all height properties. Fixes: QTBUG-88229 Change-Id: Iab7d9b39a4c7876c7c95e43be6846623c10b0607 Reviewed-by: Shawn Rutledge <shawn.rutledge@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>
* QJSValue: On toVariant() don't try to unwrap function objectsUlf Hermann2020-11-261-0/+15
| | | | | | | | We cannot retrieve anything sensible from those. Therefore, just wrap the QJSValue into a variant. Change-Id: I8acd9fb59a8859c8b2c389efb7934b597a2e479f Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Improve stability of animated lancelot test sceneEirik Aavitsland2020-11-261-1/+1
| | | | | | | | | The lancelot test has shown sensitivity to timing on some platforms; this change improves stability there. Pick-to: 6.0 Change-Id: I9c8519423635fc22724d96e0a09bcdd1dd0a0102 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* Allow retrieving an imported script from a QML contextUlf Hermann2020-11-251-0/+11
| | | | | | | | | This way you can access the properties or call functions provided by the imported script from C++. Previously there was no way to get to them via public API from outside of QML/JS. Change-Id: Ia7813ef6fbec81898c302809118c31f9dcf0f95e Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>