aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/quick/qquicktextedit
Commit message (Collapse)AuthorAgeFilesLines
* QTextEdit/QQuickTextEdit undo issue - Part #1Dan Cape2016-01-282-4/+4
| | | | | | | | | | | | | | | | | | | | | This change to the qquicktextedit testcase will match updated functionality for undo (made in qtbase) in the following scenario: If a user selected the text "foo" and typed "bar", upon pressing undo, the text would change to "b". This is incorrect and does not match the functionality of QTextEdit or the default behaviours of Windows/OSX/Ubuntu. When pressing undo on QTextEdit, the text would change back to "foo". The changes to the testcase is basically removing one step in the undo test data that does not happen anymore. Since the change to undo was made in qtbase, I need to disable the undo test cases using the BLACKLIST until the qtbase change is in. Then there will be another review to re-enable it. Task-number: QTBUG-38825 Change-Id: I60e799d546945aac89634b49b2e1dc60a2a68935 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Updated license headersJani Heikkinen2016-01-201-17/+12
| | | | | | | | | | | | From Qt 5.7 -> tools & applications are lisenced under GPL v3 with some exceptions, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new GPL-EXCEPT header instead of LGPL21 one (in those files which will be under GPL 3 with exceptions) Change-Id: I04760a0801837cfc516d1c7c02d4f503f6bb70b6 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* QQuickTextEdit: added clear() methodLiang Qi2016-01-191-0/+61
| | | | | | Task-number: QTBUG-50428 Change-Id: Id618616f8d8d50c2a2eba79a2bf6969662e727b8 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* QQuickTextEdit: added preeditText propertyLiang Qi2016-01-131-0/+17
| | | | | | Task-number: QTBUG-49503 Change-Id: I3390e72893e4125e00e8e0835a8d2fae11ea276f Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Merge remote-tracking branch 'origin/5.6' into devLiang Qi2016-01-101-0/+1
|\ | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/qmltooling/qmldbg_debugger/qqmlenginedebugservice.h tests/auto/quick/qquicklistview/tst_qquicklistview.cpp tests/auto/quick/qquicktextedit/qquicktextedit.pro tests/auto/quick/qquicktextinput/qquicktextinput.pro Change-Id: I95d2c20a8619e5b8fa361c941a16dd8dce3e04e7
| * don't rely on transitive dependenciesOswald Buddenhagen2016-01-051-0/+2
| | | | | | | | | | Change-Id: Ide872b452e02ebefb3eeb51464c8d59e8bf58bc4 Reviewed-by: Jake Petroules <jake.petroules@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into devLiang Qi2015-12-181-2/+5
|\| | | | | | | | | | | | | Conflicts: tests/auto/quick/qquicklistview/tst_qquicklistview.cpp Change-Id: I9588a3e2c7d590e031dd4c66905a79f0d74d3ac8
| * QQuickTextEdit: Fully qualify enumerations in changed() signals.Friedemann Kleint2015-12-151-2/+5
| | | | | | | | | | | | | | | | | | Fix warnings when running tst_qquicktextedit: QWARN : tst_qquicktextedit::mouseSelectionMode_accessors() QSignalSpy: Unable to handle parameter 'mode' of type 'QQuickTextEdit::SelectionMode' of method 'mouseSelectionModeChanged', use qRegisterMetaType to register it. QWARN : tst_qquicktextedit::textFormat() QSignalSpy: Unable to handle parameter 'textFormat' of type 'QQuickTextEdit::TextFormat' of method 'textFormatChanged', use qRegisterMetaType to register it. Change-Id: I2d41f970777c9ee4d8999acceed9e1b9cf52b0f0 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into devLiang Qi2015-12-072-4/+5
|\| | | | | | | Change-Id: Ica75a71062d0613e415f2433c5c22c2e251b37cd
| * tst_qquicktextedit::hAlignVisual(): Fix failure on Windows.Friedemann Kleint2015-12-071-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | Set a suitable font, fixing the error: FAIL! : tst_qquicktextedit::hAlignVisual() Compared values are not the same Actual (left): 2 Expected (0) : 0 Task-number: QTBUG-48546 Change-Id: I4d6222a39647229c65f3e5aa12c39d50a722e584 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
| * Fix autotests for change in QtNetworkDaniel Molkentin2015-11-291-2/+2
| | | | | | | | | | | | | | See change 4efa50a5e37497bc3a3dd30f27db7d8100e3f6a5 in qtbase Change-Id: I00e5e529faed029bc3bc461a3b1807811d33c769 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
| * tst_qquicktextedit: Fix warning about uninitialized variable.Friedemann Kleint2015-11-271-2/+2
| | | | | | | | | | | | | | | | | | tst_qquicktextedit.cpp: In member function 'void tst_qquicktextedit::positionAt()': tst_qquicktextedit.cpp:2428:68: warning: 'y1' may be used uninitialized in this function [-Wmaybe-uninitialized] tst_qquicktextedit.cpp:2425:64: warning: 'y0' may be used uninitialized in this function [-Wmaybe-uninitialized] Change-Id: I28d5a8c1c5421e20097b25ca18915763bac3200c Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into devLiang Qi2015-11-031-1/+2
|\| | | | | | | | | | | | | Conflicts: tools/qmlprofiler/qmlprofilerclient.cpp Change-Id: I1de8832fefd0e45fea16ca072b6c7ae44fa376d4
| * Move QQuickTextDocumentWithImageResources out of qquicktext_p_p.hJ-P Nurmi2015-10-291-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Merge remote-tracking branch 'origin/5.6' into devLiang Qi2015-10-141-10/+9
|\| | | | | | | Change-Id: I11ea57222ba5aa683b7bfd7735fbc1d2cf86e875
| * Provide a threaded TestHTTPServerUlf Hermann2015-10-141-9/+8
| | | | | | | | | | | | | | | | | | This allows us to do blocking operations that interact with the test server in the main thread. The threaded server is used in tests that don't explicitly require asynchronous operation. Change-Id: Ibcb28e79a1114cb9cfb812e86aae0a1af71c569e Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
| * Tests: Fix single-character string literals.Friedemann Kleint2015-10-131-1/+1
| | | | | | | | | | | | | | | | Use character literals where applicable. Change-Id: Ib0e618752fbc762a73a0a91c43efab61ef2c9687 Reviewed-by: Ulf Hermann <ulf.hermann@theqtcompany.com> Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into devLiang Qi2015-09-251-14/+26
|\| | | | | | | | | | | | | Conflicts: src/qml/debugger/qqmldebug.cpp Change-Id: I93de5a81b18cdece475870cf7cfba1b9baef2304
| * TextEdit: selectedTextChanged not emitted when calling select 2nd timeDan Cape2015-09-211-14/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | qquicktextcontrol was only checking if the text was previous selected or not and if the current state matched the previous state it would not dispatch a selectedTextChanged event. This is wrong if you programmatically select text a second time with a different start or end of selection. You must notify that the selected text changed since visually you can see the highlight changed locations. When correcting this and creating a test case, it was seen that other tests had QEXPECT_FAIL set for this specific case. Upon further inspection, I could remove those calls and adjust the expected data that was set before the test (changing false to true). testing of tst_qquicktext: Totals: 182 passed, 0 failed, 0 skipped, 0 blacklisted testing of tst_qquicktextedit: Totals: 354 passed, 0 failed, 3 skipped, 0 blacklisted Task-number: QTBUG-38704 Change-Id: Ib5244dc264ab76951bb722a31dcb64717282725a Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* | Remove QT_DISABLE_DEPRECATED_BEFORE=0 from tests not using deprecated API.Friedemann Kleint2015-09-031-1/+0
|/ | | | | Change-Id: I691b8ddff60b5f16f06d32b379c76e87f44f84a9 Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
* tests/quick: Replace Q[TRY]_VERIFY(a == b) by Q[TRY]_COMPARE(a, b).Friedemann Kleint2015-07-271-29/+29
| | | | | | | | | | | | - 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-17/+17
| | | | | | | | 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/+2
| | | | | Change-Id: Ia29b103c33afd9aafe9ee36ee4447fab17fe00c7 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Merge remote-tracking branch 'origin/5.5' into devSimon Hausmann2015-04-284-17/+29
|\ | | | | | | | | | | | | Conflicts: tests/auto/quick/qquicktext/tst_qquicktext.cpp Change-Id: I075e742da8396a268d97d3ab34bcd9e0c0cf001f
| * Merge remote-tracking branch 'origin/5.4' into 5.5Simon Hausmann2015-04-274-17/+29
| |\ | | | | | | | | | | | | | | | | | | | | | 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-17/+29
| | | | | | | | | | | | | | | | | | | | | Replace hard-coded server ports with dynamically allocated ports. Change-Id: Iab8f9a88343a9f2c49af3cd700c954c13c3bf121 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
* | | Merge remote-tracking branch 'origin/5.5' into devLiang Qi2015-04-131-3/+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-3/+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>
* | | TextEdit: add support for paddingJ-P Nurmi2015-03-052-0/+92
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This makes it possible for TextArea to inherit TextEdit, reserve space for the decoration, and set the desired property defaults without having to create dozens of property aliases. [ChangeLog][QtQuick][TextEdit] Added padding, leftPadding, topPadding, rightPadding and bottomPadding properties. Task-number: QTBUG-41559 Change-Id: I4fa22f86e6151524a63b2b862f17bc9d6a713142 Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* | | TextEdit: add editingFinished signalLiang Qi2015-03-032-0/+62
|/ / | | | | | | | | | | | | | | | | | | | | Autotest is included. [ChangeLog][TextEdit] add editingFinished signal Task-number: QTBUG-44734 Change-Id: Ib632e589419758bea09442e6efcf4d977b9a13e8 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* / 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>
* 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>
* 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>
* 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>
* Merge remote-tracking branch 'origin/5.3' into 5.4Frederik Gladhorn2014-08-141-3/+2
|\ | | | | | | Change-Id: I2e06c2fcd8aa9d5d090f0568be75272ec82f7b20
| * Silence harmless compiler warning.Gunnar Sletta2014-08-121-3/+2
| | | | | | | | | | | | | | | | AlignJustify is not a tested value, but the compiler warning can throw you off, so best to keep it quiet. Change-Id: I0b3d717dfe2c11fc4367e7eceb5b83009c4e0a30 Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
* | Merge remote-tracking branch 'origin/stable' into devSimon Hausmann2014-05-222-0/+44
|\| | | | | | | Change-Id: I0dd91626837276f5811e4830f4a4e9f89bf1e1bd
| * Fix tst_qquicktextedit::cursorRectangle_QTBUG_38947()J-P Nurmi2014-05-192-9/+14
| | | | | | | | | | | | | | | | | | Fix the uninitialize variable and make sure the test creates a window that has a sensible (200x200) size. Change-Id: I02616ab3c832276921e84ae98b7ed926d8fc5f5e Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Liang Qi <liang.qi@digia.com>
| * TextEdit: fix cursor rectangle positioningJ-P Nurmi2014-05-162-0/+39
| | | | | | | | | | | | | | | | | | | | | | QQuickTextControl::cursorRectangleChanged() wasn't emitted as appropriate when dragging mouse => The cursor delegate was stuck in wrong position under certain circumstances, especially when selecting multiple lines. Task-number: QTBUG-38947 Change-Id: Ib5b0d2f6ea2a1b3712fbaba4a7ad1865d2b0a74e Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2014-05-101-1/+1
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf src/plugins/accessible/quick/quick.pro src/quick/items/qquickpincharea.cpp src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp src/quick/scenegraph/qsgthreadedrenderloop.cpp Manually adjusted for TestHTTPServer constructor change: tests/auto/quick/qquickimage/tst_qquickimage.cpp Change-Id: I5e58a7c08ea92d6fc5e3bce98571c54f7b2ce08f
| * If a popup window is opened, do not change the focusShawn Rutledge2014-04-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | It's not working to have QQuickWindow lose focus every time a menu is opened. This doesn't happen on OSX because menus are implemented as special native ones, but on X11 a menu is another window. In QtQuick Controls it's useful for copy/cut/paste Actions to be enabled based on whether some text has focus. Change-Id: I092b46133b9a8a44639ad9d89ee2bdfe30206bd9 Task-number: QTBUG-36292 Task-number: QTBUG-36332 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* | TestHTTPServer: Make listening an explicit operation that reports failure.Robin Burchell2014-03-211-3/+6
|/ | | | | | | | | | 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>
* Ensure TextEdit's text is vertically aligned after resizing its height.Mitch Curtis2014-03-131-0/+13
| | | | | | | | | | | | | The current code only updates the alignment if the width of the TextEdit changed, but we must also check if the height has changed. Task-number: QTBUG-36069 [ChangeLog][QtQuick][TextEdit] Fixed TextEdit not vertically aligning its text after having its height changed. Change-Id: I0b2d6a7384457ca1018fc9899c82699e8ecfcbd4 Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* Fix TextEdit::lineCount to update as appropriateJ-P Nurmi2014-03-101-0/+51
| | | | | | | | | | The total line count needs to be updated when geometry, document size or wrapping mode changes. Task-number: QTBUG-37263 Change-Id: If58a2f77022475e8bcb7cca0f2a091ee837b39a5 Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com> Reviewed-by: Caroline Chao <caroline.chao@digia.com>
* Expose TextEdit::linkAt(x, y)J-P Nurmi2014-01-291-0/+4
| | | | | | | | | | [ChangeLog][QtQuick] Added TextEdit::linkAt(x,y) method. Task-number: QTBUG-18946 Change-Id: Id9d061e6c9d857c2f0283ad5042097828d1ed02d 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>
* fix whitespaceOswald Buddenhagen2014-01-226-11/+11
| | | | | | | remove trailing spaces and expand tabs Change-Id: Ieacb9d096b612c45d1a64700044c114d1f7522bc Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Fix autotests expecting a trailing whitespace for qDebug streamKai Koehne2013-12-121-2/+2
| | | | | | | | The behavior of QDebug was fixed in qtbase. Update autotests accordingly. Change-Id: I36c442fb772ba35b71b6ab50b5f77a3f9c1463e3 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-08-191-0/+1
|\ | | | | | | | | | | | | | | Conflicts: tests/auto/quick/qquickgridview/qquickgridview.pro tests/auto/quick/qquickitem/qquickitem.pro Change-Id: Ic54cafbdda1ac22757d2ee65dcc63a1b167c7556
| * 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 "Merge branch 'stable' into dev" into refs/staging/devSergio Ahumada2013-08-062-32/+53
|\ \