aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/quick/qquicktext
Commit message (Collapse)AuthorAgeFilesLines
* Fix autotests for change in QtNetworkDaniel Molkentin2015-11-291-1/+1
| | | | | | | See change 4efa50a5e37497bc3a3dd30f27db7d8100e3f6a5 in qtbase Change-Id: I00e5e529faed029bc3bc461a3b1807811d33c769 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Move QQuickTextDocumentWithImageResources out of qquicktext_p_p.hJ-P Nurmi2015-10-291-0/+1
| | | | | | | | | | | | | | QQuickTextDocumentWithImageResources was autotest-exported in b63185. The problem is that the QQuickLabel in qtquickcontrols2 inherits QQuickText, and therefore includes the private header. An autotest- exported class with Q_OBJECT macro leads to a linking error: qquickcontrol.obj : error LNK2019: unresolved external symbol "public: static struct TestNamespace::QMetaObject const TestNamespace::QQuickTextDocumentWithImageResources::staticMetaObject" (?staticMetaObject@QQuickTextDocumentWithImageResources@TestNamespace@@2UQMetaObject@2@B) referenced in function "public: static class TestNamespace::QString __cdecl TestNamespace::QQuickTextDocumentWithImageResources::tr(char const *,char const *,int)" (?tr@QQuickTextDocumentWithImageResources@TestNamespace@@SA?AVQString@2@PBD0H@Z) qquicklabel.obj : error LNK2001: unresolved external symbol "public: static struct TestNamespace::QMetaObject const TestNamespace::QQuickTextDocumentWithImageResources::staticMetaObject" (?staticMetaObject@QQuickTextDocumentWithImageResources@TestNamespace@@2UQMetaObject@2@B) ..\..\lib\Qt5LabsTemplatesTestInfix.dll : fatal error LNK1120: 1 unresolved externals Change-Id: I7e8731973c4ad67fca40f87bf009dc55336c3d6f Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Fix autotestsLars Knoll2015-09-143-8/+8
| | | | | | | | | | | | | | | | | | | Commit 35793cea28c4bd1d6d8fbae884d9ae3c19745c61 caused changes to font metrics on Mac when running our autotests. This change adjust auto tests to pass again after the change. Fix QQuickText::fontSizeMode autotests. The calculations are font dependent, and with small differences in the fonts between different OSes it's difficult to find values that work everywhere. Also fix the baseline calculations for some items that were using the wrong fonts (exchanging empty and non empty calculations). Fix language dependent differences on metrics calculations in tst_qquicktextinput. Change-Id: I7d0c7c79c8c62a4619b2f0e95ef53660b7feb782 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
* tests/quick: Replace Q[TRY]_VERIFY(a == b) by Q[TRY]_COMPARE(a, b).Friedemann Kleint2015-07-271-22/+22
| | | | | | | | | | | | - Replace Q[TRY]_VERIFY(pointer == 0) by Q[TRY]_VERIFY(!pointer). - Replace Q[TRY]_VERIFY(smartPointer == 0) by Q[TRY]_VERIFY(smartPointer.isNull()). - Replace Q[TRY]_VERIFY(a == b) by Q[TRY]_COMPARE(a, b) and add casts where necessary. The values will then be logged should a test fail. Change-Id: Ib9f4c2486af23c47990be4b9e004b965de226dcc Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Tests: Replace Q[TRY]_VERIFY(v == true|false) by QVERIFY(v)|QVERIFY(!v).Friedemann Kleint2015-07-271-2/+2
| | | | | | | | Preparing the replacement of Q[TRY]_VERIFY(a == b) by Q[TRY]_COMPARE(a, b) for non-boolean types. Change-Id: I8a4e44a2b4e20a9c8b811799e3932c8ce1a2cbbb Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Blacklist unstable tests for nowSimon Hausmann2015-06-051-0/+4
| | | | | Change-Id: Ia29b103c33afd9aafe9ee36ee4447fab17fe00c7 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Merge remote-tracking branch 'origin/5.5' into devSimon Hausmann2015-06-042-0/+156
|\ | | | | | | | | | | | | | | | | | | | | Conflicts: src/qml/jsruntime/qv4engine_p.h src/quick/items/qquickitemsmodule.cpp src/quick/items/qquicktext.cpp src/quick/util/qquickpixmapcache.cpp tests/auto/quick/qquickwindow/tst_qquickwindow.cpp Change-Id: I90ecaad6a4bfaa4f36149a7463f4d7141f4a516a
| * Fix implicitHeight for Text items bindings dependent on implicitWidth.Andrew den Exter2015-05-042-0/+156
| | | | | | | | | | | | | | | | | | | | | | | | Recalculate the implicitHeight on the second layout if the width changes after setting the implicitWidth, and potentially do another layout if the updating the implicitHeight changes the height. Change-Id: Ib6a637452013b56dba7ae8a6862cd92156386578 Task-number: QTBUG-45546 Reviewed-by: Michael Brasser <michael.brasser@live.com> Reviewed-by: Albert Astals Cid <albert.astals@canonical.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.5' into devSimon Hausmann2015-04-284-13/+28
|\| | | | | | | | | | | | | Conflicts: tests/auto/quick/qquicktext/tst_qquicktext.cpp Change-Id: I075e742da8396a268d97d3ab34bcd9e0c0cf001f
| * Merge remote-tracking branch 'origin/5.4' into 5.5Simon Hausmann2015-04-274-13/+28
| |\ | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf tests/auto/qml/qqmlxmlhttprequest/tst_qqmlxmlhttprequest.cpp Change-Id: I715b8a78b74cbe0dcaf599367fd6e08af4858e11
| | * Prospective fix for flakey "network" related QML testsv5.4.2Simon Hausmann2015-04-254-13/+28
| | | | | | | | | | | | | | | | | | | | | Replace hard-coded server ports with dynamically allocated ports. Change-Id: Iab8f9a88343a9f2c49af3cd700c954c13c3bf121 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
* | | Skip the remote image source test and fix blacklisting of the other testsSimon Hausmann2015-04-231-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | There's a deadlock in qdbus that we're hitting with remote tests. We should skip it and the other tests, but only on Linux. Task-number: QTBUG-45655 Change-Id: I4523fdaa2c8855c5029667fb0e32b99ec563af27 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | | Skip some tests that are hanging in the CI systemSimon Hausmann2015-04-211-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | It is most unfortunate that those tests are hanging, but in order to move forward we temporarily skip them. Task-number: QTBUG-45655 Change-Id: I9fae6c21ca3b5c7eb6715d520bd58e366136ed58 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | | Merge remote-tracking branch 'origin/5.5' into devLiang Qi2015-04-131-2/+0
|\| | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/quick/util/qquickpixmapcache.cpp tests/auto/quick/qquickwindow/BLACKLIST Change-Id: Ie81612f2884f8ea508c48ba2735ec54ea1c2eca5
| * | Tests: Make qquicktext, qquicktextedit and qquickpathview significantCaroline Chao2015-04-081-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The tests are now passing in CI for OS X. The test qquicktextedit is also passing on win32. Make qquicktext, qquicktextedit and qquickpathview significant again. Change-Id: I778cc90aff0d1e76b66b6f8ae5150d3113e6fc68 Task-number: QTBUG-27740 Task-number: QTBUG-32540 Reviewed-by: Liang Qi <liang.qi@theqtcompany.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* | | Text: add support for paddingJ-P Nurmi2015-03-172-11/+199
|/ / | | | | | | | | | | | | | | | | [ChangeLog][QtQuick][Text] Added padding, leftPadding, topPadding, rightPadding and bottomPadding properties. Task-number: QTBUG-41559 Change-Id: I5aa3a9eaad86de5e49d8e2da2a9f583e9a17222b Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* | Merge remote-tracking branch 'origin/5.4' into 5.5Frederik Gladhorn2015-02-242-0/+27
|\| | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf LICENSE.GPLv2 examples/qml/networkaccessmanagerfactory/view.qml src/qml/jsruntime/qv4runtime.cpp src/qml/jsruntime/qv4stringobject.cpp Change-Id: I5d12f436d60995e51d5c2f59d364e9cbc24f8e32
| * 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>
* | QQuickText: Decrease the size of QQuickTextPrivate by moving image tags to ↵Robin Burchell2015-02-121-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | ExtraData. Given that other data about images is already stored there (e.g. nbActiveDownloads), it seems curious to not store it all there. On x86_64, this drops the size of QQuickTextPrivate by 16 bytes (512 -> 496), and increases the size of ExtraData from 56 bytes to 72 bytes. Change-Id: Ib0a98199a74f757cf439d4ba276c7704504055b2 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* | Update copyright headersJani Heikkinen2015-02-121-7/+7
|/ | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Change-Id: I61120571787870c0ed17066afb31779b1e6e30e9 Reviewed-by: Iikka Eklund <iikka.eklund@theqtcompany.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 QQuickText::lineLaidOutRelayout autotest on OS XJan Arve Saether2014-09-171-5/+6
| | | | | | | | QTextLine::height() can be different that QTextLine::rect().height() Task-number: QTBUG-37829 Change-Id: I7fa93d50e29397237220ba111baa3bd1a56b88f2 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* Update license headers and add new licensesJani Heikkinen2014-08-251-19/+11
| | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 & LICENSE.GPLv2 - Removed LICENSE.GPL Change-Id: I84a565e2e0caa3b76bf291a7d188a57a4b00e1b0 Reviewed-by: Jani Heikkinen <jani.heikkinen@digia.com>
* Disable tests on failing ANGLE configGunnar Sletta2014-08-071-0/+3
| | | | | | Task-number: QTBUG-40658 Change-Id: I9a00083213de4d31216813351a406ec460d146fa Reviewed-by: Andrew Knight <andrew.knight@digia.com>
* QQmlError::toString: improve handling of empty urls.David Faure2014-07-241-4/+4
| | | | | | | | | | | | "file::2:23: ..." is strange to read. Show "<Unknown File>:2:23: ..." instead, by treating empty urls (including "file:") as unknown, and by still showing line and column numbers in such a case. This change makes it possible for QUrl::fromLocalFile("") to return an empty url rather than "file:", which this module was relying upon in the tests. Change-Id: I91918090fd4e0aa9a25dbbb18893a0ce94140e21 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Remove XFAILs from tst_QQuickTextEskil Abrahamsen Blomfeldt2014-07-221-4/+0
| | | | | | | | The bug for these has been fixed. Task-number: QTBUG-39961 Change-Id: I306dff766f048faf527a18f21b69996641fd8b79 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Mark failing testcases with QEXPECT_FAIL for windowsGunnar Sletta2014-07-011-0/+4
| | | | | | Task-number: QTBUG-39961 Change-Id: I981159921b38ac2af37e8a6d715f0d67d6f01da8 Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* Merge remote-tracking branch 'origin/stable' into devSimon Hausmann2014-06-042-2/+7
|\ | | | | | | | | | | | | | | | | | | | | | | | | The merge conflict is about the removal of "d1" from the register set on ARM, but that was already done in dev in commit ddb33ee9ba9e1344caa9be5dbf4b534c3ede692e The change in src/quick/scenegraph/coreapi/qsgrenderer.cpp with commit 2414f1675eab163b22dcc4e8ded80ed04d06369b was reverted to what it was before, per Laszlo's advice. Conflicts: src/qml/jit/qv4isel_masm.cpp Change-Id: I7bce546c5cdee01e37853a476d82279d4e72948b
| * QNX: Fix qquicktext auto testBernd Weimer2014-05-302-2/+7
| | | | | | | | | | Change-Id: I06acf7dcd6e83c6b665163f4eb9e5ee55ecf85b2 Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* | Merge remote-tracking branch 'origin/stable' into devSimon Hausmann2014-05-221-0/+7
|\| | | | | | | Change-Id: I0dd91626837276f5811e4830f4a4e9f89bf1e1bd
| * Fix improper antialiasing property behaviorOleg Shparber2014-05-191-0/+7
| | | | | | | | | | | | | | | | | | For components antialiased by default the property was returned as false if default true value was set to true again. Task-number: QTBUG-39047 Change-Id: I16960a12b6d38a0d9e487fc6612610c39c4949d4 Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* | TestHTTPServer: Make listening an explicit operation that reports failure.Robin Burchell2014-03-211-2/+4
|/ | | | | | | | | | Use this to print the error message when listening fails, and switch to always stack allocating TestHTTPServer instances for easier cleanup. Change-Id: I63b2bd38963b66611dc08a5c322615d91a91e675 Reviewed-by: John Brooks <john.brooks@dereferenced.net> Reviewed-by: J-P Nurmi <jpnurmi@digia.com> Reviewed-by: Lorn Potter <lorn.potter@jollamobile.com>
* Fix tst_qquicktext::hover()J-P Nurmi2014-02-281-0/+2
| | | | | | Task-number: QTBUG-36938 Change-Id: I28da25235ae7b8805ebc474777a5edd43ceef941 Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* Expose Text::linkAt(x, y)J-P Nurmi2014-01-291-0/+3
| | | | | | | | | | [ChangeLog][QtQuick] Added Text::linkAt(x,y) method. Task-number: QTBUG-18946 Change-Id: I3b4071c6117ac0ee636f2fdbd2c392eb05b02dd7 Reviewed-by: Martin Jones <martin.jones@jollamobile.com> Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com> Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* Merge remote-tracking branch 'origin/stable' into devSimon Hausmann2014-01-241-0/+18
|\ | | | | | | | | | | | | | | | | | | | | Conflicts: src/imports/dialogs/qquickmessagedialog.cpp src/imports/dialogs/qquickmessagedialog_p.h src/qml/debugger/qqmlprofilerservice_p.h src/qml/jsruntime/qv4regexpobject.cpp tests/auto/qml/debugger/qqmlprofilerservice/qqmlprofilerservice.pro Change-Id: Ic8a43366b44d6970966acbf03b206d0dee00c28d
| * QQuickText: fix layout mirroringJ-P Nurmi2014-01-221-0/+18
| | | | | | | | | | | | Task-number: QTBUG-35095 Change-Id: I8550821e01ecc931788c1ed73366ba1ceed7a817 Reviewed-by: Andrew den Exter <andrew.den.exter@qinetic.com.au>
* | Support toggling antialiasing for Text and Rectangle.Michael Brasser2013-12-031-0/+25
| | | | | | | | | | | | | | 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>
* Fix QQuickText hover event handlingJ-P Nurmi2013-11-052-0/+50
| | | | | | | | | | Catch hover events only when the item contains either rich or styled text, and make sure to ignore hover events as appropriate to propagate them further. Task-number: QTBUG-33842 Change-Id: Idef5be7c502711393ab532c4ace31663b0e0a872 Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* Merge "Merge branch 'stable' into dev" into refs/staging/devSergio Ahumada2013-08-062-16/+38
|\
| * Merge branch 'stable' into devSergio Ahumada2013-08-052-16/+38
| |\ | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: I06f79bcbde13c7b12905492a17dbcbb4a594e557
| | * Stabilize text tests that grab windows.Friedemann Kleint2013-07-252-16/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | Merge branch 'dev' of ssh://codereview.qt-project.org/qt/qtdeclarative into ↵Simon Hausmann2013-07-261-1/+1
|\| | | | | | | | | | | | | | | | | merge Change-Id: I5824a3eb624b325de10acfd5109c4c1bdabcf780
| * | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-07-231-1/+1
| |\| | | | | | | | | | Change-Id: I2279f181b1c30e81651f8907447ec5c826e11475
| | * Replace qt.nokia.com by www.qt-project.org in tests.Friedemann Kleint2013-07-151-1/+1
| | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-32390 Change-Id: If318cf9bbcaa36e6e60d693dd0cb9a58768af47b Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* | | Merge branch 'dev' of ssh://codereview.qt-project.org/qt/qtdeclarative into ↵Simon Hausmann2013-06-242-49/+143
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | wip/v4 Conflicts: src/imports/qtquick2/plugins.qmltypes src/qml/debugger/qv8debugservice.cpp src/qml/qml/qml.pri src/qml/qml/qqmlcompiler.cpp src/qml/qml/qqmlcomponent.cpp src/qml/qml/qqmlcontext.cpp src/qml/qml/qqmldata_p.h src/qml/qml/qqmlengine_p.h src/qml/qml/qqmljavascriptexpression.cpp src/qml/qml/qqmlxmlhttprequest.cpp src/qml/qml/v4/qv4bindings.cpp src/qml/qml/v4/qv4irbuilder.cpp src/qml/qml/v4/qv4jsonobject_p.h src/qml/qml/v8/qqmlbuiltinfunctions.cpp src/qml/qml/v8/qv8bindings.cpp src/qml/qml/v8/qv8contextwrapper.cpp src/qml/qml/v8/qv8listwrapper.cpp src/qml/qml/v8/qv8qobjectwrapper.cpp src/qml/qml/v8/qv8qobjectwrapper_p.h src/qml/qml/v8/qv8sequencewrapper_p_p.h src/qml/qml/v8/qv8typewrapper.cpp src/qml/qml/v8/qv8valuetypewrapper.cpp src/qml/types/qqmldelegatemodel.cpp src/quick/items/context2d/qquickcanvasitem.cpp src/quick/items/context2d/qquickcontext2d.cpp sync.profile tests/auto/qml/qjsengine/tst_qjsengine.cpp tests/benchmarks/qml/animation/animation.pro tools/qmlprofiler/qmlprofiler.pro Change-Id: I18a76b8a81d87523247fa03a44ca334b1a2360c9
| * | Add QQuickText::hoveredLinkJ-P Nurmi2013-06-181-49/+119
| |/ | | | | | | | | | | Task-number: QTBUG-30804 Change-Id: I6c6993b152285f4bdf34d6e1aa04f25fa7ca41e0 Reviewed-by: Alan Alpert <aalpert@blackberry.com>
| * Fix assert when calculating the implicit width of truncated lines.Andrew den Exter2013-05-312-0/+24
| | | | | | | | | | | | | | | | | | Guard against reading past the end of the final line. Task-number: QTBUG-31471 Change-Id: I489f742936ee16f12ad9762b7c0891bfa9377e21 Reviewed-by: Martin Jones <martin.jones@jollamobile.com>
* | Fix compilation with built-in v4vm JS engineSimon Hausmann2013-04-151-1/+1
|/ | | | | Change-Id: Ieda9267e296acf6392a5461f4cfb9233a7a409a0 Reviewed-by: Lars Knoll <lars.knoll@digia.com>