aboutsummaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* qmltest: fix compare() for urlsLiang Qi2017-06-141-0/+62
| | | | | | | | url is object, but without any property. Task-number: QTBUG-61297 Change-Id: I68b0523be54e4d42f57267205ba8d66ff4ac4e30 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Fix loading QML caches for qrc:/// urlsAlexander Volkov2017-06-133-0/+64
| | | | | | | | | | | | | | | Running examples/quick/window/window produces debug messages: "QML source file has moved to a different location." This is because QQmlFile::urlToLocalFileOrQrc(const QString &) overload is incompatible with QQmlFile::urlToLocalFileOrQrc(const QUrl &) when it deals with qrc:/// urls. For example it returns ":///window/window.qml" while the QUrl overload returns ":/window/window.qml". Thus the comparison of source paths in CompilationUnit::loadFromDisk() fails. Fix the incompatibility and add a test. Change-Id: I20449b8cf13d715d88860f2cd413ab39c893f3ef Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* QQuickItemView: fix releaseItem() loopsJ-P Nurmi2017-06-124-0/+50
| | | | | | | | | | | | | | Calling releaseItem() destroys the item, which emits childrenChanged for the contentItem, and if at that point anything calls setFooMargin(), setContentHeight(), returnToBounds(), or many other methods that indirectly access the visibleItems list, it leads to a crash due to read after free. Add a releaseVisibleItems() helper method that makes a copy, clears the original list first, and then releases the items. Task-number: QTBUG-48394 Task-number: QTBUG-61294 Change-Id: I29e4d3870d33549e8bf789de84c67ab1826fca7d Reviewed-by: Robin Burchell <robin.burchell@crimson.no>
* tst_qqmlengine::clearComponentCache(): Use QTemporaryDirFriedemann Kleint2017-06-082-6/+26
| | | | | | | | | The test used to create a file temp.qml in the working directory. Put it into a temporary directory. Change-Id: I0720a4b4c652c83656505a5dc979660b94503717 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Also run the ecmascript testsuite in the interpreterErik Verbruggen2017-06-081-1/+1
| | | | | | Change-Id: Ibc3e67273bf01dccfad132b53aef6e5241883d97 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* QQuickWindow/View: set a QObject-parent on the root itemJ-P Nurmi2017-06-023-0/+73
| | | | | | | | | | | | | | | | | | | | | | | People are often confused why eg. the objects from: window->contentItem()->findChildren() are not included in window->findChildren(). This change connects the item tree to the window's object tree to make findChild() and findChildren() produce expected results. The same technique is already used for QQuickFlickable's contentItem. [ChangeLog][QtQuick][QQuickWindow] Set the window as the QObject-parent of the contentItem to ensure consistent behavior for calling findChildren() on QQuickWindow and QQuickWindow::contentItem. [ChangeLog][QtQuick][QQuickView] Set the window's contentItem as the QObject-parent of the rootObject to ensure consistent behavior for calling findChildren() on QQuickWindow::contentItem and QQuickView::rootObject. Change-Id: Idb7834eb5e560088ca849e6ce90e6fa3b3ae3e91 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Revert "QQuickWindow::createTextureFromImage(): return nullptr for null images"Mitch Curtis2017-06-021-11/+0
| | | | | | | | | | This reverts commit e6acf80136db9f667d0d4664f6c68065355d6811. This breaks behavioral compatibility. Task-number: QTBUG-61083 Change-Id: I0161d536502bab31aaf4ebc38f91e6c8842f72b0 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Merge remote-tracking branch 'origin/5.9.0' into 5.9Liang Qi2017-05-318-153/+99
|\ | | | | | | Change-Id: I3f77593ca944114534fff5df26bbb09150ee4400
| * QML Settings: fix JS array handlingJ-P Nurmi2017-05-194-153/+65
| | | | | | | | | | | | | | | | | | | | | | Before Qt 5.4, JS arrays were passed as QVariantLists. Since Qt 5.4, they are passed as QJSValues instead. Use QJSValue::toVariant() (the same way as QQuickItemView::setModel(QVariant) which was fixed in cf959b4b) to convert JS values to QSettings-compatible variants. Task-number: QTBUG-45316 Change-Id: Icc6f8ad09bfef089d9efcf5b90e3783bb3f73a9f Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * QQmlIRBuilder: Only query type name cache for type namesRobin Burchell2017-05-194-0/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The behavior here was always incorrect: type names must start with an uppercase letter, so querying the type name cache with a lowercase string is wrong. However, this was turned into a larger problem by making more extensive use of QQmlTypeNameCache in e74a1d0b342f2c95dc3a543c8c9ec07fd52d8fe0, as it contained a lot of new types (including composite types, which previously were only in the cache if they were singletons). Task-number: QTBUG-60547 Change-Id: I40be2d535e99d3e1af250d995d7149ecbe2965d7 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Forward ShortcutOverride in QQuickWidgetLaszlo Agocs2017-05-291-0/+33
| | | | | | | | | | | | | | | | | | | | | | This is now essential since otherwise these events are simply lost. Amends 0dbc575c1a8359534761167a5f5f1e29abedd51d Task-number: QTBUG-60988 Change-Id: Ib1d99d8fcd5bb92c9b52977796f2910f0fe71c48 Reviewed-by: J-P Nurmi <jpnurmi@qt.io> Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* | Set LC_TIME in ecmascripttests/test262.pyJüri Valdmann2017-05-231-0/+1
| | | | | | | | | | | | | | | | One test fails with LC_TIME=et_EE.UTF-8. The script already sets LANG, but LC_TIME has higher precedence. Change-Id: Ifdb37a1a9d69415d34883343e761d23c6353ef24 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Get rid of the old way of defining builtin functionsLars Knoll2017-05-191-4/+4
| | | | | | | | | | | | | | | | | | | | The old calling convention used for builtin functions is very inefficient. It was still being used in a few places. Clean those up and convert them to the new and much more effiecient calling convention. Change-Id: I6b769c6185df7e9be1e80709330fc1ca868576c1 Reviewed-by: Robin Burchell <robin.burchell@crimson.no>
* | Move the prototype into the internal classLars Knoll2017-05-191-1/+1
| | | | | | | | | | | | | | | | | | | | This saves another pointer on all Objects. Currently introduces a slight performance regression on some of the v8 benchmarks, that needs addressing. Change-Id: I87de8e1d198d2683f4e903c467ce2a60ba542243 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Run GC between different benchmark runsLars Knoll2017-05-191-0/+3
| | | | | | | | | | Change-Id: I46654e5c05851534507dc78b7a492a059dab2e14 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Revert "Blacklist tst_qquickwindow::attachedProperty on macOS 10.11"Tony Sarajärvi2017-05-191-2/+0
| | | | | | | | | | | | | | | | | | | | This reverts commit 90e7521313fc9e89d492d65f9ad0dca3c38e7225. Commit 7937eb2d9e19bef89f49db2d510b033f6281af5b could possibly have fixed this autotest. Task-number: QTBUG-60052 Change-Id: I142ea04ef6329a9b1919ac17c427e470083651a8 Reviewed-by: Liang Qi <liang.qi@qt.io>
* | Fix QML Connections element ignoring the enabled propertyThomas McGuire2017-05-172-0/+32
| | | | | | | | | | | | | | | | | | | | | | The enabled property was ignored if it was set before componentComplete() was called. [ChangeLog][QtQml] Fixed the QML Connections element ignoring the initial state of the enabled property Change-Id: I40c92fcb30f0bb8ca406f248b3bde2fced5ab58f Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Revert "Blacklist tst_qquickwindows::requestActivate in macOS 10.11"Tony Sarajärvi2017-05-161-2/+0
| | | | | | | | | | | | | | | | | | | | | | This reverts commit 3063599da646f00fc80e42933358935e6565d7b2. Commit 7937eb2d9e19bef89f49db2d510b033f6281af5b could possibly have fixed this autotest. Task-number: QTBUG-59857 Change-Id: Id5dcc46774696b67acfb7d93a46f384bb600fe56 Reviewed-by: Liang Qi <liang.qi@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | QQuickWindow::createTextureFromImage(): return nullptr for null imagesMitch Curtis2017-05-151-0/+11
| | | | | | | | | | Change-Id: Idf3315be104e058315d82893443e1c27d1d79f2e Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* | Merge "Merge remote-tracking branch 'origin/5.9.0' into 5.9" into ↵Frederik Gladhorn2017-05-104-6/+25
|\ \ | | | | | | | | | refs/staging/5.9
| * | Merge remote-tracking branch 'origin/5.9.0' into 5.9Frederik Gladhorn2017-05-104-6/+25
| |\| | | | | | | | | | | | | | | | | | | Contains the fix for tst_TouchMouse::hoverEnabled which has caused numerous failures in the last few days. Change-Id: I1e523087a53d1df0334d602e4125f5cddc9bf470
| | * Move pointerEvent instance to QQuickWindowJan Arve Saether2017-05-101-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With two or more windows, if events are being delivered to each, the grabbers can be different in each. We need unique instances of the QQuickPointerEvent objects for each window to avoid losing the grab state in the parent window while delivering a synthesized event to a subwindow, for example. Change-Id: I51da1212d573853969e32ad78f5b219d979a8a5c Task-number: QTBUG-57253 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
| | * Fix hover delivery in case of touch release eventsFrederik Gladhorn2017-05-101-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes tst_TouchMouse::hoverEnabled. It turns out that the problem is that QQuickWindowPrivate::flushFrameSynchronousEvents would deliver artificial hover events which (due to the nature of the function) would arrive without being synchronized with the test. This should not be a problem as such, but there was one bug: the hover event would also be sent in case of a touch release event. The definition of when to "pretend hover" is a bit shaky, but we should definitely not send hover events after touch releases. By clearing lastMousePosition instead of setting it to where the touch point is released we no longer receive bogus events. Task-number: QTBUG-55350 Change-Id: I4dea54740e37182f66c4a729d7b06a1c770c34a9 Reviewed-by: Robin Burchell <robin.burchell@crimson.no> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| | * Fix build of tst_qqmlengineSzabolcs David2017-05-091-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It fixes the following compile error: tst_qqmlengine.cpp:279:51: error: variable ‘QCryptographicHash md5’ has initializer but incomplete type tst_qqmlengine.cpp:279:28: error: incomplete type ‘QCryptographicHash’ used in nested name specifier Change-Id: I647a5a487d79f201118bfbddd757aa9cece180e4 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
| | * Don't crash: Connections with a signal on a nonexistent objectShawn Rutledge2017-05-072-0/+21
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-56551 Change-Id: Ide09f177d3f6a3e9902f8ea904b3e6e4b998bd39 Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* | | Remove unused variableFrederik Gladhorn2017-05-101-1/+0
|/ / | | | | | | | | Change-Id: I85a5c94f8a9b1fcb52f3967f0ce521ffb34cfa0f Reviewed-by: Robin Burchell <robin.burchell@crimson.no>
* | Disable particle benchmarksErik Verbruggen2017-05-102-2/+4
| | | | | | | | | | | | | | | | They are broken. See QTBUG-60621 for details. Task-number: QTBUG-60621 Change-Id: Ibf55c64ef1b367bc2058d1c2284cd378ffa826ec Reviewed-by: Robin Burchell <robin.burchell@crimson.no>
* | Fix qml file loading for tst_affectorsErik Verbruggen2017-05-102-5/+9
| | | | | | | | | | Change-Id: Ifb1b6f6d71d42c1642167725526c054f1dce0c90 Reviewed-by: Robin Burchell <robin.burchell@crimson.no>
* | Remove the qqmldebugtrace benchmarkUlf Hermann2017-05-082-95/+0
| | | | | | | | | | | | | | | | | | | | | | | | It benchmarks QElapsedTimer and QDataStream. We should do this in qtbase if we need to do it. The test was not in the parent qml.pro, but it was mentioned in some outdated comments in the QML profiler plugins. Remove those comments, too. Change-Id: I0d1341c32f4a2e02a04a958f76be015fe8d927fb Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Fix benchmark: remove benchmarks containing old v8 referencesErik Verbruggen2017-05-082-89/+2
| | | | | | | | | | | | | | | | | | | | The removed benchmarks don't make sense anymore: they were testing the QQmlEngine part, while another test was doing the QJSEngine. These days the QQmlEngine is a subclass of the QJSEngine and the test would call the QJSEngine (which, as said, was already done in another benchmark). Change-Id: Id1982dc118c399938a2dca8fb3c0a733e52fb20e Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Fix build of animation benchmarkErik Verbruggen2017-05-051-0/+5
| | | | | | | | | | | | | | This was using symbols exported only by a developer build. Change-Id: If2e80a7f7831366a23c5c52669915385cfb3e7c6 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Another benchmark fixErik Verbruggen2017-05-052-1/+3
|/ | | | | | | | Again JS ownership, now shown as an attempt to free a non-malloced pointer. Change-Id: I00a9b1e4918da96aa5bc99a321edc94d76c4f45b Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Remove unneeded BLACKLIST of tst_qquickapplicationTony Sarajärvi2017-05-051-2/+0
| | | | | | | | This commit reverts ae0d74fca32aabdd4c268a77654c552baacced69 Task-number: QTBUG-58785 Change-Id: I53dbade18ef57b1c49d76b40c9400cecfbfafb10 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Remove outdated QJSValue benchmarkErik Verbruggen2017-05-045-114/+2
| | | | | | | | Now that the oterh QJSValue benchmark is fixed (yes, there were two benchmarks with the same name), this benchmark is superfluous. Change-Id: I39a7f9cc79dccef8aac3d4c3999a3d75e1b1aa3d Reviewed-by: Robin Burchell <robin.burchell@crimson.no>
* Fix a QJSValue benchmarkErik Verbruggen2017-05-042-2/+2
| | | | | | | | | The benchmark added the tst_QJSValue instance driving the benchmark to the engine, which then takes over ownership. This would result in a use-after-free, leading to a crash. Change-Id: I524445487a1dabb3fb3fbbfb7fca084f7736c124 Reviewed-by: Robin Burchell <robin.burchell@crimson.no>
* Fix licensingJani Heikkinen2017-05-0411-185/+130
| | | | | | | | | - Remove unused license files - Switch old LGPLv21 license headers with GPL-EXCEPT one Task-number: QTBUG-57147 Change-Id: Ib59c3e2e39bfe0038db795af85dc75028564efa3 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* QQmlComponent: Fix heap buffer overflow with bogus inputPeter Hartmann2017-05-031-0/+12
| | | | | Change-Id: I8a725018a5aeb39df370f856cd77d887faa511e3 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Blacklist tst_qquickfocusscope::canvasFocus on macOS 10.11Tony Sarajärvi2017-05-021-0/+2
| | | | | | Task-number: QTBUG-60518 Change-Id: Ia93fdd87a57c77df4c0360fd33a83428d7e64b14 Reviewed-by: Liang Qi <liang.qi@qt.io>
* Fix concurrent loading of the same qmldir from different scriptsAndy Shaw2017-05-024-0/+35
| | | | | | | | | | | | | | | | QQmlQmldirData keeps a pointer to a QQmlScript::Import, and an integer priority. Each Blob that is waiting on it was setting its own import and priority even though the QQmlQmldirData itself was shared. This resulted in whichever one began loading last succeeding to load, and the rest failing. This change instead stores the import and priority data per-dependent Blob Fix was originally done by Josh Faust <jfaust@suitabletech.com>. I added the test. Task-number: QTBUG-30469 Change-Id: Id3d15569a999a7c22eeb12b431e5daf1ddae51dc Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Polish the shared image providerEirik Aavitsland2017-04-284-1/+117
| | | | | | | | | | | | | | | When the new shared memory image provider was added, some of the issues identified during review were postponed to be fixed during stabilization phase. This commit deals with - Replace the kludge for registering plugin version - Add autotest - Place plugin in labs - Use QT_CONFIG instead of QT_NO_xxx - Use the new extended image provider api, in order to use the scaled-size calculation from Quick Change-Id: I75c01c7565650fcf859411dde9520ee65b2b0c64 Reviewed-by: Christian Stromme <christian.stromme@qt.io>
* Blacklist tst_qquicktextinput on WindowsRobin Burchell2017-04-281-0/+3
| | | | | | | | It has been repeatedly failing for a long time. Change-Id: I2155cc7d821e4d1ea486eeb85445348fac6cafc9 Task-number: QTBUG-41895 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Merge "Merge remote-tracking branch 'origin/5.8' into 5.9" into refs/staging/5.9Simon Hausmann2017-04-272-0/+23
|\
| * Merge remote-tracking branch 'origin/5.8' into 5.9Simon Hausmann2017-04-272-0/+23
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/qtqmlglobal.h src/qtqmlglobal_p.h src/jsruntime/qv4global_p.h src/qml/compiler/compiler.pri src/qml/compiler/qv4ssa.cpp src/qmldevtools/qtqmldevtoolsglobal_p.h tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp Change-Id: I55c5d015b2cb1053b83b9c61caaf004fb49ee486
| | * V4: Fix issues with very small loops5.8Erik Verbruggen2017-04-182-0/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Loops consisting of just a single basic block (e.g. a do-while loop with no nested loops or if statements) have a back-edge to themselves. There were 2 problems: - loop detection would create LoopInfo for any loop header referred to by blocks inside the loop (and a 1 block loop doesn't have body blocks), nor would it mark the loop header as such - when splitting critical edges, the newly inserted block would not be marked as part of the loop This is a problem specifically for 1 block loops: the block ends with a CJUMP, so the back-edge is a critical edge. So the new block inserted by edge splitting wouldn't be marked as belonging to the loop. The end result was that the life-time intervals for temporaries that are defined before the loop, but that are used inside the loop, and not after the loop, would have their life-time ended before the loop ends (instead of spanning the whole loop, *including* the back-edge). This in turns could lead to the stack/register allocator re-using the storage for that temporary, resulting in strange things happening. Task-number: QTBUG-59012 Change-Id: Ic946c73913711272efea2151cb85350412ca2fde Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | QQmlApplicationEngine: Fix using invalid pointersRainer Keller2017-04-261-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a root object was deleted before QQmlApplicationEngine the invalid pointers stayed in the list of root objects leading to crashes when destructing QQmlApplicationEngine. Root objects are watched for destruction and removed from the list. Change-Id: I1babab54dbb7d7b16ed883ada5b3e420ca8690cb Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | Rename macos blacklistings to osxTony Sarajärvi2017-04-241-3/+3
|/ / | | | | | | | | Change-Id: I7b31408b066054bde72402eb4602debbfdad7c1d Reviewed-by: Liang Qi <liang.qi@qt.io>
* | Add an autotest for GC crashes on some platformsRobin Burchell2017-04-212-1/+39
| | | | | | | | | | | | | | | | | | Related to QTBUG-59977, where crashes were seen on some platforms. Try to prevent this from creeping out and inconveniencing other modules again. Task-number: QTBUG-59977 Change-Id: I89730c7882e4d87e6049f087724988a7aa52d5a5 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | QML: clear the property cache on QObjectWrapper destuctionErik Verbruggen2017-04-191-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | If an external QObject is exposed to an engine through a QObjectWrapper, make sure to deref and clear the propertyCache reference in the object's declarative data when the QObjectWrapper is destroyed. This makes sure that there is no dangling propertyCache pointer when the object is subsequently exposed to another engine. Task-number: QTBUG-57633 Change-Id: I37f6793d8be65b23b4e81bb4ed91db18271261b0 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Blacklist tst_qquickwindow::attachedProperty on macOS 10.11Tony Sarajärvi2017-04-101-0/+2
| | | | | | | | | | | | Task-number: QTBUG-60052 Change-Id: I9f415fa2c2a984dd347983c67d1255efb858cb0d Reviewed-by: Liang Qi <liang.qi@qt.io>
* | Enable running of qmlcachegen tests on ARM/qemuSimon Hausmann2017-04-071-1/+1
| | | | | | | | | | | | | | | | This gives us test coverage for the most important cross-compiling scenario of x86-64 host to armv7 target. Change-Id: I31abd3802681b14561e1ee4c60f6cc9cc2049bf2 Reviewed-by: Lars Knoll <lars.knoll@qt.io>