aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto
Commit message (Collapse)AuthorAgeFilesLines
...
* Added private API for enabling sharing between the QQuickwindow instances.Gunnar Sletta2013-11-011-13/+40
| | | | | | | | This API is primarily a hook which is needed by the Qt WebEngine to set up sharing with the scene graph's OpenGL contexts. Change-Id: I5bb03abd9ab99f502db8e413fe838a8b30365b8d Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
* Speed up lookups of imported scriptsSimon Hausmann2013-10-311-8/+8
| | | | | | | | | | The QQmlContextData stores the JS objects of imported scripts in a QList<PersistentValue>. Instead of indexing into that list, this patch changes ctxt->importedScripts to be a JavaScript array, that in the IR we can index via subscript. Change-Id: Ie2c35fb5294a20a0b7084bb51d19671a27195fec Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* tests: replace nokia with qtproject in tst_qqmlmodulepluginLiang Qi2013-10-3157-86/+86
| | | | | Change-Id: I674da7f77dde380fb0772d5077da84de875b6ce8 Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* Initial support for resolving meta-property access for the scope and context ↵Simon Hausmann2013-10-311-0/+1
| | | | | | | | | | | | | | | | | objects at QML compile time This avoids having to do a string lookup for ids and in the import cache at run-time, before we can do a string hash lookup in the property cache. Instead we resolve final properties in the context and scope object at compile time and look them up at run-time using their index instead. The dependencies to these properties are also tracked separately and recorded in the compiled data. This is merely the initial patch. There's a lot left to do, such as having specialized getter and setters for specific property types. Setters are missing altogether right now and will fall back to name lookup. Change-Id: If3cb4e7c9454ef4850a615f0935b311c9395b165 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Test: qmltest/fontloader were fixedLiang Qi2013-10-301-6/+0
| | | | | | | | | The commit 3745b0ca126f46eadfeeb7e3d1d53360dbf800cd resolved this issue. Task-number: QTBUG-32650 Change-Id: I084b326c19e7c0de303b05b2f3fb788c380a1ba0 Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Use one render loop per QQuickWindowGunnar Sletta2013-10-3011-9/+451
| | | | | | | | | | | | | | | | | | | See the task for the full reasoning behind this patch. The threaded renderloop has been refactored to have one window per thread. This is mostly a simplification of the current code path where for loops over multiple windows are turned into if (window). The QSGContext has been split into two classes, QSGRenderContext for which there is one per OpenGLContext. The rest of the patch is name changes and a couple of cleanups in the hopes of simplifying this change. Task-number: QTBUG-33993 Change-Id: I31c81f9694d7da7474a72333169be38de62613c4 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Fix qqmllocale testAlan Alpert2013-10-301-5/+1
| | | | | | | | | | Test was only passing the time to the format function, thinking it was the only part under test, but the date is also relevant due to DST being part of the formatted output. Task-number: QTBUG-34406 Change-Id: I1f542b58907281632ee3c96b9b5b38426936953e Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Fix adding created objects to instantiator.kakadu2013-10-294-0/+169
| | | | | | | | | | | | Before all new objects were pushed into the end of QVector, i.e. if item model changes object with low index newly created object will be added like it has big index. So, removing objects from instantiator was buggy. Task-number: QTBUG-33847. Change-Id: I49fba53a40fce72060b629f737c10b525c67cc86 Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com> Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* QQmlSettings: fix loading of initial valuesJ-P Nurmi2013-10-291-0/+18
| | | | | | | | | | When the initial value of a QML Settings var property is invalid ie. it has no initial value set, it must be loaded from QSettings as is without testing QVariant conversion (that would fail when the conversion target type is "invalid"). Change-Id: If002d52251e3f2d6373dcc305b439de61c6b8c79 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* Disable DST related locale test temporarilySimon Hausmann2013-10-291-0/+4
| | | | | | | | We prioritize getting other fixes into QtQml right now, so skip these tests. According bug is filed. Change-Id: I9b824e41d2164906b22282e75aa80a69a4ce5652 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Properly propagate parse errorsLars Knoll2013-10-291-32/+41
| | | | | | | | Replace all try/catch statements used when parsing with checks for engine->hasException. Change-Id: I4493cb600d5a3eb095c2003bb88bd031403e47c9 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Fix rendernode bug and enable rendernode test.Gunnar Sletta2013-10-263-24/+21
| | | | | | | | | | | | | | The bug in the renderer was that the viewport was set before we called the render node, leaving us with the viewport set by the render node as opposed to the viewport of the renderer. The render node API is a crude and intrusive hack which was added for webkit back in the day. With the introduction of webengine it becomes less relevant, but it should still work. Change-Id: I66a1e3047e018ad6c0bb28044851e9fc65da59cc Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* Use finalUrl in QQmlTypeLoader::Blob::addPragma to fix a bug.Antti Piira2013-10-252-0/+30
| | | | | | | | | | There was a bug in addPragma where url() was being used instead of finalUrl(). This resulted in an error finding the type if selectors were used. This patch includes the fix and adds a unit test to cover the use case. Change-Id: I18b6c73e96af2e1464931de76f1f8fd804746d82 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Explicitly mark subdirs as host_builds in SUBDIRS templateTor Arne Vestbø2013-10-251-0/+2
| | | | | | | | | | | Allows post-processing code to exclude recursing into host_build subdirs. The alternative would be to have the SUBDIRS logic pre-parse the subdir project to check if it's a host_build, but that might have a performance impact, so it's better to leave the information explicit in the subdir project file. Change-Id: I468ceeaedce54b13bf672f82b9dcf04cc19d15e1 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* 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>
* 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>
* 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>