aboutsummaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
...
| * | Fix qsTr() in .js contextJ-P Nurmi2013-12-043-31/+134
| | | | | | | | | | | | | | | | | | | | | | | | | | | Don't assume a four characters long file name suffix (.qml) Task-number: QTBUG-32850 Change-Id: I522c06b71bf1b38f32f2947a6c06017f83eb50be Reviewed-by: Michael Brasser <michael.brasser@live.com> Reviewed-by: Alan Alpert <aalpert@blackberry.com>
| * | Merge remote-tracking branch 'origin/release' into stableFrederik Gladhorn2013-12-031-0/+20
| |\| | | | | | | | | | Change-Id: I894ad7b4888744833f487b481950c087fa960a5c
| | * Ensure that QML Windows respect the default platform window stateTor Arne Vestbø2013-11-301-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The 'visible' property of a Window would be set on the baseclass QWindow like any other property during QML component creation, which would cause create() to be called and the platform window would be created. This left the 'visibility' of the QML window as Windowed, not respecting the platform defaults for how windows should be shown. The user would have to explicitly set "visibility: Window.AutomaticVisibility" for this default to apply, which doesn't make sense -- it should be the default. We solve this by deferring setVisible and setVisibility on the window until the component is complete and we have a full picture of its state. We then ask the platform for the default state based on the window flags (ensuring that eg "flags: Qt.Popup" will not result in maximized windows on iOS and Android), and apply the deferred visibility. The deferred visibility may still be 'false', but setting the window state makes sense anyways, so that a later "visible = true" will apply the default window state. Deferring platform window creation until the geometry has been potentially set from user code also has the benefit that the platform window can check the geometry and apply a default geometry if it's null. This was not possible when the 'visible' property was a regular property, as you could not know if the user's geometry changes would come after platform window creation. Task-number: QTBUG-35174 Change-Id: Icf3236187992048a85b2196c059f9b54699041a4 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com> Reviewed-by: Robin Burchell <robin+qt@viroteck.net> Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
| * | Set all attached section properties before emitting change signals.Martin Jones2013-11-302-0/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If we have bindings to the section properties, e.g. implementing manual section header creation, we want previousSection, section and nextSection to be set before emitting the change signals to prevent different results each time the binding is run. Change-Id: Id3a0b4a53419681f35102c9e7c620b5c6112ebb0 Reviewed-by: Martin Jones <martin.jones@jollamobile.com>
| * | When the MouseArea loses grab, an active drag should be cancelled.Robin Burchell2013-11-301-0/+52
| | | | | | | | | | | | | | | Change-Id: Icc784dd3265c211d9b077b692464591a41976354 Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com>
* | | Fix SpringAnimation in Behavior when current value is set.Michael Brasser2013-12-122-18/+113
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes regression introduced by d489f2f6549a86b3949004d1c8ec68487fc2adb7. We now only avoid running the animation if the Behavior wasn't already mid-animation. This ensure correct behavior for SpringAnimation, and also correct state for 'running'. Task-number: QTBUG-21549 Change-Id: I0f97813294cca22fb7a273e222fa0549c6de9ca7 Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com>
* | | Fix autotests expecting a trailing whitespace for qDebug streamKai Koehne2013-12-1210-18/+17
| | | | | | | | | | | | | | | | | | | | | | | | The behavior of QDebug was fixed in qtbase. Update autotests accordingly. Change-Id: I36c442fb772ba35b71b6ab50b5f77a3f9c1463e3 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | | Add displayMarginBeginning/End to ListView and GridView.Martin Jones2013-12-114-0/+244
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows displaying content outside the visible area of the view. [ChangeLog][QtQuick] Add displayMarginBeginning/End to ListView and GridView. Change-Id: Idf9b5a0cd34a781c9603a9ad98ea189754972ba1 Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com>
* | | Temporarily skip tst_qqmlinstruction::dump()Kai Koehne2013-12-051-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | Allow a change removing the trailing space for QDebug() to integrate. The test should be adapted right afterwards ... Change-Id: I758e7c416c5570aca58d92a040616ac8e4f131c9 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | | Behavior should not trigger when the tracked value has not changed.Michael Brasser2013-12-042-0/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Behaviors are specifically for animating changes in value. When the value has not changed, do not trigger the animation. This ensures the animation system is not unnecessarily woken. [ChangeLog][QtQuick][Behavior] Do not trigger a Behavior when the tracked value has not changed. Task-number: QTBUG-21549 Change-Id: I5b20121ccfb75ea5ebf86705df89891c94cf6e7e Reviewed-by: Robin Burchell <robin+qt@viroteck.net> Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com> Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com>
* | | Support toggling antialiasing for Text and Rectangle.Michael Brasser2013-12-032-0/+82
| | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-27968 Task-number: QTBUG-34366 Change-Id: Ic446ff4470abf21696e1764f902bd71e79762697 Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* | | Ensure correct horizontal alignment for implicit width multiline text.Michael Brasser2013-12-021-0/+4
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-30896 Change-Id: I5ca18ac67cf3640c97374d79f2546fc53698f86b Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com>
* | | Ensure correct horizontal alignment when onLineLaidOut is used.Michael Brasser2013-12-022-0/+38
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-34647 Change-Id: I07cb1f6f433d64c8889750a1fef06cd3b3bcc9e5 Reviewed-by: Andrew den Exter <andrew.den.exter@qinetic.com.au>
* | | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-11-296-102/+225
|\| | | | | | | | | | | Change-Id: I4e057bf60ac718aa359750ea417377580acbfc69
| * | Adapt tests to new events from qqmlprofilerserviceUlf Hermann2013-11-291-10/+10
| | | | | | | | | | | | | | | Change-Id: I59baa1f9aa0751d4bffc6eff0332318efc6fe9a8 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
| * | Fix JavaScript signal connect on alias without other handlersSimon Hausmann2013-11-292-0/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The changed handlers for aliases are connected lazily in the engine. QQmlPropertyPrivate::flushSignal is responsible for that and called in other places, for example when installing a onSomeAliasPropertyChanged handler. However we were missing a call to flushSignal when doing onSomeAliasPropertyChanged.connect(...), i.e. using the JavaScript connect API. Task-number: QTBUG-30493 Change-Id: Ia3f008626fd7af3f2cfbdd30d13fb83158bed4d5 Reviewed-by: Albert Astals Cid <albert.astals@canonical.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| * | tests: update tst_qquicktextinputLiang Qi2013-11-283-92/+140
| | | | | | | | | | | | | | | | | | | | | | | | | | | * add signal_accepted() with validator * update signal_editingfinished() with validator * cleanup many qWait() and etc Change-Id: Ic0a8f1cdc4f1f811501c06513efff9b6217fc749 Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com>
| * | TextInput: call fixup() when appropriateJ-P Nurmi2013-11-271-0/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [ChangeLog][QtQuick] Fixed TextInput to call fixup() on its validator when being accepted or losing focus, and the validator reports that the input is in "intermediate" state ie. the input should be fixed up. Task-number: QTBUG-35128 Change-Id: I4b15406c584a9647bcf892badfaf6d845868fbf1 Reviewed-by: Liang Qi <liang.qi@digia.com>
* | | Fix delivery of QEvents to QQuickItemsDaniel d'Andrada2013-11-291-0/+97
|/ / | | | | | | | | | | | | | | | | | | | | Make them go through QObject::event() and comply to filtering from objects passsed to QObject::installEventFilter() Task-number: QTBUG-32004 Change-Id: Ib6972e7f5e588bee986ae5f2d69aa6fccb58af95 Reviewed-by: J-P Nurmi <jpnurmi@digia.com> Reviewed-by: Alan Alpert <aalpert@blackberry.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* | Merge branch 'release' of ssh://codereview.qt-project.org/qt/qtdeclarative ↵Simon Hausmann2013-11-262-0/+58
|\| | | | | | | | | | | into stable Change-Id: I0bf06be69927d5961f1bdb4948c3572ef6111923
| * TextInput: add editingFinished signalLiang Qi2013-11-222-0/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Autotest is included. Task-number: QTBUG-34780 [ChangeLog][QtDeclarative][TextInput] add editingFinished signal Change-Id: Ib633daee67cd4e5f15739a6004adbe882ab3d3fc Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: J-P Nurmi <jpnurmi@digia.com> Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com> Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com> Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com>
* | Also update viewport size when header/footer size changesRobin Burchell2013-11-262-0/+49
| | | | | | | | | | | | | | Task-number: QTBUG-24292 Change-Id: I8e7f5abe077b6e8d2ce6625dcf43a34a7260934e Done-with: Martin Jones <martin.jones@jollamobile.com> Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com>
* | Tests: Enable TestHTTPServer to receive data in chunks.Friedemann Kleint2013-11-252-23/+39
| | | | | | | | | | | | | | | | | | Fixes tst_qqmlxmlhttprequest on Windows. Task-number: QTQAINFRA-573 Change-Id: Ie685cfa90904672246c1c5d8d3cec54c63cc76ba Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
* | Fix crash when assigning a null QObject or derived property as a ListView modelAndrew den Exter2013-11-242-0/+43
| | | | | | | | | | | | | | | | | | | | Fall through to the null case handler in the event of a QVariant of QObject or derived type with a null value, rather than asserting in the instance handler. Task-number: QTBUG-34999 Change-Id: I5eeffbe29a263c57e6157d516b138ddc8e2e7a95 Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* | Fix assert after giving focus to a disabled item.Andrew den Exter2013-11-221-1/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | If an item has focus stolen by another item remove activeFocus from it even if the item that gains focus doesn't gain activeFocus. Otherwise the focus tree will enter a state where an item that is not the subFocusItem of its focus scope has activeFocus which is invalid and will trigger an assert in QQuickWindowPrivate::clearFocusInScope(). Task-number: QTBUG-34779 Change-Id: I72408ec0e4fd9b05ef595147ef1ef95b6aed1c16 Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* | tst_qqmlxmlhttprequest: Use QScopedPointer.Friedemann Kleint2013-11-211-196/+99
| | | | | | | | | | | | | | | | Ensure resources are cleaned up in case of failing tests. Change-Id: Ie27800da37beac09fec34111af276ed029dcde20 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com> Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com>
* | Merge remote-tracking branch 'origin/release' into stableFrederik Gladhorn2013-11-2033-29/+655
|\| | | | | | | Change-Id: Id732233d56e8d1706f62ef7a153d4a471406c551
| * V4: fix Array.indexOf() for QStringListLiang Qi2013-11-202-0/+15
| | | | | | | | | | | | | | | | | | Autotest is included. Task-number: QTBUG-33542 Change-Id: I46c3a81006019c6613a3d35aa018217f85a15d0b Reviewed-by: Simon Hausmann <simon.hausmann@digia.com> Reviewed-by: Liang Qi <liang.qi@digia.com>
| * V4: remove failing assert and fix code.Erik Verbruggen2013-11-192-0/+26
| | | | | | | | | | | | | | | | | | | | Assert failed for cases where the node’s ancestor with lowest semi-dominator number was not the same as the parent. The test case exemplifies this. Task-number: QTBUG-34792 Change-Id: Ie6847b22a27211801bff7479bfcbfaf329c6005a Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
| * Fix failing assertion when trying to assign to an id referenced QML objectSimon Hausmann2013-11-192-0/+18
| | | | | | | | | | | | | | | | | | | | References to id addressed QML objects are member expressions, which are unlike other member expressions by not being lvalues. Handle this correctly. Task-Number: QTBUG-34890 Change-Id: Ied6230edbc561128ad36bf0d1a1918185204deec Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| * Make comparison of singletons and qobjects workAlbert Astals Cid2013-11-183-0/+120
| | | | | | | | | | | | | | | | | | | | | | Otherwise you can end up with some weird situation in which you have two objects, you print them and then you print the comparison and get a Foo(0x858480) b Foo(0x858480) a == b false Task-number: QTBUG-34651 Change-Id: Id2444d919f039be085eb5ed9112345db691540a5 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| * Fix interaction between head room and appending in arraysLars Knoll2013-11-181-0/+13
| | | | | | | | | | | | | | | | | | | | We reserve space on both ends of the JS array for appending and prepending. Make sure they interact well with each other and don't cause any memory corruption. Task-number: QTBUG-34853 Change-Id: I184280178690e3cb12ab9b199a8436b32383af38 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
| * Don't assert in QQuickItem::updateLars Knoll2013-11-182-0/+22
| | | | | | | | | | | | | | | | | | | | | | The method can actually be called from QML, so we can not have an assert in that method. Instead simply return if the item has no contents Task-number: QTBUG-34060 Change-Id: Ib28ffa5c6c63fbec956abe25020010ed73a9cfa9 Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
| * Limit the amount of memory we allocate on the stackLars Knoll2013-11-181-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Setup limits for both the C and the JS stack, and check them before entering functions. If we run out of space, throw a RangeError exception. Be careful and recheck the stack bounds when things go outside. This catches the case where the engine got moved to another thread changing the stack boundaries. Windows currently uses an unsafe fallback implementation, this needs to be fixed later on. Task-number: QTBUG-34568 Change-Id: I22fbcbec57b28f9cc8a49e12f1cc6e53e4f07888 Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
| * Don't call receivers from disconnectNotifyAlan Alpert2013-11-171-1/+2
| | | | | | | | | | | | | | | | | | | | | | A pending documentation update is going to explain that you can't call into QObject functions from disconnectNotify, or it may deadlock on the signalSlot mutex. Task-number: QTBUG-34829 Change-Id: I57e7b4e457d813d4255c8cdbe36228b2e0f45aaa Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| * Remove '-enable-debugger' argument from qml executableKai Koehne2013-11-165-7/+3
| | | | | | | | | | | | Task-number: QTBUG-34836 Change-Id: I3ab2a16036a1086c0ac1f50880a402caf9f54f2d Reviewed-by: Alan Alpert <aalpert@blackberry.com>
| * Do not crash when one of group animation's children is nullJacek Całusiński2013-11-153-0/+38
| | | | | | | | | | | | | | | | | | Check if pointer to QQuickAbstractAnimation for which we are setting group is valid. Task-number: QTBUG-34851 Change-Id: Iecb549f080804fd9489f884911fa51892def05a5 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| * Fix === operator for value typesLars Knoll2013-11-154-1/+69
| | | | | | | | | | | | | | | | | | Fix === comparison for urls and other QML value types. Task-number: QTBUG-33546 Change-Id: I4a7066e6bbc7de7c599fe2c7b2fdfb75e0ff5196 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
| * Fix stacking order bug in the rendererGunnar Sletta2013-11-152-0/+66
| | | | | | | | | | | | | | | | | | | | Since we are sorting batches based on the zorder of the first element it is crucial that we don't continue adding to batches once an overlap with a compatible element is found. Task-number: QTBUG-34864 Change-Id: Ic2194c5c17bba0bc9874a14e8a69c81bff75bd1c Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
| * Don't crash when trying to assign to null.propLars Knoll2013-11-153-0/+32
| | | | | | | | | | | | | | | | | | | | Fixes a regression introduced during the exception handling refactoring. Task-number: QTBUG-34544 Change-Id: Ib751274d759030db3e5d3b1380b30dc07ec85f83 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
| * Make tst_qqmlprofilerservice more robustKai Koehne2013-11-151-2/+3
| | | | | | | | | | | | | | | | Don't expect only application output to be printed. E.g. a stray qDebug somewhere in Qt could break this test so far ... Change-Id: Ibdc31fba3bd8d822c264bd44515d16e648db9a8e Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| * Don't dereference a null animationTemplateLars Knoll2013-11-142-0/+32
| | | | | | | | | | | | | | | | | | | | If the SpringAnimation gets used inside a Transition, the animationTemplate might get cleared, but updateCurrentTime() still gets called on the SpringAnimation after that. Task-number: QTBUG-34539 Change-Id: I1f27fdbfc594e6ff9a4343e45f7f4001964bb012 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
| * V4 debugging: Fix instable test.Erik Verbruggen2013-11-141-2/+2
| | | | | | | | | | | | | | | | | | Request the scripts after hitting a breakpoint. The reason this test could fail before, is that the engine might be calling into the debugger even before any script was loaded. Change-Id: Iba49f445ab97afaf2bb168b04063432ca2f9dddd Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| * Allow passing qmlRegisterSingletonType QObjects to C++ as QObject*Albert Astals Cid2013-11-144-0/+99
| | | | | | | | | | | | | | | | | | | | | | | | | | At the moment you can pass them as their FinalType* or as one of their ParentType* but not as QObject* which does not make much sense to me Task-number: QTBUG-34617 Task-number: QTBUG-30730 Change-Id: Id5cfb7bbb123456ef43f44f33b450f8966a7641a Reviewed-by: Alan Alpert <aalpert@blackberry.com> Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
| * Make tst_nodes use QSGRenderLoop to behave more like QQuickWindowGunnar Sletta2013-11-131-6/+14
| | | | | | | | | | Change-Id: I284164a45cabdb9f1fdbc2050db0cb00810ce946 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
| * Revert ffaf39e9a7f11d4e2800b3b37160a2a952795614Alan Alpert2013-11-131-1/+1
| | | | | | | | | | | | | | | | | | Making it public right now seems a little premature, given all the work happening on the engine now (and for 5.3). We'll be in a better position to commit to it or not next release. Change-Id: Ib7b14afeb9205fb8a87ed16a6d38b1f468b2bbbb Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| * Polish up QQmlFileSelectorAlan Alpert2013-11-132-9/+20
| | | | | | | | | | | | | | | | Incorporate beta feedback, and hide QQmlAbstractUrlInterceptor as the implementation (instead of making that "the API"). Change-Id: Ib7b14afeb9205fb8a87ed16a6d38b1f468b2aaaa Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| * V4 IR: scan arguments when entering function scope in QML.Erik Verbruggen2013-11-122-0/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | When doing IR generation for a function declaration in a QML object, call through the helper methods to check for forbidden names, and most importantly, also checks if the function has parameters. If the latter is the case, they need to be added as a member for the current scope in order to get IR generation correct. Task-number: QTBUG-34493 Change-Id: I0ade15ee19e1b1ac8ee2f2d3fa186d1551800199 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| * V4: fix loop block marking for initializer blocks.Erik Verbruggen2013-11-122-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Any new blocks generated as part of the initializer were incorrectly marked as belonging to a loop. For example, if a LocalForStatement would contain a ternary expression, the generated then and else blocks would be marked. This would confuse the block scheduling, because all blocks are postponed unil the condition block (“group start”) is scheduled. Task-number: QTBUG-33754 Change-Id: I45919ebeac356f015bb91fe0210472b3df0b56d8 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | Stabilize tst_qpauseanimationjobFrederik Gladhorn2013-11-201-34/+17
| | | | | | | | | | | | | | | | | | This test is highly timer dependent and contains so many windows special cases that indicate problems (when timers are not accurate or the machine is busy). Change-Id: Ie057d560d39300252ffb6c19b4d1446179c0e56a Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>