aboutsummaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* V4 debugger: retrieve formals and locals.Erik Verbruggen2013-10-241-1/+166
| | | | | Change-Id: I47507a4d7d1b429b9c43ed3a7822079efe577327 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Allow &quot; in QQuickStyledTextJohn Brooks2013-10-241-1/+1
| | | | | | | | QString::toHtmlEscaped generates &quot;. QQuickStyledText should be symmetrical with that function. Change-Id: I67ea0abe446b5fa1edb53258dca58b84af910e28 Reviewed-by: Martin Jones <martin.jones@jollamobile.com>
* Avoid crash when a QML signal is connected to a non-void slotJ-P Nurmi2013-10-223-0/+24
| | | | | | | | | | Don't pass a QVariant pointer for the return value when we're not interested in it and the return type might not even be a QVariant (that would be only true for QML methods). Task-number: QTBUG-32801 Change-Id: I8f14e40d8f94caef7e3d086b776735f0484dbf0e Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Re-enable debugger autotests on MacKai Koehne2013-10-221-7/+3
| | | | | | | | | Partially revert 8ed38c70 to also test qqmlprofiler, qqmlinspector on Mac. The tests were unreliable before, but that was fixed with 816e7f11f in qtbase. Change-Id: Icca7ff6617ea18d069d4cd95905d76fe59b92e31 Reviewed-by: Aurindam Jana <aurindam.jana@digia.com>
* Rename v4 to qmljsSimon Hausmann2013-10-222-2/+2
| | | | | | | | We don't want to officially support this binary in our release builds, so give it a "safer" name and enable it only in developer builds. Change-Id: Iaa007bc2ccdb133635161aae01d140efe0f44e23 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Re-enable working test.Gunnar Sletta2013-10-221-3/+0
| | | | | | | Task-number: QTBUG-33517 Change-Id: I05ec6085b26a8d002cb904fecc172fa2eefbf79d Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* tests: Replace Q_OS_MACX -> Q_OS_OSXSergio Ahumada2013-10-211-1/+1
| | | | | | | | Use the correct identifier for the OS X operating system. Change-Id: Iff433d312c7c808ddce13466be3db628cf3a9890 Reviewed-by: Jake Petroules <jake.petroules@petroules.com> Reviewed-by: Eike Ziller <eike.ziller@digia.com>
* Reset on model layout changedAlbert Astals Cid2013-10-215-2/+284
| | | | | | | Otherwise the next dataChanged from the model may not be received Change-Id: I16b859d92fdb1823c4a56c297d4451abe438fbb1 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Fix crash in FolderListModelFabian Bumberger2013-10-172-5/+24
| | | | | | Change-Id: I8d012e9a356676dd3dad246579c7339eaddc1e91 Reviewed-by: Alan Alpert <aalpert@blackberry.com> Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* Fix flaky QQmlProfilerService::scenegraphData testKai Koehne2013-10-171-6/+5
| | | | | | | | | | | QSGRenderThread::syncAndRender first triggers the frameSwapped() signal, and only then adds the SceneGraphRenderLoopFrame message. We're waiting for the frameSwapped signal to stop profiling, and therefore can't be sure whether we'll get the final SceneGraphRenderLoopFrame message or not. Task-number: QTBUG-33024 Change-Id: I3216667e8e5cdc79f210290ce22cc6b08c579b6a Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Improve output of test caseKai Koehne2013-10-165-3/+61
| | | | | Change-Id: Ib36583120ca42835534f0f8494637aeb9618f317 Reviewed-by: Aurindam Jana <aurindam.jana@digia.com>
* Fix segfault in autotestKai Koehne2013-10-161-2/+5
| | | | | | | Do not re-declare variable in local scope! Change-Id: I4f66081603ce86d78965ac12368bda66d86ff0c4 Reviewed-by: Aurindam Jana <aurindam.jana@digia.com>
* Turn on exact garbage collection by defaultLars Knoll2013-10-163-72/+7
| | | | | | | | | Keep conservative GC as a fallback for testing Enable all tests again that were skipped due to GC issues. Change-Id: I8e0fa728207bdd39a96d0acf95e27841157d8402 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Compile binding expressions in the QQmlCompilerSimon Hausmann2013-10-113-2/+10
| | | | | | | | | | | | | | | | | | | | | | | | This is done by re-using the JS code generator from the new compiler. A few bugs were fixed on the way: * The index into the compiledData->runtimeFunctions array is not the same as the function index when they are collected (from the AST), as for example binding expressions may create extra V4IR::Function objects that break the 1:1 mapping. Therefore the JS code gen will return a mapping from incoming function index to V4IR::Module::Function (and thus runtimeFunction) * Binding expressions in the old backend get usually unpacked from their ExpressionStatement node. The reference to that node is lost, and instead of trying to preserve it, we simply synthesize it again. This won't be necessary anymore with the new compiler in the future. * Commit 1c29d63d6045cf9d58cbc0f850de8fa50bf75d09 ensured to always look up locals by name, and so we have to do the same when initializing the closures of nested functions inside binding expressions (in qv4codegen.cpp) * Had to change the Qml debugger service auto-test, which does toString() on a function that is now compiled. Even if we implemented FunctionPrototype::toString() to do what v8 does by extracting the string from the file, it wouldn't help in this test, because it feeds the input from a string instead of a file. * In tst_parserstress we now end up compiling all JS code, which previously was only parsed. This triggers some bugs in the SSA handling. Those tests are skipped and tracked in QTBUG-34047 Change-Id: I44df51085510da0fd3d99eb5f1c7d4d17bcffdcf Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Fix and re-enable constantUpdateOnWindow test.Gunnar Sletta2013-10-111-15/+33
| | | | | Change-Id: I0015ea58bfd673352405642153a038b72d44aa37 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* Unskip test which now passes.Gunnar Sletta2013-10-111-3/+0
| | | | | Change-Id: Ifccab1ef822a9bb455d442f6b13711887a399d6e Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* Fix regression in pressDelay behavior.Michael Brasser2013-10-041-0/+17
| | | | | | | | | | | | | | | Don't deliver a press event when a Flickable is moved before the pressDelay expires. This prevents delegates flickering between pressed and unpressed states when beginning to flick a Flickable. Fixes regression introduced by 429af6244518172e19abf7fecd7112f26bac6b31/ d02131e743597b9bd3070d986c61a1c91ea8317a. Task-number: QTBUG-31168 Change-Id: Id4e853fabe99000837df3681acd8fc4e76d2e9b3 Reviewed-by: Martin Jones <martin.jones@jollamobile.com>
* Cleanup exception handlingSimon Hausmann2013-10-031-1/+0
| | | | | | | | | | The code in the Exception class operates entirely on the engine's data, so move it into ExecutionEngine instead. This eliminates the need for a QV4::Exception class and catches and old code that tries to still do catch (Exception &) instead of catch (...) Change-Id: Ie608bec6af652038aca6c9423c225a4d7eb13b39 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Fix warnings in tst_qquickaccessible.Friedemann Kleint2013-10-031-6/+2
| | | | | | | | | | | | tst_qquickaccessible.cpp: In function 'int verifyHierarchy(QAccessibleInterface*)': tst_qquickaccessible.cpp:70:27: warning: variable 'middleChild' set but not used tst_qquickaccessible.cpp: In function 'QAccessibleInterface* topLevelChildAt(QAccessibleInterface*, int, int)': tst_qquickaccessible.cpp:325:46: warning: suggest parentheses around assignment used as truth value. Change-Id: I80f9a1e5438279add3671828a3145af2b1f2abf8 Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* Change exception handling APISimon Hausmann2013-10-021-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch changes the exception handling API in the engine slightly, encapsulating any use of direct throw statements and catch blocks with concrete types. In the future we need to be able to change the way these are implemented, in order to ensure that the correct stack unwinding code is triggered for throw and re-throw. This patch separates the C++ exception object thrown from the V4 exception (that includes value, throwing context pointer) and stores the latter inside the engine. In order for that to compile, ExecutionEngine::StackTrace and StackFrame had to move into the QV4 namespace directly. In addition the syntax for catching exceptions changes from try { ... } catch (QV4::Exception &ex) { ex.accept(context); QV4::ScopedValue exceptionValue(scope, ex.value()); } to try { ... } catch (...) { QV4::ScopedValue exception(scope, context->catchException()); } Context::catchException() checks if there's a "current" exception in the engine, and if not assumes that we caught an unrelated exception and consequently re-throws. partiallyUnwind() is also gone and replaced with rethrowException(), in order to encapsulate the re-throw. Lastly, in the future nesting try/catch blocks isn't going to be possible due to limitations in the common C++ ABI with regards to foreign exceptions. Change-Id: Ic81c75b057a2147e3176d8e0b4d326c14278b47d Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Cleanup API of Safe<T>Lars Knoll2013-10-021-2/+1
| | | | | | | | Don't have an implicit cast operator to Returned<T> anymore, and return a T* from the operator->() Change-Id: If4165071b986bfc84a157560d94d39c2dcfbc9e1 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Always call callCompleted in QQmlDataBlob::tryDoneAlbert Astals Cid2013-10-0213-0/+478
| | | | | | | | | | | | | | | | | | | We need this since it could happen that in QQmlComponentPrivate::loadUrl we did QQmlTypeData *data = QQmlEnginePrivate::get(engine)->typeLoader.getType(url, loaderMode); and got a sync QQmlTypeData even if we asked for async, and thus the async loader was never notified when it finished and we were never loaded. Situation in which this can happen is: * ListView with an async Loader as delegate * Loader loads two items A and B, while A is a B * Item 0 of the ListView triggers an async loading of A that triggers the sync loading of B * Item 1 of the ListView triggers an async loading of B * Since B is already being loaded (though in sync), we just add ourselves to the people that want to be notified * sync loading of B is done and QQmlDataBlob::tryDone does not call the callbacks because it's sync * Item 1 is never finished loading Change-Id: I52a0979a1d3cfcfe73a71196bf24f491d6cf8e9a Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Stabilize tst_qqmlprofilerserviceGunnar Sletta2013-10-021-9/+4
| | | | | Change-Id: Ia381d51561f1c183ec7f2e3fcfe49810bfbfcc61 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Add fine-grained QML / QtQuick performance benchmarksChris Adams2013-10-0174-0/+2132
| | | | | | | | | | This commit adds a series of benchmarks to test the performance of fundamental areas of the QML engine (compilation, instantiation, binding evaluation, positioning) using types provided by the QtQuick QML module. Change-Id: Iecec058c45aea0bd728f03123fa2aa79d6af8efa Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com> Reviewed-by: Christopher Adams <chris.adams@jollamobile.com>
* Fix PathView stealing mouse grab from its child items.Andrew den Exter2013-10-012-0/+60
| | | | | | | | | | Apply the improvements that have been applied to Flickables handling of child items over time to PathView to bring its behavior back in line. Task-number: QTBUG-33699 Change-Id: I76a412d75c48f9cf2f12f5f6f1aa01ff62d06364 Reviewed-by: Joona Petrell <joona.petrell@jollamobile.com> Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com>
* Improve error location reporting for invalid aliases in old VMESimon Hausmann2013-09-301-1/+1
| | | | | | | | | When an alias declaration is missing a location, report the error with the location of the alias declaration, not the object declaration. This matches the code patch in the new compiler, which also reports it accurately. Change-Id: I709dbddb3273f4e05cc4d63079da52d7224466bd Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Compile imported scripts in the loader threadSimon Hausmann2013-09-301-21/+42
| | | | | | | | | | | | | | | | | This has the benefit of blocking the GUI thread less and speeding up type creation in the GUI thread (for types that import js libraries). This patch also brings one behavioral change: Due to the parsing at type instantiation type, things like syntax errors for script imports would only generate a run-time warning and the code in the QML file would just see "undefined". Errors in the script now generate real errors at component compilation time, meaning the errors come out earlier and as real errors. This patch implements the separation for the VME only (to keep the size of this patch small). Change-Id: I82f7f3a2d3d4524ea12a7ab62abd8640aba6a47f Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Remove debug output from tst_qqmlprofilerservice.Gunnar Sletta2013-09-301-2/+0
| | | | | | | I suspect this got snuck in accidentally. Change-Id: I4684bf333a19e6c760ea499b751d51be34f51c6f Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* remove more uses of QV4::ValueLars Knoll2013-09-302-17/+15
| | | | | Change-Id: I11b0b2b7626297e2c98dc77784574da4b59ba8cf Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Stabilize and speed up testLars Knoll2013-09-285-45/+55
| | | | | | | | Added lots of missing qWaitForWindowExposed(), and sped up animations. Change-Id: Ie3c5e53dc9e9770baa05fb1da3eedce80ac52d31 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Mark qmltest as insignificant to get CI to pass againLars Knoll2013-09-281-0/+2
| | | | | | | The animator tests keep crashing randomly. Change-Id: I0d4b177238fc915931c3503b03e29f433ebf4950 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Try to stabilize the multipleTransitions testLars Knoll2013-09-282-0/+3
| | | | | Change-Id: Ifeb53d6a1334623106428410aa2756935d7ba6e1 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Fix compilation of the auto testLars Knoll2013-09-281-3/+7
| | | | | Change-Id: I8c10463aa064a25c0170e6b7f294f48501b42319 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Move Value::fromBool, ... to a new Primitive classLars Knoll2013-09-281-66/+66
| | | | | | | | This will simplify finding the remaining direct usages of QV4::Value that need fixing. Change-Id: I223099727436d5748027c84c53d9dfc4028e38ed Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Allow animators to work properly with multiple windowsGunnar Sletta2013-09-2619-56/+185
| | | | | Change-Id: I5ba663ba0fa089ea786cf43cb4dfa40cbc955342 Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com>
* Support looping for "uncontrolled animations".Gunnar Sletta2013-09-262-0/+89
| | | | | | | | | | The render thread animations rely heavily on uncontrolled animations, meaning animations with duration=-1. We support this by adding a m_currentLoopStartTime and incrementally counting the finish time of each uncontrolled animation. Change-Id: I1f2ccea09aff4c51b1a7f98a2ddb58636af50557 Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* Skip two tests that don't work reliably with a conservative GCLars Knoll2013-09-261-0/+4
| | | | | Change-Id: I5619d533b6e48c88fda063bc7cdcc62d6838bcdf Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Move more API over to use ValueRefLars Knoll2013-09-261-6/+6
| | | | | Change-Id: I372f1f3e3e78d45912a913f437e622e0acfc9646 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Fix Persistent/WeakValue APILars Knoll2013-09-262-10/+12
| | | | | | | Don't use unprotected Values in the API anymore. Change-Id: I8851628227fca374de24701bc8ee0908b5ae3923 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Split off crashing test from qqmlecmascript.Erik Verbruggen2013-09-251-15/+21
| | | | | | | Task-number: QTBUG-33658 Change-Id: I5a9f24d49ab894e3cde745cc0c1d44ef0880510f Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Convenience class for FBO rendering in Qt QuickGunnar Sletta2013-09-254-0/+327
| | | | | Change-Id: I5712bbfa0cde9f2fe5fddc35c4cc23597717065c Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Merge "Merge remote-tracking branch 'origin/stable' into dev" into ↵Sergio Ahumada2013-09-222-0/+20
|\ | | | | | | refs/staging/dev
| * Merge remote-tracking branch 'origin/stable' into devSergio Ahumada2013-09-212-0/+20
| |\ | | | | | | | | | Change-Id: I899f3b517523e4037de50802c0912f7dd960133e
| | * Fix a crash in QQuickItem::nextItemInFocusChain()Liang Qi2013-09-192-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | There is no window object yet when Component.onCompleted. Task-number: QTBUG-33298 Change-Id: I0608d52ee9fe52a0e2c18e81ad7ba99b56078be4 Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* | | convert Managed::put() API to be GC safeLars Knoll2013-09-221-1/+1
| | | | | | | | | | | | | | | Change-Id: I09198ce372fa545372db389fac26828d21ad5731 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | | Cleanup Object::define*Property APILars Knoll2013-09-221-1/+1
| | | | | | | | | | | | | | | Change-Id: I99125908a9bc1d41a2642c409af9704def7a0832 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | | Start using StringRef for parameter passingLars Knoll2013-09-221-1/+1
| | | | | | | | | | | | | | | Change-Id: If2c41daeda2862cd1162c5da8163a9d62fe4111d Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | | Introduce a Referenced<T> class to pass Objects into methodsLars Knoll2013-09-221-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added some convenience typedefs (StringRef, ObjectRef, ReturnedString, ScopedString, ...) Used StringRef in newBuiltinFunction() for testing. Cleaned up the duplicated code for thrower functions. Change-Id: I7b7676690cbe70d9eabb0a5afd0d922f0be3aefd Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | | Cleanup ExecutionEngine::newBuiltinFunction() usagesLars Knoll2013-09-221-3/+4
| | | | | | | | | | | | | | | | | | | | | And change the return type to be GC safe Change-Id: I6d7513962370fea4072a3d8c6b2c6f2d1705992e Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | | Don't use Value::emptyValue() anymore.Lars Knoll2013-09-221-13/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | emptyValue is special and reserved for usage inside the engine to mark missing values. The main to use cases are when converting property descriptors, and to mark holes in array data. Change-Id: I0ed357e65102b1041bf9a878e6e9a4ae0657523b Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>