aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto
Commit message (Collapse)AuthorAgeFilesLines
* Don't overwrite states if role is assigned after a stateJan Arve Sæther2019-05-092-1/+36
| | | | | | | | | We therefore need to keep track of which states have been explicitly set or not in order to know which ones should get initialized with their defaults. Change-Id: I49fdae82288f04ea4f50d45735a93434ac02abec Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* Accessibility: Make sure StaticText is marked read-onlyFrederik Gladhorn2019-05-072-3/+61
| | | | | | | | | | Test more of the text properties. This is still very incomplete, but a small step forward. Also make sure that editable text reports the editable state. Fixes: QTBUG-75002 Change-Id: I9e43c980d8fa91671acb4e40e5d9162854884ee7 Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* Yarr: Reject quantifiers larger than 16MUlf Hermann2019-04-301-0/+11
| | | | | | | | | Nobody needs those and we run into integer overflows later on if we accept them. Fixes: QTBUG-74048 Change-Id: Ib8ccd05e4bd6f662c38fbe95bf1350f81982e1b8 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Skip block context within call contexts when searching for parametersUlf Hermann2019-04-291-0/+27
| | | | | | | | | | | Only the call context contains the signal parameters. However, there can be any number of nested block contexts in a function. This manifests itself when the function needs an execution context. The simplest way to trigger this is attaching a debugger. Fixes: QTBUG-75393 Change-Id: Iabdc06a9fe7bf88204525d6940b626575fee1579 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Allow creation of variants from non-singleton QQmlTypeWrappersUlf Hermann2019-04-262-0/+30
| | | | | | | | I don't see any reason why this should be prohibited. Change-Id: I4a54c55eff4b9151691d0587627efad4a06485f1 Fixes: QTBUG-74815 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Blacklist tst_qquickwindow::openglContextCreatedSignal on opensuseUlf Hermann2019-04-261-0/+3
| | | | | | Task-number: QTBUG-75454 Change-Id: I46453da06553de7be721b921b085a015741ada5f Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Blacklist tst_qquickwidget::tabKey() on opensuseUlf Hermann2019-04-261-0/+3
| | | | | | Task-number: QTBUG-75171 Change-Id: I68ef40cd9fe47d26cd4c83064367c2a3272efe0f Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Use resource path for test data on Android and iOSMitch Curtis2019-04-242-3/+10
| | | | | | | | | | | | | | | | qtbase/mkspecs/features/testcase.prf already generates a .qrc file containing the files in TESTDATA, so instead of trying to copy QML files to the device, we can just use the existing resources. This fixes the following failure, which affects all tests using util.pri: I/QTestLib( 7143): FAIL! : tst_qquickapplication::initTestCase() 'QDir::setCurrent(m_directory)' returned FALSE. (Could not chdir to :/) Change-Id: Iddfd227c402dbe80aeaa9742a52690d3d8049e46 Reviewed-by: Andy Shaw <andy.shaw@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* QML: Remove static attchedPropertyIds mapUlf Hermann2019-04-181-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | If the same object is available under two different names it should still have the same attached properties no matter which name you use. This was achieved by having a static map of metaobjects to attached property IDs that would always hold the first attached property ID registered for a given metaobject. This attached property ID was then used as key in the map of attached properties for the actual objects. The obvious downside to that is that we need a global static which gives us thread safety and static initialization (and destruction) problems. It turns out, all the attached properties are created by attached properties functions, registered by the user. Those functions only get the object to be amended as parameter. Therefore, no attached properties function can be registered for multiple attached properties on the same object as it wouldn't know which one to create for a given call. Thus, the whole ID dance is unnecessary as we can as well index the attached property objects by the function that created them. This nicely avoids creating two attached property objects for the same object and function and still makes the global static unnecessary. Fixes: QTBUG-75176 Change-Id: Ie8d53ef0a6f41c9b3d6b9d611cde1603a557901c Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
* Don't crash when accessing invalid properties through QObjectWrapperUlf Hermann2019-04-182-0/+30
| | | | | | Change-Id: I613bf5dc685bb4235262b429d8f7318ea144fb9d Fixes: QTBUG-75203 Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
* Blacklist tst_qquickapplication::active() on opensuseUlf Hermann2019-04-171-0/+3
| | | | | | Task-number: QTBUG-75215 Change-Id: Ia567352a21e9a333df67ad8c87c5732d439af546 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Blacklist ...::touchDragFlickableBehindButton() on mingwUlf Hermann2019-04-171-0/+2
| | | | | | Task-number: QTBUG-75224 Change-Id: Ic7daefa2f0422a0b1cfa112fd5412cafffb2a9ed Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Blacklist tst_QQuickListView::contentHeightWithDelayRemove on macos10.12Ulf Hermann2019-04-161-0/+3
| | | | | | Task-number: QTBUG-75202 Change-Id: I852439cd4d3b7106d018757e6c11c7d455fc9692 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Test whether the JIT is enabled on architectures/OSes as intendedMartin Storsjö2019-04-161-0/+22
| | | | | Change-Id: Ifdba6f08545e07b04cc7d9ace48ad0599c41229c Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* QML: Allow fetchOrCreateTypeForUrl to report errors without qFatalErik Verbruggen2019-04-164-1/+6
| | | | | | | | Because qFatal will abort() the program. Task-number: QTBUG-71116 Change-Id: Ifd6be996cfbd6fff8e75ad2b26682c34f837ac88 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* QML: Check for (valid) compilation units while hashingErik Verbruggen2019-04-163-0/+6
| | | | | | | | | When an error occurred while creating a compilation unit, the pointer might be set to null. Subsequent use in hashing should check for this, and not use a nullptr. Change-Id: I62650917a740c9c1be29608285670153bed8703c Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Fix string replacement with invalid capturesUlf Hermann2019-04-151-0/+28
| | | | | | | | | | | | If we have a theoretically valid capture reference that just didn't capture anything in this match, we don't want to treat it as literal. Only capture references that clearly are outside the range of things we can possibly capture with this expression should be treated as literal strings. Change-Id: Iab0bf329d11a6b9e172aa662f11751d86cfc26a6 Fixes: QTBUG-75121 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Quick fix for not working input handling for eglfsMichal Klocek2019-04-151-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On eglfs platform input events are driven by libinput and do not have window information as such. They are simply delivered based on QGuiApplication::topLevelAt window selection. In case of WebEnigne, QQuickWindow is returned as top level window. QQuickWidget uses this QQuickWindow as an offscreen window, however since 561b932 we fake 'visible' and 'visibility' values so windows api in qml can use those properties. This ends up with broken event delivery on eglfs, since window is offscreen and therefore not really visible. Make a minimalistic change to fix the issue, without braking QTBUG-49054, which requires 'visibility' to have fake values, and 'visible' will keep window as not visible for event delivery system. Fix encapsulation of setVisible(), prevent accidental window creation when setVsiible() called from qml via binding. The proper fix would require for example adding some new flag to underlying offscreen window, which could be used by event window selection mechanism or rework of qquickwidget offscreen window parameters expose to qml. Task-number: QTBUG-65761 Task-number: QTBUG-49054 Change-Id: I2a307ee5613771adf6d31f1c3cc4b4a25d7620df Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Don't create value types for QImage and QPixmapUlf Hermann2019-04-121-0/+23
| | | | | | | | Those are "scarce" resources which need to be kept as QVariant. Fixes: QTBUG-74751 Change-Id: I28381e2a754ed4bbf4e409dc275f6288b64416cc Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Extend blacklisting of qquickmultiponttoucharea to SLESTony Sarajärvi2019-04-111-0/+2
| | | | | | Task-number: QTBUG-59960 Change-Id: I6684b1a63425233dbee1d37acfe3e785cb76a597 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Detect and reject cyclic aliasesUlf Hermann2019-04-093-0/+7
| | | | | | | | Previously those would result in infinite recursion. Fixes: QTBUG-74867 Change-Id: I6c0043b43e72fe7bc3a2a139ca600af2d5bca5ad Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Avoid INT_MIN % -1 and INT_MIN / -1Ulf Hermann2019-04-081-0/+17
| | | | | | | | | Those throw arithmetic exceptions as the result doesn't fit into an integer. Fixes: QTBUG-75030 Change-Id: Ibd978848f42cf1c9da1e4af2dc9d7da123ef8f5a Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* If DragHandler is dragged within its margin, don't jumpShawn Rutledge2019-04-052-0/+69
| | | | | | | | | | | | | | | | | Not being pressed inside the target is a necessary but not sufficient reason to reset m_pressTargetPos to the center of the target. The intention was rather to make the target jump into position when the parent was a different item: e.g. if a Slider has a DragHandler whose target is the slider's knob, you can start dragging anywhere on the whole Slider but you want the knob to jump to the cursor position when the drag begins. While we're at it, both branches of the if in onGrabChanged() are checking that target() isn't null, so we can move that check out. Fixes: QTBUG-74966 Change-Id: I05be11d27422b070d941b9e43d4e1157e071c3a5 Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* In response to touch cancel, don't just ungrab, send an ungrab eventShawn Rutledge2019-04-042-0/+63
| | | | | | | | | | | | | | | | | | QQuickWindowPrivate::sendUngrabEvent() sends an UngrabMouse event, and that can be filtered by parent filters. If a touch cancel happens to a MouseArea in a ListView delegate, we need the ListView to filter the UngrabMouse event so that QQuickFlickable::childMouseEventFilter() will call QQuickFlickable::mouseUngrabEvent() and QQuickFlickablePrivate::cancelInteraction() will set pressed to false. The pressed state became true because Flickable filtered the press event; so for symmetry, it also needs to filter the touch cancel (in the form of a mouse ungrab), to avoid being stuck in a state where it can't move programmatically. Fixes: QTBUG-74679 Change-Id: I6c0ed364d2bc1f45c7e7b17846a09f6b53f91d0a Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* Allow enums in QQmlType to be set up in two separate passesUlf Hermann2019-03-285-0/+110
| | | | | | | | | | | The baseMetaObject and the property cache can become available at different points in time. If we have initialized the enums before either of them is available we want to add the additional enums when the other one appears. Fixes: QTBUG-74677 Change-Id: I57276681a50b6c04181c6a29e736f2dc20632a0c Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Blacklist tst_qquickfolderlistmodel::nameFilters() on msvc2015/17Ulf Hermann2019-03-271-0/+3
| | | | | | Task-number: QTBUG-74739 Change-Id: Ib0f1d39cb5bc9864195b3c62d254fa38370faf0d Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Re-use existing IC when freezing propertiesUlf Hermann2019-03-271-0/+13
| | | | | | | | | | | | | There is no reason to start from the empty class in that case. Furthermore, if the properties are already frozen, starting from the empty class will walk the IC hierarchy to the current IC. However, if the garbage collector has removed the intermediate classes in the mean time, we end up at a new IC which is equivalent but not the same. Therefore, the freezing never terminates. Task-number: QTBUG-74190 Change-Id: Id544bd00d3b4b563fb06dfce0edd0385e1d32a6c Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Scope intermediate values when allocating objectsUlf Hermann2019-03-271-0/+13
| | | | | | | | | Otherwise the garbage collector might interfere and we might end up with dangling pointers in random places. Task-number: QTBUG-74190 Change-Id: I253c526ef930b8f0be14e96a42af8b66fda3b22d Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Fix incorrect PathView.currentIndex assignment with StrictlyEnforceRangeShawn Rutledge2019-03-272-0/+88
| | | | | | | | | If currentIndex is quickly assigned a different index and then the previous current index again, it should not move. Fixes: QTBUG-74508 Change-Id: I8d610e3fe452c8631e082c648e77d2cb70ae57c5 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Trigger the garbage collector when allocating InternalClass objectsUlf Hermann2019-03-261-20/+34
| | | | | | | | | | | | | | | | | As we check the icAllocator's slots on shouldRunGC() we should also check shouldRunGC() when adding slots. Otherwise we might never run the GC when only allocating InternalClasses. In addition, account for the "unmanaged" size of the PropertyAttributes that are part of the InternalClass objects. Those can be large. In cases where an excessive number of large InternalClass objects is created the garbage collector is now invoked frequently, which costs a significant number of CPU cycles, but prevents the memory usage from growing indefinitely. Task-number: QTBUG-58559 Change-Id: Icf102cb6100f6dba212b8bffe1c178897880eda0 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Fix preview zoom problems on windowsTim Jenssen2019-03-221-6/+6
| | | | | | | | | | Apparently the window is moved to random places on multi-monitor setups on windows. Fixes: QDS-263 Change-Id: I21082c7031fefff3057074c147e82df7a88f4f78 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* Try to stabilize qquickrectangle testSimon Hausmann2019-03-221-4/+2
| | | | | | | | | Similar to commit 9921180a44d9097b1b83c2fa7b3f36dbb555140c, introduce liberal use of QTRY_VERIFY. Fixes: QTBUG-74605 Change-Id: I4552b1df4021f78cddff08f0b7d8629fafe25acb Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Update tests/auto/qml/ecmascripttests/test262Jani Heikkinen2019-03-221-0/+0
| | | | | | | | Task-number: QTBUG-73454 Task-number: QTBUG-71209 Change-Id: I12925ce49cc18f4bb6908a5515fc476b32a222dc Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> (cherry picked from commit 896d49a4e1113e3eb4832b83920b0dfd76987259)
* Fix some memory leaksSimon Hausmann2019-03-211-9/+9
| | | | | | | | Use QScopedPointer where appropriate to avoid reporting false memory leaks with ASAN's leak checker. Change-Id: Ia3dfeafc66c2ad2ac8454861acce82b99678e517 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Initialize TranslationData padding before writing cache filesUlf Hermann2019-03-2118-36/+103
| | | | | | | | Otherwise the resulting files differ subtly. Fixes: QTBUG-74532 Change-Id: I12b4f1ba6dda781d63ad50cce87861ba24582bf7 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Blacklist tst_QQuickMultiPointTouchArea::nonOverlapping for openSuseUlf Hermann2019-03-211-0/+2
| | | | | | | | The test is flaky, just like it is on Ubuntu. Task-number: QTBUG-74072 Change-Id: I65b1f7a00a72abd57460957a6399a86c213d082b Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Blacklist tst_QQuickMultiPointTouchArea::nested on opensuseUlf Hermann2019-03-211-0/+2
| | | | | | Task-number: QTBUG-59960 Change-Id: I4a4d607c84600c83475d0ea5c10c9466d4dc626c Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* QUICK_TEST_MAIN_WITH_SETUP: fix qmlEngineAvailable() being called too lateMitch Curtis2019-03-214-0/+25
| | | | | | | | | | | | | | | | | | When I added the macro, I wasn't aware that TestCaseCollector was a thing. TestCaseCollector loads each QML file without running the tests (i.e. creates a QQmlComponent from the file without creating an object from that component). Since it still executes imports, the test can fail if types are registered or import paths added in qmlEngineAvailable(), since it's called too late. So, call it earlier. This should have no adverse effect on user code, as nothing of importance to the user will be skipped, and the documentation already details what can be expected by the time qmlEngineAvailable() is called. Change-Id: Ibd3a4b728bc87b90f89cc310fddf668c5879ad83 Fixes: QTBUG-74160 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* V4: Do not invert non-reflexive comparison binopsErik Verbruggen2019-03-211-0/+10
| | | | | | | | | This is only useful for the few (4) comparisons where we have specialized instructions, and it's very error-prone. Change-Id: I37efe94f54ba0adf393d9236df2d13aa6685eb46 Fixes: QTBUG-74476 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Add test for dynamic anchors to parents in PropertyChangesUlf Hermann2019-03-203-0/+41
| | | | | | Fixes: QTBUG-71042 Change-Id: I4d0927b0d6c9a4ccaaddfbfd6dd2a7841fbbc845 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* V4: Don't mark InternalClass::parent when garbage collectingUlf Hermann2019-03-201-0/+26
| | | | | | | | | | The parent pointer is only kept so that we can update the parent's transitions when removing a child. There is no need to keep the parents alive for the children. Fixes: QTBUG-58559 Change-Id: Ia28183966bde6d478ca030fe11195489925dfc13 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Implement dummy QML lookups for "global" variablesSimon Hausmann2019-03-204-5/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | When resolving names in the context of QML bindings, we now direct runtime access to QQmlContextWrapper::resolveQmlPropertyLookupGetter. At the moment this does basically the same as Runtime::method_loadName, which we called earlier. However this now provides the opportunity to optimize lookups in the QML context in a central place. When performing a call on a scope or context object property, we also did not use a CallName() instruction - which would have gotten the thisObject wrong - but instead we use a dedicated CallScopeObjectProperty and CallContextObjectProperty instruction. These rely on identifying these properties at compile time, which goes away with lookups (and also doesn't work when using ahead-of-time compilation). Therefore the qml context property lookup is using a getPropertyAndBase style signature and Runtime::method_callQmlContextPropertyLookup uses that. For the tests to pass, some error expectations need adjusting. In particular the compile-time detection of write attempts to id objects is now delayed to the run-time. The old code path is still there and will be removed separately in the next commit (as it is massive). Task-number: QTBUG-69898 Change-Id: Iad1ff93d3758c4db984a7c2d003beee21ed2275c Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Blacklist tst_QQuickListView::enforceRange_withoutHighlight on opensuseUlf Hermann2019-03-201-0/+2
| | | | | | Task-number: QTBUG-74544 Change-Id: I0a8c54d2a02d959edacd82abcee4553222d575d9 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Raise timeout in QQmlPreview testUlf Hermann2019-03-201-1/+1
| | | | | | | Apparently on some platforms this can time out. Change-Id: I30cd274ff3127319c558b473b6ec7e7f5bc79c38 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Blacklist AnimatedImage::test_crashRaceCondition_replyFinished()Ulf Hermann2019-03-201-0/+2
| | | | | | | | This is unstable on macOS 10.13. Task-number: QTBUG-74525 Change-Id: I8c04b4f0b4c560d1805982a605f994e0f1f1c87d Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Blacklist tst_TouchMouse::buttonOnFlickable() on mingwUlf Hermann2019-03-201-0/+4
| | | | | | Task-number: QTBUG-74517 Change-Id: I3e0a90a264f8f686bba89e6b8dc4ebcf05418f77 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Relax tst_QQuickGridView::contentHeightWithDelayRemoveUlf Hermann2019-03-201-1/+1
| | | | | | | | | Apparently we cannot rely on the content height change to immediately take effect. Change-Id: I8b4bf7b7d0b72da84228c7a3f1460b42c97e0330 Fixes: QTBUG-74518 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Create import directory from intercepted URL, not orignial oneUlf Hermann2019-03-204-0/+42
| | | | | | | | | If the qmldir URL got intercepted, we should use the intercepted URL to get to the contents to be loaded. Fixes: QTBUG-73843 Change-Id: I51715575e767ed429a8237517f47196677409fe0 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Baseline JIT: Save accumulator in toInt32LhsAcc()Ulf Hermann2019-03-191-0/+12
| | | | | | | | | | toInt32LhsAcc convertes both the lhs and the accumulator to int32. If the accumulator is not saved, a GC run during the conversion of the lhs might trash its value. Fixes: QTBUG-74058 Change-Id: Ic42693061c7d483bb430d77bcc095de6ff9a6843 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Fix compilation for SLES 12Ulf Hermann2019-03-181-1/+1
| | | | | | | | Apparently only some compilers see through QPointer on connect() Fixes: QTBUG-74500 Change-Id: I4d0ca7c8ab8b7eae281deff14523a1628e669279 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>