aboutsummaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* 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 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>
* | Fix support for jsTr() and QT_TR_NOOP in list elements when cachingSimon Hausmann2017-04-061-0/+42
| | | | | | | | | | | | | | | | | | Similar to the Qt Quick Compiler we need to do the expression simplification pass at cache generation time to extract translation calls in list elements. Change-Id: I267fc9647ab82bc83d6b087c06c0036df38238ff Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Fix loading of ahead-of-time generated cache files when cross-compilingSimon Hausmann2017-04-061-1/+1
| | | | | | | | | | | | | | | | | | The target ABI is something that we must include correctly at cache generation time. The corresponding qmake variable is available in qtbase now, so we can use that and embed it in the generated data. Change-Id: Icd6e44824f5151535ce9ddac27687b7877288725 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Blacklist tst_QQuickMultiPointTouchArea::nested on Ubuntu 16.04Tony Sarajärvi2017-04-061-0/+2
| | | | | | | | | | | | Task-number: QTBUG-59960 Change-Id: Ibbcde3aa64e517a7bc0c0073efc84ff66a3fae4c Reviewed-by: Liang Qi <liang.qi@qt.io>
* | Add auto-test for qmlcachegenSimon Hausmann2017-04-063-0/+129
| | | | | | | | | | | | | | | | | | This test writes a simple QML file with embedded JS code into a temporary directory, calls qmlcachegen to generate the cache file, removes the original source code and tries to load the component. Change-Id: I63e1b0c76a987f4a21b3dc6cb7c4dc828dd5d11f Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | QQuickParticleSystem: Fix crash when an Affector diesMartin T. H. Sandsmark2017-04-052-0/+50
| | | | | | | | | | | | | | | | | | A guarded pointer wasn't checked before being de-referenced, that lead to a crash if an emitter was modified after an affector was deleted, but before updateCurrentTime() was called. Change-Id: I6cb605a711319fb77c1e2e87fa9f35427cd7797b Reviewed-by: Robin Burchell <robin.burchell@crimson.no>
* | tst_qquickflickable: remove bogus ItemAcceptsDrops flagShawn Rutledge2017-04-051-3/+1
| | | | | | | | | | | | | | | | TouchDragArea (only for the nestedSliderUsingTouch test so far) doesn't need this flag. It was a copy-and-paste mistake. Change-Id: I4aba79f940e89c9b5f91f2a347c1b7f458284e24 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | Blacklist tst_QQuickMultiPointTouchArea::nonOverlapping in Ubuntu 16.04Tony Sarajärvi2017-04-051-0/+2
| | | | | | | | | | | | Task-number: QTBUG-59829 Change-Id: Ib0b416200922f1e03188960db3735e45012d2797 Reviewed-by: Liang Qi <liang.qi@qt.io>
* | Adapt tst_qquickflickable::nestedSliderUsingTouch for slow CIShawn Rutledge2017-04-041-4/+4
| | | | | | | | | | | | | | | | | | QQuickTouchUtils::flush() doesn't actually cause all events to be fully delivered. Task-number: QTBUG-59840 Change-Id: Id5bcd97fa06c0d183e633494eca6aa61908348ae Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | Blacklist nestedSliderUsingTouch in Ubuntu 16.04Tony Sarajärvi2017-04-041-0/+2
| | | | | | | | | | | | Task-number: QTBUG-59840 Change-Id: I147eb4aa0f0c61f9c017ce1614ea3b2b2d2386c9 Reviewed-by: Liang Qi <liang.qi@qt.io>
* | Blacklist tst_qquickwindows::requestActivate in macOS 10.11Tony Sarajärvi2017-04-041-0/+2
| | | | | | | | | | | | Task-number: QTBUG-59857 Change-Id: I0d17caceaed0a59ec9abc7f9e8d5fbcc5b504287 Reviewed-by: Liang Qi <liang.qi@qt.io>
* | V4: Set correct source locations for jumps out of conditionalsv5.9.0-beta1Ulf Hermann2017-03-311-20/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We always want to place the jump on the last line of the conditionally executed statement, unless we might never execute the last line. In the latter case, that is if the inner statement is again a conditional, we use some token of the outer condition. This works fine with loops, as the loop condition is actually checked after each iteration, and it's plausible to the user that we jump there. With "if" statements, it's not so great. We cannot really explain why we jump back to the "if" token after executing the conditional statement. However, we have to add some source location to the jump instruction as otherwise it uses the source location of the last statement that had one, which is rather random. Task-number: QTBUG-59204 Task-number: QTBUG-59774 Change-Id: I48e331ce1c1830f236e16b75c9201a2f490d2092 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Qml Debugger: Make sure all objects have a typeUlf Hermann2017-03-312-15/+57
| | | | | | | | | | | | | | | | | | QQmlMetaType::prettyTypeName() does a better job in finding a valid type name for our objects than we can do ourselves. Task-number: QTCREATORBUG-17741 Change-Id: Ie8a192aceb230e73b5295b745987692548aff641 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Blacklist tst_qquickapplication::active on OS X 10.11Tony Sarajärvi2017-03-301-0/+2
| | | | | | | | | | | | Task-number: QTBUG-58785 Change-Id: I860e99b32275ff618b96fb18e3b76d6bb15d18d4 Reviewed-by: Liang Qi <liang.qi@qt.io>
* | Blacklist TextEdit autotests on macOS 10.12Tony Sarajärvi2017-03-301-0/+4
| | | | | | | | | | | | | | | | | | TextEdit::test_textentry and TextEdit::test_textentry_char fail on macOS 10.12. Task-number: QTBUG-58972 Change-Id: I3d9e4db3a3243ab9a5e373c9cdb23200d80232bd Reviewed-by: Liang Qi <liang.qi@qt.io>
* | Restrict automated tests on Boot2Qt to non-graphical testsSimon Hausmann2017-03-302-6/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows us to enable running of some of the tests in the CI and gives us test coverage for some important architecture specific aspects of the engine. Graphical tests are omitted at the moment as well as a few other tests (such as ES6 suite), that will be added incrementally. This change is just an enabler. Once in place tests can be enabled in qt5.git's platform_configs. Change-Id: I9179aaf1fe12f4423833379b97d16b711c57f39b Reviewed-by: Sami Nurmenniemi <sami.nurmenniemi@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Minor cleanup: Don't require QtGui for ES6 testsSimon Hausmann2017-03-291-1/+1
| | | | | | | | | | | | | | We don't need a QGuiApplication to launch test262.py Change-Id: I3f8e200245a30d88f3c6ff578be414ec76bcfb9c Reviewed-by: Robin Burchell <robin.burchell@crimson.no>
* | Make keyboard events work in QQuickWidgetLaszlo Agocs2017-03-291-0/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Right now many cases outside of text input fields are simply broken, e.g. one cannot use a TableView or other controls with the keyboard. Removing the seemingly unnecessary focusObject() solves all problems since this way key events get delivered to the QQuickWidget which in turn forwards to the QQuickWindow. Directly routing into the QQuickWindow's focusObject(), which can be any item in the scene is wrong since it skips a big part of QQuickWindow's event handling logic. Task-number: QTBUG-45757 Change-Id: Ie53b9003d156ab019fa4b9cf461e209990e738f7 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | tst_qquickimage::mirror(): Ensure screenshots are in the correct formatFriedemann Kleint2017-03-291-1/+1
| | | | | | | | | | | | Task-number: QTBUG-59787 Change-Id: I9ef1e6e5284cadc37bdac342b02cf93655346d57 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | Add tst_qquickflickable::nestedSliderUsingTouchShawn Rutledge2017-03-272-0/+197
| | | | | | | | | | | | | | | | | | | | | | to verify that when a touch-handling component is inside the Flickable, it can control whether the flickable can steal the grab by means of setKeepTouchGrab. Task-number: QTBUG-59416 Task-number: QTBUG-59707 Change-Id: I93cf3abb07a96a69290c3b5b055b688a62fe8fff Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | tst_qquickflickable: clean up touch event handlingShawn Rutledge2017-03-271-17/+9
| | | | | | | | | | | | | | | | Use QTest::createTouchDevice now that it exists. No need for each test to create a device and pass it in to flickWithTouch Change-Id: I81131a13aaba01cfa0f04b25f334c80263625d12 Reviewed-by: Robin Burchell <robin.burchell@crimson.no>
* | Merge "Merge remote-tracking branch 'origin/5.8' into 5.9" into refs/staging/5.9Simon Hausmann2017-03-251-0/+53
|\ \
| * | Merge remote-tracking branch 'origin/5.8' into 5.9Simon Hausmann2017-03-151-0/+53
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/qml/compiler/qqmltypecompiler.cpp src/qml/compiler/qqmltypecompiler_p.h src/qml/qml/qqmltypeloader.cpp src/qml/qml/qqmltypeloader_p.h Change-Id: I4894555ab7a0879b56bbda7a46d16d1c40c19e7c
| | * Fix caching of QML singleton typesSimon Hausmann2017-03-131-0/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a QML file depends on a QML singleton, we failed to include it in the dependency hash. Thus changes to the QML singleton did not result in a re-creation of the caches of files that use it. The list of singletons comes from random-ordered hashes in the qml import handling. We provide an order to the direct dependencies by sorting by the singleton type names. Task-number: QTBUG-58486 Change-Id: Ie7e9d006f9bf3a60af1f819ee439c29bc234bd8a Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | | Run ES5 tests on Linux/x86-64Simon Hausmann2017-03-249-23/+112
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This requires including the test suite as a submodule by default and bumping the module to a new sha1 that removes some particularly long paths. Also force the test suite to run under a US locale, as tests like ch15/15.5/15.5.4/15.5.4.7/S15.5.4.7_A1_T11 cannot deal with locale dependent output for date formatting. The test harness now returns a non-zero exit code when a test fails. This is used by the QTestLib wrapper to determine success or failure. The tests with JIT are run, but the tests with the interpreter are omitted at the moment until the last failure is fixed. The tests add about 10-15 minutes extra time to the total time it takes to run tests on Linux in the CI. Change-Id: Id01fd3b41350f9c9a6ce9e43236f51f7f0fb71c8 Reviewed-by: Robin Burchell <robin.burchell@crimson.no>
* | | Blacklist a qmltest::ListView test in macOS 10.12Tony Sarajärvi2017-03-231-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Precise name of blacklisted test: qmltest::ListView::test_listInteractiveCurrentIndexEnforce() Task-number: QTBUG-58971 Change-Id: Iac01f0a5c31c91b08438fd6d7601bdb2ced41ac6 Reviewed-by: Liang Qi <liang.qi@qt.io>
* | | Avoid an extra stat() on the source .qml file when loading cacheSimon Hausmann2017-03-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | For timestamp comparison it is not necessary to create another QFileInfo() object and call exists() and lastModified(), when we can pass that information through from the type loader. Change-Id: I225cd36e672f1f390bddb4e6ebfafa3fc1269795 Reviewed-by: Lars Knoll <lars.knoll@qt.io>