aboutsummaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* Default to threaded when using opengl32Laszlo Agocs2014-12-121-1/+11
| | | | | | | | | | | | | | | | | | This appplies only when using opengl32.dll. When using ANGLE or when using another non-opengl32 DLL, the "windows" single-threaded loop is chosen, just like before. One badly written autotest is fixed. We must never assume that performing some QQuickWindow related work will leave a context current on the main thread. The assumption worked by accident with the single-threaded render loop. [ChangeLog][QtQuick] Changed to use the threaded render loop by default on Windows when running with desktop OpenGL (opengl32.dll). Change-Id: I21798622c19ca510a97a96c19c1e70e29f086e3a Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
* Remove QML bundle codeSimon Hausmann2014-12-1221-416/+0
| | | | | | | | | | This feature is effectively not maintained, experimental and undocumented. Consensus on the mailing list is to remove it: http://lists.qt-project.org/pipermail/development/2014-December/019384.html Change-Id: Iaa73b3e90806c338ef81bbd4307ddd2addd37964 Reviewed-by: Christopher Adams <chris.adams@jollamobile.com>
* Better encapsulate access to the global objectLars Knoll2014-12-111-1/+1
| | | | | Change-Id: I8a76112d821cb3fc172ba0d16ee8410d39b4422a Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Encapsulate accesses to the root contextLars Knoll2014-12-112-4/+4
| | | | | Change-Id: I668cef1363a5c1a5c5b9a7e138f3bd0338712eea Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Merge remote-tracking branch 'origin/5.4' into devSimon Hausmann2014-12-0985-107/+456
|\ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/qml/jsruntime/qv4arraydata.cpp src/qml/jsruntime/qv4context_p.h src/qml/jsruntime/qv4globalobject.cpp src/qml/jsruntime/qv4internalclass.cpp src/quick/items/qquicktext_p.h src/quick/items/qquicktextedit_p.h src/quick/items/qquicktextinput_p.h Change-Id: If07e483e03197cb997ef47a9c647a479cdb09f4c
| * 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>
* | Fix crash with when evaluating bindings with QQmlExpression that throw ↵Simon Hausmann2014-12-051-0/+10
| | | | | | | | | | | | | | | | | | | | | | exceptions We must handle a thrown exception and cannot pass the undefined value back to QV8Engine::toVariant. Change-Id: Ia466b175706dccd513895ef5bb166b811fbdc26b Task-number: QTBUG-41860 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | QmlDebug: Allow tests to ignore a number of bind errorsUlf Hermann2014-12-052-4/+17
| | | | | | | | | | | | | | | | Like this we can effectively test the port range feature of the debug server. Change-Id: Id0d0b47525177f0cfbb8c35a267962a82338f047 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | QmlDebug: Test the debugging enablerUlf Hermann2014-12-054-1/+324
| | | | | | | | | | Change-Id: I7c9aff4474850139fe96afc4b300fa0e2ded8874 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | Skip failing test temporarilySimon Hausmann2014-12-051-0/+3
| | | | | | | | | | | | | | | | Skip this until commit 155306ffee1941194d44dd632a7993fce4a05606 from qtbase has hit the dev branch through merges. Change-Id: I3e58d288fcc45c511bc1b8b4e7dbb6c41d367eba Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* | Remove the executioncontext in a few more places where it's not neededLars Knoll2014-11-211-7/+4
| | | | | | | | | | Change-Id: I4c92c7bc9d94d8265e306f45d863fdc080a5e2a6 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | Allow setting the source rect on QSGSimpleTextureNodeJocelyn Turcotte2014-11-191-0/+58
| | | | | | | | | | | | | | | | This allows the QtQuick 2D Renderer to get this information without having to extract it from the QSGGeometry. Change-Id: Iec99c4bc910fea9c7d0e6712a418787254a70cb2 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
* | Change test data from 6.7 to 6.5Thiago Macieira2014-11-182-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | 6.5 is an exact binary number (4 + 2 + 0.5), so all conversions to string will result in "6.5", regardless of how many digits of precision are used. This is done in advance of changing QVariant to add more digits of precision, which would cause toString() of 6.7 to result in "6.7000000000000002". Change-Id: I19ea4c5bb02b99f0655c0b9bc9dc09f06ec654e5 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | Cleanup exception catching codeLars Knoll2014-11-151-6/+6
| | | | | | | | | | Change-Id: I85afd5758f72e19c280dc196601ee145f0c25f01 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | QQuickRepeater::clear: Remove items from the end backwards.Robin Burchell2014-11-072-0/+69
| | | | | | | | | | | | | | | | | | | | | | This way, the indices for itemRemoved will make sense consistently. This was broken with 5f5aba5b6e690ca54e66f41b93474f7e67e83c8b, dated November 2011. Task-number: QTBUG-42243 Change-Id: I5fecfd4174049f51e0cec90e40e6332de5d5bf01 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* | Move the throw methods from ExecutionContext to ExecutionEngineLars Knoll2014-11-041-1/+1
| | | | | | | | | | | | | | | | The methods don't require a context, and thus shouldn't be implemented there. Change-Id: If058e0c5067093a4161f2275ac4288aa2bc500f3 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | Cleanup header file dependenciesLars Knoll2014-11-041-0/+1
| | | | | | | | | | Change-Id: Ibb4658576a98b53de2eac2474ce4d5b9eb83b6ae Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | Merge remote-tracking branch 'origin/5.4' into devSimon Hausmann2014-10-317-10/+232
|\| | | | | | | Change-Id: I30f9c925631991ceb22339d1333936faecffbaf4
| * 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>
* | Merge "Merge remote-tracking branch 'origin/5.4' into dev" into refs/staging/devLars Knoll2014-10-3046-148/+707
|\ \
| * | Merge remote-tracking branch 'origin/5.4' into devFrederik Gladhorn2014-10-2946-148/+707
| |\| | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/quick/items/qquickaccessibleattached_p.h src/quick/items/qquickwindow.cpp src/quick/scenegraph/qsgthreadedrenderloop.cpp Change-Id: I8bf07487a75f9d1b0d6efa5914dd06875fc9654d
| | * 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>