aboutsummaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* Optimise property lookups on primitive typesLars Knoll2013-09-021-2/+1
| | | | | | | | This gives a large speedup on code such as "foo".charAt(2), or (5.).toString(). Change-Id: I8b6c46f2f69a4b00f82048a9368d8e9baf4d89ee Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Move prototype pointer into QV4::InternalClassLars Knoll2013-09-021-2/+0
| | | | | | | | | | | | | The prototype is actually the same for most objects. By moving it into the internal class, we can save 8 bytes per object, as well as allowing for some future optimizations. Also fix a bug in the implementation of the Error prototype objects. Change-Id: I4d4b641055f644a9b088f27be34bfdb0446279b7 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* change calling convention for JS function callsLars Knoll2013-09-021-6/+12
| | | | | | | | | | | | This allows faster pass through of the data if we have nested calls. Also make sure we always reserve at least QV4::Global::ReservedArgumentCount Values on the stack to avoid stack corruption. Change-Id: I42976460f1ef11a333d4adda70fba8daac66acf3 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* New scenegraph renderer and atlas textures.Gunnar Sletta2013-09-022-129/+30
| | | | | | | | | | | | | The renderer tries to batch primitives together where possible, isolate non-changing subparts of the scene from changing subparts and retain vertexdata on the GPU as much as possible. Atlas textures are crucial in enabling batching. The renderer and atlas texture are described in detail in the doc page "Qt Quick Scene Graph Renderer". Change-Id: Ia476c7f0f42e1fc57a2cef528e93ee88cf8f7055 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* Make sure text is output to console on windowsJan Arve Saether2013-09-021-0/+1
| | | | | Change-Id: I33a8a000fb14e2006475c54f3c5bc4e2dd8f0751 Reviewed-by: Caroline Chao <caroline.chao@digia.com>
* The fast and the furious, register drift.Erik Verbruggen2013-08-271-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Enable the register allocator for X86_64 on Linux and MacOS. The implications are: - handle as much as possible with current code with as few changes as possible - temporarily force the register allocator to spill unop/binop arguments to the stack by doing a call in the implementation (as is the current case), so no change is needed here - only have loadThis and loadConst handle registers - have any method that might need to handle registrers actually cope with them - the inline versions of binops are not generated, as they cannot cope with registers. This will change when ISel for binops is added in the next patch. This means that we are still running with the handbrakes on, but allow for full-throttle in certain/limited cases. Note about the changed test: multiplication always returns a Number (double), so the operands are passed as doubles, so __qmljs_mul will return a double. For addition this is different: because it might return a Number or a String, the operands are passed as whatever fits best. So __qmljs_add will return an int when both operands are ints. Hence the change to the tests. Change-Id: If5bd7dffca8f7de5ba45af700b9c7bb568fc74b7 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Improve reliability of propertyVarOwnership testSimon Hausmann2013-08-272-3/+9
| | | | | | | | | | In the last expect-to-collect-a-QObject test, avoid calling gc() from within JavaScript and call it from C++ instead with zap stacking. That reduces the probability of finding an old reference on the stack that would keep the object alive. Change-Id: Ia9c66dd188f31264a70ad4dbd20356d16aa7a057 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Allow for function declarations inside conditionalsSimon Hausmann2013-08-232-0/+26
| | | | | | | | | This is strictly speaking a regression from 5.1/v8, which allows for that as real world JavaScript appears to require it. Task-number: QTBUG-33064 Change-Id: Iceaca84373f12fb08459ed007afb25b5a705fa31 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Don't crash with deferred propertiesAlan Alpert2013-08-224-0/+49
| | | | | | | | | | | There are cases where a qmlExecuteDeferred(o) can be postponed until the context of o is being destroyed, at which point it's too late to create an object in that context. Task-number: QTBUG-33112 Change-Id: I7f981b5e34e3cb8a52c00de4742a7242d7e4df54 Reviewed-by: Christopher Adams <chris.adams@jollamobile.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-08-1911-41/+132
|\ | | | | | | | | | | | | | | Conflicts: tests/auto/quick/qquickgridview/qquickgridview.pro tests/auto/quick/qquickitem/qquickitem.pro Change-Id: Ic54cafbdda1ac22757d2ee65dcc63a1b167c7556
| * Dragging MouseArea nested in Flickable does not work with touch to mouseMartin Jones2013-08-193-35/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | A MouseArea with a drag target nested in a Flickable does not work. This is due to QQuickWindow calling childMouseEventFilter() twice - once in sendFilteredTouchEvent() and later in sendEvent(). Since childMouseEventFilter() has already been called, deliver the mouse event directly in sendFilteredTouchEvent(). Task-number: QTBUG-32920 Change-Id: I22acee3c66ee6c06e71c9c876fb02dbcb6119a8d Reviewed-by: Andrew den Exter <andrew.den.exter@qinetic.com.au>
| * Fix currentIndex in Qml itemView when assigning an empty modelNils Jeisecke2013-08-161-0/+5
| | | | | | | | | | | | | | | | | | | | When assigning an empty model to e.g. a ListView after component initialization has been completed, currentIndex is now correctly set to -1. Change-Id: I540c034944009ccb8894bf84f400658ef9f0371f Task-number: QTBUG-32838 Reviewed-by: Alan Alpert <aalpert@blackberry.com>
| * Marking tst_qquickgridview as insignificant in win and macxSimo Fält2013-08-161-0/+3
| | | | | | | | | | | | | | | | This test is flaky. Task-number: QTBUG-33017 Change-Id: I589706937a6de44291694029afb11c05a285c1cd Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
| * Marking tst_qquicktextedit as insignificant in winSimo Fält2013-08-161-0/+1
| | | | | | | | | | | | | | | | This test haven't passed in WIN after the stage was made blocking. Change-Id: I246f96e98080845c5364aba720158dbd42a5f454 Task-number: QTBUG-32540 Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
| * Merge remote-tracking branch 'origin/release' into stableSergio Ahumada2013-08-152-0/+4
| |\ | | | | | | | | | Change-Id: I3953f2473e3b2cf9768286fef1c5efd08c61c6f0
| | * Marking tst_qquickitem as insignificant in winSimo Fält2013-08-151-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | This test haven't passed in WIN after the stage was made blocking. Task-number: QTBUG-32664 Change-Id: I0e84ff202d28a018e3e04dcf15f3a9ce6c66349b Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
| | * Marking tst_qquickmousearea as insignificant on winSimo Fält2013-08-151-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | This test seems flaky in windows. Task-number: QTBUG-33006 Change-Id: I1c67e1a498e4c5765580a316504e04776af5e109 Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
| * | Unset the cursor when an Item is unparentedDaiwei Li2013-08-141-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's possible for a cursor to get stuck if an item gets deleted. QQuickItemPrivate::derefWindow sets the cursorItem in QQuickWindowPrivate to 0, but doesn't unset the cursor. This causes the cursor to get stuck until the user hovers their mouse over an item that has a cursor set. Change-Id: I1d5d3ff13d69c76e4f8fe86b1f5b669bb714ecca Reviewed-by: Alan Alpert <aalpert@blackberry.com>
| * | test: Mark tst_qqmlmoduleplugin::incorrectPluginCase() as XFAILSergio Ahumada2013-08-131-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | Mark incorrectPluginCase() as expected failure on OS X 10.8 Task-number: QTBUG-32652 Change-Id: I8fd2c0ceacabfc74defe84fc6538b268145c5110 Reviewed-by: Simo Fält <simo.falt@digia.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
| * | Fix hover event crashJosh Faust2013-08-122-0/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It was possible for a hover event to be sent to a QQuickItem that has already been scheduled to be deleted (through deleteLater()). This lead to an access on an already-freed object when the leave event is generated. This change ensures that the item is part of a scene before generating the hover enter event. Task-number: QTBUG-32771 Change-Id: I69adb6bbd0ae52c70a6bda4e6c918b7671549a4c Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* | | Fix tst_qquickfolderlistmodel flakiness using QSignalSpy::wait.David Faure2013-08-161-16/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The signal is emitted in a thread, so creating the spy afterwards is racy (due to isSignalConnected() at the beginning of QMetaObject::activate). Creating the spy before hand fixes the race, and using QSignalSpy::wait() leads to much smaller code, in addition. Note that the call to wait() itself isn't racy, even if it happens "after" the signal emission: the signal goes via the event loop so it will always be received by the main thread within the call to wait(), never before. In addition setPath() is called once upon creation, and again via the setProperty call. If we don't wait for the initial listing to happen, we're replacing it, and then folderChanged is never emitted. Change-Id: Iab7eada2e9db8ba710f05bc3b82941c782f36467 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | | test: Remove v8-private for tst_pointersSergio Ahumada2013-08-151-1/+1
| | | | | | | | | | | | | | | Change-Id: I60f98d1f3563d19e141439385e9d862590d8f63f Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | | Improve reliability of v4 debugger testsSimon Hausmann2013-08-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Sometimes the test hangs on shutdown. Don't wait for the finished signal to be emitted with an event loop, instead do the QThread equivalent of pthread_join: wait(). Change-Id: I3583e8366c08fc0446682d124d86df4ffa3290d3 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | | Fix Array.prototype.concatPeter Varga2013-08-141-5/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The following tests failed in the test262 test suite due to incomplete implementation: - ch15/15.4/15.4.4/15.4.4.4/15.4.4.4-5-c-i-1 - ch15/15.4/15.4.4/15.4.4.4/S15.4.4.4_A2_T1 - ch15/15.4/15.4.4/15.4.4.4/S15.4.4.4_A2_T2 - ch15/15.4/15.4.4/15.4.4.4/S15.4.4.4_A3_T1 Change-Id: I423e77fe3d34140a08c61efdc18c81ef251bc927 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | | Added an iterative version of factorial as a (performance) test.Erik Verbruggen2013-08-142-3/+23
| | | | | | | | | | | | | | | Change-Id: I2c64b84d060792c0a1b111b854495cafcf24db33 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | | Say hello to Qt.labs.settingsJ-P Nurmi2013-08-149-1/+1013
| | | | | | | | | | | | | | | Change-Id: Id4970555b2cbbc2df893dd6269fb8b884ce06e45 Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com>
* | | Merge "Merge remote-tracking branch 'origin/stable' into dev" into ↵Frederik Gladhorn2013-08-121-4/+4
|\ \ \ | | | | | | | | | | | | refs/staging/dev
| * | | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-08-121-4/+4
| |\| | | | | | | | | | | | | | Change-Id: Ibb584a2d7975996cd26514b82d1da2d447fcbebf
| | * | test: Adapt to Qt.platform.os rename ("mac" -> "osx")Sergio Ahumada2013-08-091-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Marking this test as QSKIP and also updating the JIRA task Task-number: QTBUG-32650 Change-Id: I9e98024bf50c43f96269c39d779803ae9c46168d Reviewed-by: Simo Fält <simo.falt@digia.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* | | | Improve reliability of tst_qqmlcomponent::onDestructionLookup auto test on ↵Simon Hausmann2013-08-122-1/+18
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Windows The test relies on exact garbage collection, which we can't offer anymore. But we can use the same tricks as in qqmlecmascript to improve the changes of a successful collect significantly. Change-Id: I7b3d7eca7a9bdb551a01a5a3da80549196c45f23 Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
* | | Fix tst_qqmlecmascript::scope() and behavioural compatibility with v8 based qmlSimon Hausmann2013-08-081-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the V8 based QML the global object would come _before_ the "QML global object", which is the QML context (wrapper). We had a bunch of tests that verify the exact scope chain and with this "compatibility" fix we can re-enable them. Also fix missing prototype setup for the console object. Change-Id: Ib3886f2d86472eb752a6ad1a2d8d89709548c5b4 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | | Fix another bug with automatic semicolon insertionSimon Hausmann2013-08-081-0/+5
| | | | | | | | | | | | | | | | | | | | | Avoid empty statements after else. Change-Id: Ia7782a3371bc79c7e93857aa252309d2824a5a9e Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | | Fix hasOwnProperty on various types wrapped in QMLSimon Hausmann2013-08-081-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Change semantics of Object::query to not walk the prototype chain but let the caller do that where needed (__hasProperty__) * Re-implement query in various places * Implement method_hasOwnProperty to fall back to query() if getOwnProperty failed * Fix missing prototype initialization in some qml wrappers, as well as missing base class calls to ::get() Change-Id: Ic2a702fd5ff3be2ff3c8317a8a24f99940a9594f Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | | Merge "Merge branch 'stable' into dev" into refs/staging/devSergio Ahumada2013-08-0620-154/+533
|\ \ \
| * | | Merge branch 'stable' into devSergio Ahumada2013-08-0520-154/+533
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: I06f79bcbde13c7b12905492a17dbcbb4a594e557
| | * | Fix tst_qquickpath not to use fuzzy compareRafael Roquetto2013-08-021-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On arm platforms, qreal == float. QPointF stores its coordinates internally on qreal variables (float on arm). When QPointF comparison takes place, a call to qFuzzyIsNull(float) will ultimately be triggered, causing the test to fail for some values, because the epsilon of 0.00001f is too small. In the particular case regarding BB10, the comparison between QPointF(100, 150) and QPointF(99.9999771, 150) is failing because of that. Change-Id: I53c8cfe7f8a975f6a015e7690702d3e5f05bc2f2 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
| | * | Fix tst_qquicktexteditRafael Roquetto2013-08-022-9/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Use showNormal() instead of show() to keep expected window sizes on fullscreen platforms. - Use consistent point size for hAlignVisual - Do not query for QQmlComponent::Loading on remoteCursorDelegate: when a new connection is established to the test http server, it will setup a single shot QTimer with a 500ms timeout that will trigger the reply to be sent back, making the call to sendDelayedItem() obsolete and reduntant. Also, it means that in some platforms, data will arrive back to the component before the check for QQmlComponent::Loading is executed, causing the test to fail since at this point the status will already be QQmlComponent::Ready instead. Change-Id: I6508c28fa55a1aa2ae5861922701a8c322342380 Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com> Reviewed-by: Wolfgang Bremer <wbremer@blackberry.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
| | * | Fix crash when changing non-cached source of image during animationMichael Brasser2013-08-012-0/+73
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Ensure deferred deletions are handled while syncing, otherwise texture might be deleted after sync but before deferred deletion is processed. Task-number: QTBUG-32513 Change-Id: Id276f536a5722a36baae815b7b550b574eeeb483 Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
| | * | Stabilize tst_qquickitem.Friedemann Kleint2013-07-311-85/+82
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instantiate windows and views on the stack or add QScopedPointer. Add waitForWindowExposed() after show(). Add diagnostic message. Task-number: QTBUG-32664 Change-Id: I190f2a0490b8333a7886a23e26582c6cb615df94 Reviewed-by: Simo Fält <simo.falt@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
| | * | Add diagnostic output to tst_qquickpathview::cancelDrag().Friedemann Kleint2013-07-311-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-32662 Change-Id: I62b53f94659be95b3bef86f853733998d4d882dc Reviewed-by: Simo Fält <simo.falt@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
| | * | Correctly update flickable visibleArea.heightRatio when geometry changesNils Jeisecke2013-07-312-0/+94
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Without this fix the visibleArea.heightRatio and widthRatio values were only updated on geometry changes when flicking was active. So when setting the flickable geometry to the content geometry and thereby disabling flicking the ratios were not updated. This could for example cause wrong scrollbar renderings. The ratios are now also calculated directly after accessing the visibleArea property for the first time. The new autotest covers both problems. Change-Id: I54ba606524557fb328a198c312c1f65eb125c5a3 Reviewed-by: Alan Alpert <aalpert@blackberry.com>
| | * | Fix tst_QQuickDrag::recursion()Rafael Roquetto2013-07-291-3/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Process events and handle number of move events correctly. Change-Id: I555582ad4e10d5c76bbdc8ce9203b8f5897d0f56 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
| | * | FolderListModel: Do not return invalid URLs like "file:" when navigating up.Friedemann Kleint2013-07-291-0/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-32139 Change-Id: I715b97eb85bc4235de6a2bb696131efae56477fd Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
| | * | Merge remote-tracking branch 'origin/release' into stableSergio Ahumada2013-07-264-39/+85
| | |\| | | | | | | | | | | | | Change-Id: Ibb0e597c0cd02732bae3ef0ccc31c3ef36c75584
| | | * Stabilize text tests that grab windows.Friedemann Kleint2013-07-254-39/+85
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add window flags to make sure window stays on top to tst_qquicktext::hAlignImplicitWidth() and tst_qquicktextedit::hAlignVisual(). Add diagnostic output. Determine the section size by checking the font size. Add more characters to line 2 to make it more discriminative. Task-number: QTBUG-32540 Change-Id: I19a74a775bf2663027ec211784870fd9f6547b48 Reviewed-by: Simo Fält <simo.falt@digia.com> Reviewed-by: Alan Alpert <aalpert@blackberry.com>
| | * | test: Remove insignificant mark from tst_touchmouseSergio Ahumada2013-07-261-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tests are passing nowaways on OS X. Task-number: QTBUG-27890 Change-Id: I2245801a44b9b6fd8773c91e2d5dd67f5a5b7373 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
| | * | test: Remove insignificant mark from tst_qquickgridviewSergio Ahumada2013-07-261-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tests are passing nowaways on OS X. Task-number: QTBUG-27890 Change-Id: Iddceb2f0641115f03e5116c38e95ae5772938248 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
| | * | Fix tst_qquicktextinput::remoteCursorDelegateRafael Roquetto2013-07-261-5/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Do not query for QQmlComponent::Loading on remoteCursorDelegate: when a new connection is established to the test http server, it will setup a single shot QTimer with a 500ms timeout that will trigger the reply to be sent back, making the call to sendDelayedItem() obsolete and reduntant. Also, it means that in some platforms, data will arrive back to the component before the check for QQmlComponent::Loading is executed, causing the test to fail since at this point the status will already be QQmlComponent::Ready instead. Change-Id: I30adeed2a669d5f6618f56d8a023fe7eaea16bc0 Reviewed-by: Wolfgang Bremer <wbremer@blackberry.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
| | * | Fix tst_qquickwindow for fullscreen platformsRafael Roquetto2013-07-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I040282f1bf1a2a8f212b9c7192a5ffaa2dbfdfb8 Reviewed-by: Wolfgang Bremer <wbremer@blackberry.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
| | * | Fix tst_rendernode for fullscreen platformsRafael Roquetto2013-07-251-1/+1
| | | | | | | | | | | | | | | | | | | | Change-Id: Ib82aef04b7748ecdf148c3d9ec60ad15b3dfd7cb Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>