aboutsummaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* bic: Add 5.{3,4}.0 bic data for QtQuickWidgetsSergio Ahumada2015-03-023-3/+43036
| | | | | | | | this is a new module since Qt 5.3 Change-Id: I9d33ba8f046190f649643302ddc343cbe6e649ed Reviewed-by: Liang Qi <liang.qi@theqtcompany.com> Reviewed-by: Sergio Ahumada <sahumada@texla.cl>
* Fix QML Timer running not being updated together with triggered signalTroels Nilsson2015-02-111-0/+64
| | | | | | | | | | | | | | | | | | The running property of the QML Timer should be updated at the same time as the triggered signal is emitted, otherwise code like e.g. the following: if (qmlTimer.running) { qmlTimer.stop() } doesn't work as expected. In addition if the timer is stopped or restarted between posting the QEvent_Triggered event and receiving it, the triggered event should not be emitted. This avoids the issue of stopped timers still emitting the triggered signal which can potentially cause problems in existing code. Task-number: QTBUG-44026 Change-Id: Ia14d80d152967d09adc1586467715b2e1c6662cc Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* bic: Add/Replace 5.{0,1,2,3,4}.0 bic data for linux-gcc-amd64Sergio Ahumada2015-02-1121-46978/+145578
| | | | | | | | | Remove the ia32 data since there are no linux x86 machines in the CI system (which makes the data useless from an automated testing point of view) and most people use x64 these days anyway. Change-Id: I6aa1106bf6406c8338e2ffcf89436338c19b1ee5 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Replace blog.qt.digia.com with blog.qt.ioSergio Ahumada2015-02-061-2/+2
| | | | | | Change-Id: I2518576bbe2ca9f68928973ea83b9e58084b91e3 Reviewed-by: Tero Kojo <tero.kojo@theqtcompany.com> Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* Fix Text wrapping when growing from 0 width.Michael Brasser2015-02-032-0/+27
| | | | | | | | The fix for QTBUG-30896 caused a regression in the test case. Now check both width and implicit width validity before resetting widthExceeded. Change-Id: I4aba2aad299746906cfe20e288fa60cfe2acc64f Reviewed-by: Andrew den Exter <andrew.den.exter@qinetic.com.au>
* Verify context creation in Quick tests.Friedemann Kleint2015-01-293-10/+24
| | | | | | | | Verify initialization steps and initialize pointers to avoid crashes. Change-Id: I2d3a53c6719727aed56e673d0d8cf5a02ae0f0f6 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* Ensure that Canvas has the correct size with complex bindings.Mitch Curtis2015-01-281-1/+37
| | | | | | | | | | | | | | | | | | | | | | | | When a Canvas is a child of an item with certain width and height values (as described in the bug report), it won't paint correctly. For example, the order of events might occur like so: 1. Canvas width set to 1 2. Canvas height set to 1 3. Canvas width set to 32, which causes the height to also be set to 32 Every size change causes QQuickCanvasItem::geometryChanged() to be called, but the third event above causes it to be called recursively, such that the most nested call results in the size being 32x32, but then the execution returns to the first call and 32x1 is used instead, overwriting the correct size. We fix this by setting the new canvas size to width() and height(), ignoring the recursion and instead using the latest size of the item. Change-Id: Iebbcbfaa3217319b32b97f6b68f7a8af197a0e89 Task-number: QTBUG-42878 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* Canvas: don't crash when getContext("2d") is called on destruction.Mitch Curtis2015-01-262-0/+51
| | | | | | | | | | | | | | | | | | | | We'd assume that a Window existed when that's not always the case. For example: import QtQuick 2.4 import QtQuick.Window 2.2 Window { Loader { sourceComponent: Canvas { Component.onDestruction: getContext("2d") } Component.onCompleted: active = false } } Change-Id: I5f30876e21ced5658adfa3bac494fd4196e0a7e3 Task-number: QTBUG-42222 Reviewed-by: Ulf Hermann <ulf.hermann@theqtcompany.com>
* Fix failing assertion in debug builds for JS that calls constantsSimon Hausmann2015-01-151-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | For true() we generate IR that looks like this: temp = true result = call temp() and therefore the move at isel time has IR::Call as source and a temp as base for the call. However constant propagation in the optimizer transforms this to result = call true() and that's a case we didn't handle in the IR visitor. Since we have Runtime::callValue we can however handle this case as well and the run-time will consequently produce the expected run-time error. Change-Id: Ia94a8116388e66f9f339913307f68e33a5c18a19 Task-number: QTBUG-43819 Reviewed-by: Robin Burchell <robin.burchell@viroteck.net> Reviewed-by: Jan Kundrát <jkt@kde.org> Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
* TextEdit: fix construction time text cacheJ-P Nurmi2015-01-081-0/+12
| | | | | | | | | | | QQuickTextEdit does not apply cached text to the underlying document until component construction is complete. However, if text() was called during the construction (eg. because of a binding), it would blindly overwrite the cached text with (still) empty document content. Task-number: QTBUG-41583 Change-Id: I6c5c1b6283d70d8a5ec2c8bd986095ee3c35a14c Reviewed-by: Pierre Rossi <pierre.rossi@theqtcompany.com>
* Parse dates as Qt::RFC2822Date tooAlbert Astals Cid2015-01-082-1/+8
| | | | | | | | [ChangeLog][QtQml] Fix JavaScript Date parsing to correctly accept RC2822 dates. Task-number: QTBUG-38011 Change-Id: Ic7d3f5b8c624d6780d4c3595fd2efe22c427ffd3 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* V4: fix reverse type propagationErik Verbruggen2014-12-181-2/+2
| | | | | | | | | Only do integer add/sub/mul when all operands are known to be integers. [ChangeLog][QtQml] Fixed invalidly opportunistic truncating of non-integer values for additions/subtractions/multiplications in JavaScript and binding expressions. Change-Id: I21b3bede2fb3e8033305591110b98cc9e6bf52f8 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* V4: only optimize out to-int32 conversions when the operands are int32.Erik Verbruggen2014-12-181-0/+12
| | | | | | | | | The operands of bit-ops are not typed as int32 when no type-inference is done, like for the interpreter. Task-number: QTBUG-43309 Change-Id: I67af18e14ddbc0649530ac23601332ee7d7a1f34 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Change Qt bugtracker URL to qt.ioAlex Blasche2014-12-162-2/+2
| | | | | | Change-Id: I3dde034b2a36c324df9f4e1fd2e05a07a7237c04 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* QML Debugging: Fix breakpoints/stepping in a with-statement.Erik Verbruggen2014-12-101-0/+18
| | | | | | | | Also fix the stack-trace generation, otherwise the debugger engine would report a breakpoint hit on the wrong line. Change-Id: I6eb4b508fbdca64d03badd8f9312a05c78781ded Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* QML Debugging: Fix crash when stepping through try-catch block.Erik Verbruggen2014-12-091-0/+20
| | | | | | | | | Also fix the stack-trace generation, otherwise the debugger engine would report a breakpoint hit on the wrong line. Task-number: QTBUG-42723 Change-Id: I1f655a5174b28a1c9c31c85bbe023fbce5ddbb96 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* QML: fix warning in testsErik Verbruggen2014-12-091-1/+7
| | | | | | | | Mark unused fields as Q_UNUSED. They are still "used" to check if the compiler will generate warnings/errors (which it shouldn't). Change-Id: I38e1668e88d94ab8f26a92a06f5207b77369e136 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* QML: fix warning in testsErik Verbruggen2014-12-091-23/+0
| | | | | | | Remove unused function that wouldn't be emitted anyway. Change-Id: I623d5d44bca9a1358cf9e66ff557992aba9ae451 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* QML: fix warning in testsErik Verbruggen2014-12-091-1/+0
| | | | | | | Remove unused constant. Change-Id: I3fb3512f7ea54102450eeeda1a56c73fe6b26025 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Merge "Merge remote-tracking branch 'origin/5.4.0' into 5.4" into ↵Simon Hausmann2014-12-0972-71/+76
|\ | | | | | | refs/staging/5.4
| * Merge remote-tracking branch 'origin/5.4.0' into 5.4Simon Hausmann2014-12-0572-71/+76
| |\ | | | | | | | | | Change-Id: I5978bab8a4fde4c2ee33907fd81f49cb69e4fb26
| | * qttest: make findChild available only for QtTest 1.1Fawzi Mohamed2014-12-0571-71/+71
| | | | | | | | | | | | | | | Change-Id: I4ceb1a969bd4296b82f899088b02b5e8cf100bcd Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
| | * Add string::arg method in installTranslatorFunctionsKai Koehne2014-12-051-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QJSEngine::installTranslatorFunctions install the translator functions to any given JS object. However, the custom string::arg() method is only added in qqmlbuiltinfunctions.cpp, making the use of qsTr() in other pure-JS programs quite hard. Task-number: QTBUG-43113 Change-Id: Ia9ed97a4c07a4d167c792f3ea13e4f6e96c97423 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | | QML: fix warning in testsErik Verbruggen2014-12-091-2/+0
| | | | | | | | | | | | | | | | | | | | | Remove unused class field. Change-Id: I90981546e33d4839a91c418a8746e6f2ebc3bf46 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | | Quick: fix testErik Verbruggen2014-12-091-1/+1
|/ / | | | | | | | | | | | | | | | | /Users/erik/dev/qt5-stable/qtdeclarative/tests/auto/quick/qquickgridview/tst_qquickgridview.cpp:1561:60: warning: adding 'int' to a string does not append to the string [-Wstring-plus-int] items << qMakePair(QString("new item " + j), QString::number(j)); ~~~~~~~~~~~~^~~ Change-Id: I94bd952abf82a8f174772482330b5fdd636578ad Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | Fix QtQuick2 module unload supportChris Adams2014-12-044-0/+208
| | | | | | | | | | | | | | | | | | | | | | | | | | This commit ensures that the value type providers installed by the QtQuick2 QML module during initialization are uninstalled when the plugin is unloaded. It also fixes a bug in the type compiler so that it now works with types from plugins which get unloaded and then reloaded. Task-number: QTBUG-43004 Change-Id: I4b3fb75aae65dfbc5de9c88701ed82514087ab7d Reviewed-by: Matthew Vogt <matthew.vogt@qinetic.com.au>
* | Fix conditional breakpoints in QMLSimon Hausmann2014-12-031-0/+39
| | | | | | | | | | | | | | | | | | | | We need to set "inheritContext" to true for the QV4::Script that's used during conditional break point evaluation, because that will also disable fast property lookups, which is still required for QML lookups to work. Change-Id: I8976df1c827b5058eae9bdce6e86e5ea856cbfe1 Task-number: QTBUG-43018 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | Fix expression evaluation in specific frames in the debuggerSimon Hausmann2014-12-031-0/+44
| | | | | | | | | | | | | | | | | | | | | | | | Expressions from the QML/JS console are intended to be executed in a specific frame / context. However that wasn't implemented properly, we should pop the current context frameNr times. [ChangeLog][QtQml] Fix inspecting objects in QML/JS console in different frames. Change-Id: If575d4005c52a9fe6805538a7b1a02b9e32049d6 Task-number: QTBUG-42831 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | Merge remote-tracking branch 'origin/5.4.0' into 5.4Simon Hausmann2014-12-021-0/+5
|\| | | | | | | Change-Id: I89bbb2977350a03c156d531f810d08a5560ffbb3
| * Skip tst_qquickwindow::headless() when using ANGLE/Windows.Friedemann Kleint2014-12-021-0/+5
| | | | | | | | | | | | | | | | | | The test crashes frequently. Task-number: QTBUG-42967 Change-Id: Ic17c6187bfa657154a9b04eb9c5b9a3de291cb1e Reviewed-by: Andrew Knight <andrew.knight@theqtcompany.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* | Stabilize tst_qquickflickable.Friedemann Kleint2014-11-281-4/+20
|/ | | | | | | | | - Use one engine per test - Use QQuickView for the margins test - Verify QWindow cleanup. Change-Id: Id2a10b56101832c362822963a2a7bd1d66daa143 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* QQuickWindow autotest: verify that onClosing can block close()Shawn Rutledge2014-11-071-0/+20
| | | | | | Task-number: QTBUG-40093 Change-Id: I800259f45d95736172d500494e68042180178e93 Reviewed-by: Caroline Chao <caroline.chao@theqtcompany.com>
* Inspector: Do not assert when trying to stream QModelIndexKai Koehne2014-11-071-1/+39
| | | | | | | | | | | | | | | | | | | | Some QVariant's like QModelIndex cannot be streamed in a meaningful way: QDataType::save() will return false for them. However, this leads to a qWarning and Q_ASSERT in QVariant::operator<<(). To prevent this we're calling QDataType::save() manually beforehand. We however throw away the result if it succeeds, and still call QVariant::operator<<() to get the benefits of the QDataStream version handling. The alternatives would be to make QVariant::operator<<() not assert, or blacklist all known types with problems manually. Both seem to be difficult though ... Change-Id: I4f5fe6d5a3a076c24fbc73371a4d12d720de53da Task-number: QTBUG-42438 Reviewed-by: Ulf Hermann <ulf.hermann@theqtcompany.com> Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Stabilize tst_QQuickAccessibleJan Arve Sæther2014-11-061-4/+0
| | | | | | | | There is no reason to wait for the window to activate Task-number: QTBUG-42355 Change-Id: I5faaff5bddd367e6dd57a6a922011c87c847148e Reviewed-by: Tony Sarajärvi <tony.sarajarvi@digia.com>
* Add attached Window::contentItem propertyJ-P Nurmi2014-11-052-0/+4
| | | | | | | | | This is essential to the Qt Quick Controls for implementing floating text selection handle popups. Change-Id: Ibae65110a5db6d65dacd197fef3ad567d11342dc Reviewed-by: Alan Alpert <aalpert@blackberry.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* text input: always let cursor rect have a width == 1Richard Moe Gustavsen2014-10-301-0/+21
| | | | | | | | | | | | | | | | Instead of using a cursor width of null when a cursor delegate is set, we should to use a value of 1. Otherwise the rect we e.g return from cursorRect() will be invalid. An alternative would be to use the width of the delegate, but that was found to be controversial. On iOS we saw a bug with this when telling iOS to position text spelling popups underneath the cursor. Since the cursor rect we got was invalid (zero-width), no popup would show. Change-Id: Ice51b9a1bd33f331183e3acec61b7d9c0f5163cd Reviewed-by: Andrew den Exter <andrew.den.exter@qinetic.com.au>
* Repeater & itemviews: fix setModel() JS array handlingJ-P Nurmi2014-10-294-0/+114
| | | | | | | | | | | | QVariant comparison in setModel() started failing because JS arrays are now passed as a QJSValue. Re-assigning the same array content should not trigger a model change. This change restores the old behavior it had before, when JS arrays were passed as QVariantLists. Change-Id: I1882b3531f2893b116dbd817edeecab1ae812ce8 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Remove mouse grabber if touch used for mouse emulation has been grabbedDaniel d'Andrada2014-10-292-10/+97
| | | | | | | | | | | | | | | | | | | | If an item grabs a touch that is currently being used for mouse pointer emulation, the current mouse grabber should lose the mouse as mouse events will no longer be generated from that touch point. Example of what happens without this patch: -User touches a MouseArea. It gets pressed. -Some other item grabs that touch. -This touch eventually ends. -The MouseArea would still be pressed. And what will happens instead after this patch: -User touches a MouseArea. It gets pressed. -Some other item grabs that touch. -The MouseArea gets canceled and released -This touch eventually ends. Change-Id: I24114f18be564553a4a768243bb20379affe7a8f Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* Move action handlers to the Accessible attached objectJan Arve Saether2014-10-271-3/+2
| | | | | | | | | | | | | | | | | | | | With this change, instead of writing: function accessiblePressAction() { submit() } You should write: Accessible.onPressAction: { submit() } For the moment, only 4 actions are added: press, toggle, increase and decrease. The old style action handlers are deprecated, and removed from the documentation. New style action handlers will be preferred in case an item declares both styles. Change-Id: I11919e631d8476d55540f94252757b911c44ade4 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
* Properly handle negative years when printing JS Dates to strings.Ulf Hermann2014-10-242-0/+25
| | | | | | | | | | JavaScript knows a year 0. That is correctly translated into QDateTime terms when creating a Date object, but it's not correctly translated back when converting the JavaScript date to a string. Task-number: QTBUG-29491 Change-Id: I46b200a144434187656d08e87f422f97523acd0e Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Fix syntax error when trying to declare read-only object propertiesSimon Hausmann2014-10-243-0/+29
| | | | | | | | | | | | | | | | | | | | The grammar did not allow for the declaration of readonly property QtObject foo: QtObject { ... } and it required a workaround through an alias: readonly property alias foo: _foo property QtObject _foo: QtObject { ... } This was merely a glitch in the grammar, I see no reason not to support this. The semantics are like a const pointer in C++, the property itself is read-only but the object pointed to has per-property defined read/write semantics. Task-number: QTBUG-41971 Change-Id: I99e2e7ed58731e387a38e46ec39922d280a21ceb Reviewed-by: Michael Brasser <michael.brasser@live.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Fix crash in SpriteSequenceAlex Blasche2014-10-243-0/+146
| | | | | | | | | | When QML declares sprites and goalSprite in wrong order the goalsprite attempts to set it on null spriteEngine. This patch ensures that the order doesn't matter anymore. Task-number: QTBUG-40595 Change-Id: I57f1c8754b2e2af91e0c7f72d1d67fec3ad4ede5 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Relayout rich text when width increasesEskil Abrahamsen Blomfeldt2014-10-231-0/+29
| | | | | | | | | | | | | | | | | | | In updateSize() we were trying to force relayouts for RichText when the width changes by always setting widthExceeded to true. But further down in the same function, we overwrote this with textWidth() < idealWidth(), which doesn't work, because both properties are the wrapped width of the document and should only differ if the text cannot be wrapped properly. The result was that when increasing the width of a Text element, we would hit the optimization and skip the relayout. [ChangeLog][Text] Fixed Text with the RichText format to correctly update wrapping when the width of the element grows. Change-Id: I5fd87052a5ba7e8ee2549be0cfac4adc8ddf8290 Task-number: QTBUG-33020 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Fix assignment to QObject pointer propertiesSimon Hausmann2014-10-231-0/+28
| | | | | | | | | | | This commit ammends 59ed8c355b99df0b949003a438ab850274261aa0 to always query the Qt meta-type registry to retrieve the QMetaObject for a QObject pointer type. Change-Id: I70d876a5acfa23967fd1a57c96fcd5ac853eaf49 Task-number: QTBUG-39614 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com> Reviewed-by: Ulf Hermann <ulf.hermann@digia.com>
* Screen attached property: expose devicePixelRatio propertyShawn Rutledge2014-10-232-0/+3
| | | | | | | Change-Id: I08b22766b3e389b7d27ca4c56729f550b0647a08 Reviewed-by: Jens Bache-Wiig <jensbw@gmail.com> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com> Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* Fix line ending for test fileKai Koehne2014-10-221-10/+10
| | | | | | Task-number: QTBUG-40574 Change-Id: If1fcc4cb00c8e477b3afff92eb4a3099424fcfa6 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Support Accessible.ignored on non-leaf itemsJan Arve Saether2014-10-214-4/+166
| | | | | | | | | | Ignoring items with children will make the children appear as children of the parent of the ignored item. Since setAccessibleFlagAndListener now only sets the flag we also rename the function to just setAccessible Change-Id: I79fc311509a3e454b4698274c63ad0e879fb93e3 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
* Check list property before component when validating bindingsUlf Hermann2014-10-213-0/+14
| | | | | | | | | There are lists that won't accept a component as element. For example QQuickItem's children will only accept QQuickItems. Task-number: QTBUG-41848 Change-Id: I0fc7b0d1a4770d596caf681be92dff216f48d32b Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* qmlstatemachine: Rename StateBase to StateKevin Funk2014-10-218-34/+34
| | | | | | | | | | | | As discussed with Brett Stottlmyer and Alan Alpert. Add a section about the implications when importing both QtQml.StateMachine and QtQuick in one single QML file. Change-Id: I8755f4b578e2a6ff4c2377c7a8a0b996ba9b7129 Reviewed-by: BogDan Vatra <bogdan@kde.org> Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Make test more robust against ignored children.Jan Arve Saether2014-10-204-33/+84
| | | | | | | | With the upcoming change that changes the semantics of Accessible.ignored, some assumptions in the test does not hold anymore. Change-Id: I9b34f1ecc61fc0d4e8abe5a5505a5bcff44501d4 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>