aboutsummaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* QQuickWindow: Consider z-order of children when delivering pointer eventsYoungSun Park2020-09-154-0/+164
| | | | | | | | | | | | | When creating a target item list for handling pointer events, put children after the parent item if they have negative z-order value. This fixes an issue where an item does not receive a pointer event if there is a child item that accepts the event even when that child item is shown under the parent item as per the stacking order. Fixes: QTBUG-83114 Pick-to: 5.15 Change-Id: I711faa22516f5c2396b1138dc507bcaa4ba22241 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Fix xmlhttprequest autotest after HTTP/2 changes in qtbaseLars Knoll2020-09-1531-42/+86
| | | | | | Change-Id: I32029f4f70da909b0b0d088899ac0c3138454792 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Blacklist a test that started failing after even changes in qtbaseLars Knoll2020-09-151-0/+1
| | | | | | | | | | This test probably started failing after the pointer event refactoring in qtbase. Blacklist for now, so we can update dependencies in declarative. Change-Id: I72634ed67efe7d23f64bf0c96889129081f4a016 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Adapt to changes in qtbaseUlf Hermann2020-09-153-0/+4
| | | | | | | | | 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>
* Skip tst_TouchMouse::buttonOnDelayedPressFlickable on macOSUlf Hermann2020-09-151-0/+4
| | | | | Change-Id: I1b1b5d00ae8bef77ad63f8df5ec893b045e21923 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Add QQuickHandlerPoint::device propertyShawn Rutledge2020-09-041-1/+2
| | | | | | | | | | | | The HandlerPoint type is used as the memory of an event or TouchPoint that a handler has already handled. Maybe in the future we'll store a copy of a QEventPoint instead. But for now, it's nice to have the device pointer available for binding properties, instead of only in QQuickEventPoint, which was only exposed in signals like TapHandler.tapped(). Change-Id: I314fc8c76311dc2620f1d97d4cadacf2e9869274 Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* qmlformat: Fix multiline comment attachmentMaximilian Goldstein2020-09-043-0/+24
| | | | | | Pick-to: 5.15 Change-Id: I3ba8a4cd683df3309dd6df31b1fd426a0875f8fa Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Adjust to qtbase changesFabian Kosmale2020-09-046-20/+28
| | | | | | | | | | | | | - isQProperty has been renamed to bindable - QNotifiedProperty is no more - Bindable properties have a function to obtain the QBindable; store that information in the qmltypes files. Task-number: QTBUG-86434 Task-number: QTBUG-86435 Change-Id: I2ba593af1e197d04d2c30cfb9e6904a3d2059e4b Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Remove use of deprecated High-DPI application attributesTor Arne Vestbø2020-09-028-9/+0
| | | | | Change-Id: Ibfb50fdcbb51ba93d6e5d11f9e8ce0e7b3bfde79 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* QJSEngine: provide a way to check if an exception was thrownFabian Kosmale2020-09-021-0/+21
| | | | | | | | | | | [ChangeLog][QML][QJSEngine] QJSEngine::evaluate gained an optional stackTrace parameter. It can be used to check if the returned QJSValue comes from an uncaught exception, and to retrieve the backtrace of the execution leading to the error. Fixes: QTBUG-54925 Change-Id: I2b5ada1f0c33c335b4b9d0d1268e70ca63a1fad1 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* tst_qmlformat: refactor testsMaximilian Goldstein2020-09-021-86/+44
| | | | | Change-Id: I2090b78417caf43b6dfb4106802988742a5a119e Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Tests: pass QDate and QTime by value rather than const referenceEdward Welbourne2020-09-014-7/+7
| | | | | | | They've value types, packaging qint64 and int respectively. Change-Id: Ia9a96748f9423139f41df720ce987ce96435beca Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Remove deprecated QQmlListProperty constructorFabian Kosmale2020-08-317-17/+12
| | | | | | | | | | [ChangeLog][QML][QQmlListProperty] Removed deprecated QQmlListProperty constructor taking a reference. Use the overload taking a pointer instead. Change-Id: I8942026d1bb1c88065659d96d648a4b256d7d427 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Use OpenType font weightsJonas Karlsson2020-08-281-1/+1
| | | | | | Task-number: QTBUG-42248 Change-Id: Ib26d4945307b630b054e270b3213e1c9ad0d5357 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Fix QtQml after QMetaType/QVariant changes in Qt CoreLars Knoll2020-08-282-2/+1
| | | | | Change-Id: I2a983cf8188e88d80d3b7726208d821427eb8f3c Reviewed-by: Fabian Kosmale <fabian.kosmale@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>
* QQuickCanvas: Skip failing test for nowFabian Kosmale2020-08-281-0/+2
| | | | | | | | | | font::toString now outputs more information, so the test would need to be adjusted. However,we priorize geting the dependency update in over fixing the test for now. Task-number: QTBUG-86304 Change-Id: I44182b6115752a4cfb177e07b862f9e018613edf Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Remove deprecated registration functionsFabian Kosmale2020-08-272-2/+2
| | | | | | | | | | | | | | [ChangeLog][QML] Removed qmlRegisterType overload taking no arguments, use qmlRegisterAnonymousType instead, or switch to declarative type registration with QML_ANONYMOUS. Removed overloads of qmlRegisterExtendedType and qmlRegisterInterface which did not take a version argument. Use the overloads providing a version, or swtich to declarative type registration with QML_EXTENDED and QML_INTERFACE. Change-Id: Iadcc53d7ebe5cae40856b69efc33293fd0208c1f Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Follow layoutMirroring in Layout marginsDavid Edmundson2020-08-261-0/+41
| | | | | | | | | | | | | | | If a layout is laid out left to right using the layoutDirection property, we want left Margins on the left, and rightMargin still on the right However, if a layout is mirrored, not only should the layout direction change but also the left margin should now be on the right and vice versa. Task-number: QTBUG-62989 Pick-to: 5.15 Change-Id: Iaae4bc436fd1eb7f1947869563ac325f3d6b79bb Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Remove deprecated function QJSValue::engineFabian Kosmale2020-08-262-83/+0
| | | | | | | | | [ChangeLog][QJSValue] The deprecated function QJSValue::engine() has been removed. Change-Id: I2be35379e0a9e51f5371a2c98b955282955b7147 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* tst_qqmlqt: Avoid warning in testFabian Kosmale2020-08-263-13/+10
| | | | | | | | | | | | | The test files still contained a property to test functionality which was in the end discarded; thus passing the wrong number of arguments to functions and causing a warning. We simply remove them as they are not needed anywhere. Amends 19850f129881a04c36c51859454bf71ed688f28a As a drive by, replace the obsolete variant with var. Change-Id: If0b3dcd6d8a339a569c39ce304b68fecd3d72779 Reviewed-by: Maximilian Goldstein <max.goldstein@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Unify "variant" and "var" properties in QMLFabian Kosmale2020-08-2412-488/+5
| | | | | | | | | | | | | | | | | | | | 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>
* Remove qml statemachine plugin from qtdeclarativeKarsten Heimrich2020-08-2324-1186/+0
| | | | | | Task-number: QTBUG-80316 Change-Id: I584b699a1eec88117f343870bd2cd01075da64f7 Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
* Adapt to qtbase changesFabian Kosmale2020-08-231-7/+7
| | | | | | | | | | | The internal QVariant constructor taking a QMetaTypeId has been removed. Thus, construct QMetaTypes where necessary from the id, or avoid a QMetaType -> ID -> QMetaType roundtrip where we already have a metatype. Also fix a few missing includse that were previously transitively included. Change-Id: I56ce92281d616108a4ff80fe5052b919d1282357 Reviewed-by: Fawzi Mohamed <fawzi.mohamed@qt.io>
* tst_qqmltypeloader: Adapt to network redirection change in qtbaseFabian Kosmale2020-08-231-0/+15
| | | | | | | | | | | d12afeff4097dd78f1311511e0c8f74e1a810d47 in qtbase changed the default from manual to NoLessSafeRedirectPolicy. The redirect test however relies on us being able to handle redirections manually. Restore the old behavior in the test by installing a QNetworkManagerAccessFactory which returns QNAMs with the old behavior. Change-Id: I69ccf39189e79dbea6b1734e99c56e36858af208 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* tst_qquickaccessible: Adapt to QVariant::isNull changeFabian Kosmale2020-08-231-2/+4
| | | | | | | | | isNull does not cascade anymore to its contained type's isNull function. Thus, adjust the test to check string emptiness in a saner way. Change-Id: Ia7376010e8a13dcaa5ddc9328525c0771d032ebc Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Add override behaviors to QQmlListPropertyUnai IRIGOYEN2020-08-227-1/+90
| | | | | | | | | | | | [ChangeLog][QQmlListProperty] When overriding a QQmlListProperty in a derived QML type, the default behavior is to append the derived class elements to the base class ones. This introduces a macro to allow replacing the base type contents either always or if the property is not the default one. Fixes: QTBUG-77529 Change-Id: Ib1abbf52e341c043344c347c612928b47856fb3e Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* QQuickLoader: make sure the status property change properlyWang Chuan2020-08-221-0/+3
| | | | | | | | | | | | | When we call [setSource] in qml, we will try to convert a qml value to a string which indicate the url we want to load. However, if this value is undefined, it will convert to a string with content "undefined", and then cause loading error. More worse, if there is a qml file named "undefined", it will be loaded to the Loader. Pick-to: 5.15 Fixes: QTBUG-85938 Change-Id: I5b192ba84aa29532e547349bbf37d413c107d8e4 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* QQmlObjectCreator: fix member func call with this == nullptrEvgeniy A. Dushistov2020-08-222-0/+20
| | | | | | | | | | | | | | | | 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>
* QQuickLoader: make sure the status property change properlyWang Chuan2020-08-222-0/+32
| | | | | | | | | | | | Since the invocation of [setSource] in qml will clear the old source url first, it is hard to decide whether we have changed the source url, especially when we call [setSource] with an empty string, and the loader's status won't change properly. Pick-to: 5.15 Fixes: QTBUG-85938 Change-Id: If61a33c790a4fd6562611c4c50756bc5e213363a Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* qmllint: fix import java scripts from moduleEvgeniy A. Dushistov2020-08-225-0/+25
| | | | | | Fixes: QTBUG-86183 Change-Id: I4809cb5a408eb4e668f802cf0d7b7a872d1ed4b7 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* tst_qqmlenginedebugservice: Adapt to QVariant comparison changeFabian Kosmale2020-08-221-7/+13
| | | | | | | | | | | QVariant::operator== won't do the needed conversions anymore, so we have to apply them manually. In contrast to operator==, convert is not const, so we have to apply it to a copy of the variant. Change-Id: Ic55c2791038dbc9e45dcdcb163828cb7ca93a29e Reviewed-by: Fawzi Mohamed <fawzi.mohamed@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* qmlformat: fix handling of "if else" inside "if" in "if else"Evgeniy A. Dushistov2020-08-202-1/+16
| | | | | | Fixes: QTBUG-86060 Change-Id: I7a191c451793bf4e1f6a2bd02ceb36b5957136c2 Reviewed-by: Ulf Hermann <ulf.hermann@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>
* tst_qjsengine: Fix comparison related failuresFawzi Mohamed2020-08-201-3/+8
| | | | | | | | | | | | The new QMetaType/QVariant comparison is strict, so that several comparisons now fail. so we try to convert before comparing. Remaining ugliness: QString -> QChar conversion not provided, so change input to string QVariant(static_cast<QObject *>(x)) != QVariant(x) if x is a subclass of QObject. Change-Id: Ie0b7ba40d36a5e935976d1947d95295c48cd0c23 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Fix tst_qqmlproperty failures due to stricter QVariantMaximilian Goldstein2020-08-201-3/+3
| | | | | Change-Id: Ie1f0ee6ae076e50053a19b19e48fe6e996696a69 Reviewed-by: Fawzi Mohamed <fawzi.mohamed@qt.io>
* qmllint: handle signals defined in qml fileEvgeniy A. Dushistov2020-08-192-0/+14
| | | | | | | | | FindWarningVisitor for signal add property "signal" + "Changed", so it was impossible find "singal" and "onSingal" names. Fixes: QTBUG-83793 Change-Id: I5a62211f413f543fdb6bf00e0ab921561d7a9643 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* tst_qqmlcomponent: Fix test failureFawzi Mohamed2020-08-171-1/+1
| | | | | | | | | | | | | | Qml point type can be set with both QPoint and QPointF, but comes back always as QPointF (or rather QVariantQ(QPointF)). The new comparison does not perform conversions, so the test which did set comp.mypoint = mypoint and then compared comp.property("mypoint") == mypoint would fail, so we use use an explicit conversion when comparing. Change-Id: Ibf9dc8c5de7dd416939bd74966e970d939436550 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Disable redundant no-text run in lancelot testEirik Aavitsland2020-08-171-1/+5
| | | | | | | | The no-text test case is normally not meaningful, so hide it behind a #define flag Change-Id: I02b511d5e1114eb5d6cd13d111e15a2044594bdd Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* Regenerate scenegraph autotest shaderLaszlo Agocs2020-08-152-0/+1
| | | | | Change-Id: Iacfa3ae3284f47c5501fc443c764d493334a608d Reviewed-by: Fawzi Mohamed <fawzi.mohamed@qt.io>
* Do not set QQmlPropertyBinding until we reach finalizeFabian Kosmale2020-08-124-3/+47
| | | | | | | | | | | If we install the binding eagerly, context properties cannot be resolved yet, as the context object has not been created so far. This causes issues with a QNotifiedProperty using a callback which accesses the current value, and thus forcing the binding evaluation while the object creation is still ongoing. Change-Id: I3bf3def04cd044371cb757a1854a3224a9c669b8 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* TestHTTPServer: Remove dead codeUlf Hermann2020-08-121-4/+0
| | | | | Change-Id: I97ae89e93ee65d55c2d483495da47acac5d54c2b Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* tst_qqmlxmlhttprequest: Ignore HTTP encoding headersUlf Hermann2020-08-1220-19/+19
| | | | | | | | | Apparently QtNetwork changed the default order of encodings. We don't really care about this anyway, though. Change-Id: I72e5f0783e5e88ddb9fe031f72ff5f6c760256fa Reviewed-by: Maximilian Goldstein <max.goldstein@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* TestHTTPServer: Allow matching of header prefixes onlyUlf Hermann2020-08-122-5/+17
| | | | | | | | | Sometimes we're not interested in the exact specifics of an HTTP header, but we still want to accept it. Change-Id: Id580f4a17c92afc3c7b6737633858aa5e385019a Reviewed-by: Maximilian Goldstein <max.goldstein@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Fix tst_qqmlmoduleplugin on macFawzi Mohamed2020-08-111-1/+8
| | | | | | | | | * warn and assume case unsensitivity if pathconf fails (on FAT32 for example) * adjust library name for debug compilation Change-Id: I2ec45d5da35974b61c6e316738a59f2962532aed Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Update lancelot test: NO_RHI and DirectGL path are goneEirik Aavitsland2020-08-101-8/+5
| | | | | Change-Id: I93fa9dcf4879d30a260d0b28ac599a1c61c225f7 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* CMake: Prepare for removal of Threads::Threads special casesAlexandru Croitor2020-08-062-2/+12
| | | | | | | | | The Threads::Threads target will automatically be propagated via the Qt6::Platform target. Task-number: QTBUG-85877 Change-Id: I33aec0b393be82467970eefd69f31feda3ac996e Reviewed-by: Cristian Adam <cristian.adam@qt.io>
* Improve lancelot test case for recursive ShaderEffectSourceEirik Aavitsland2020-07-312-29/+1
| | | | | | | | | | | | | | Choose a rotation degree which makes it more obviously visible if it gets applied multiple times, and which avoids the risk of an accidental match by rotating a full round. As a drive-by, remove the second recursive test case, as it does not test anything other than the first. Change-Id: I019743cd8a85763c4704019f7fb7b24c3451308c Pick-to: 5.15 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Blacklist uniformanimator_stall.qmlJonas Karlsson2020-07-301-0/+4
| | | | | | | | Depending on the system load etc. it can vary slightly at which frame the animation gets frozen. Change-Id: I774f56f5c7e4e0422d93fa09e8b334f4eb4f8aeb Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* Update tst_DragHandler::mouseDragThreshold zero-threshold test caseShawn Rutledge2020-07-281-7/+8
| | | | | | | | | | | | | | | | | After qtbase b50daef9771d8829fc7f808898cbe051a5464b79, a mouse move event that does not contain a mouse location different than the last known location is no longer delivered. It's intended to be OK to set DragHandler.threshold to 0, and this test was checking functionality in that case; but we now need to move the mouse at least one pixel to test it. Then, the drag threshold is immediately exceeded, the drag begins, translation starts to occur, etc. Amends ab5df626bef9365089ce716ce476bccae1d0a04b Task-number: QTBUG-85431 Change-Id: I89c0dc13ed06fbf1443f42fa5b63713da56ecf6d Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>