summaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative/qdeclarativetextedit
Commit message (Collapse)AuthorAgeFilesLines
* Make TextEdit word selection more natural.Andrew den Exter2011-05-132-0/+44
| | | | | | | | | | | | QTextControl will only extend the selection to a word if the cursor is directly over it which prevents the selection being extended if the mouse is dragged up or down a to a shorter line of text making it difficult to select multiple lines of text. Just disable that limitation when the TextEdit word selection is enabled. Change-Id: I3b9d1575c0141db8441197d740de94a90eacc077 Task-number: QTBUG-19230 Reviewed-by: Martin Jones
* Ensure the TextEdit cursor delegate is repositioned on mouse events.Andrew den Exter2011-05-121-0/+20
| | | | | | | | | Update the micro focus when a mouse press changes the cursor position of a read only TextEdit. Change-Id: I11855037f7938b2cd23ac6ad165722b5289b4f46 Task-number: QTBUG-19109 Reviewed-by: Martin Jones
* Ignore changes to selectByMouse during a selection.Andrew den Exter2011-04-273-0/+100
| | | | | | | | | | | Use the value of selectByMouse at the time of a mouse press event in all subsequent mouse events in a sequence. This is the same as ignoring the intial mouse press except mouse events for other actions are still accepted. Change-Id: I59b50bf95d26c6320e6e74eeb679b4153e0edf4d Task-number: QTBUG-18887 Reviewed-by: Martin Jones
* Move the TextInput cursor delegate when the preedit position changes.Andrew den Exter2011-04-271-0/+9
| | | | | | Change-Id: Ia7150122444e465ffbcc02e921d42d01c2dfdac1 Task-number: QTBUG-18892 Reviewed-by: Martin Jones
* Fix TextInput cursor position unchanged when selection length is 0.Andrew den Exter2011-04-211-0/+10
| | | | | | | | | Move the cursor position to the start position when both the new and old selections are empty as would happen if either was non-empty. Change-Id: I493e52c551b47e009fd13b3e95856ff012ee5d95 Task-number: QTBUG-18768 Reviewed-by: Martin Jones
* Fix TextEdit cursorRectangle property.Andrew den Exter2011-04-132-1/+21
| | | | | | | | | | | Translate the cursor rectangle from control coordinates to painting coordinates rather than the other way around, ensure the cursor delegate is also translated, and update the cursor rectangle, cursor delegate and micro focus when the preedit cursor changes position. Change-Id: Iac7a87f7fb965d5f56d059d8f4b97feef8b47789 Task-number: QTBUG-18515 QT-4827 Reviewed-by: Martin Jones
* Fix auto test failure.Andrew den Exter2011-03-311-0/+8
| | | | | | Add test file ommited from b94176e69efc3948696c6774d5a228fc753b5b29. Change-Id: Ia5436974a4941f50c8f1636196372e5b8a90be5f
* Fix width of TextInput micro focus rectangle.Andrew den Exter2011-03-301-0/+20
| | | | | | | | | | | Remove the padding QLineControl::cursorRect() adds for region updates. QGraphicsView also grew the rectangle by returning the bounding rect of the transformed rectangle which is fixed by using the same transform for QRect as is used for QRectF. Change-Id: I8d8df9dbc6b4250e4e5392871191123a76b304a0 Task-number: QTBUG-18343 Reviewed-by: Martin Jones
* Fix text selection with shift-click.Andrew den Exter2011-03-281-0/+12
| | | | | | | | | | Move the cursor when word selection is NOT enabled. If word selection is enabled then then cursor would have been moved in a previous branch, the (incorrectly inverted) check was to prevent that being overridden. Change-Id: I788c3b41c6fdb250d6086893ea98a1aa8c302514 Task-number: QTBUG-18017 Reviewed-by: Alan Alpert
* Fix TextEdit mouseSelectionMode overriding selectByMouse.Andrew den Exter2011-03-143-0/+16
| | | | | | | | | If selectByMouse is false don't allow any text selection on mouse move. Change-Id: Ic9f309899bc0de48066a2393e088e15b3a2f06db Task-number: QTBUG-18072 Reviewed-by: Martin Jones
* Fix failing testsBea Lam2011-03-101-0/+4
| | | | | | | | | RTL text-related tests were failing on mac since QApplication::keyboardInputDirection() is not always initialized when the QApplication instance is created. Change-Id: Ifa7214ffb1941d824a9425015b38aa77366381bb Reviewed-by: Martin Jones
* Fix horizontal alignment of QTextDocument-based RTL textJoona Petrell2011-03-091-1/+33
| | | | | | | Task-number: QTBUG-15880 Reviewed-by: Martin Jones Change-Id: If537d7c795dec46eedee62511e75bab862676ef1
* Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-qml into qtquick11Martin Jones2011-03-082-4/+58
|\ | | | | | | | | | | | | Conflicts: tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp Change-Id: Iddfc48e643a7f043afa1c5d5f1777f645a39548e
| * Update TextEdit's visible selection when only the anchor changes.Andrew den Exter2011-03-082-4/+55
| | | | | | | | | | | | | | | | | | | | At the limits of a TextEdit's text a key press can change/reset the anchor position without changing the cursor position. Checking the cursor position alone isn't enough to determine the selection hasn't changed. Change-Id: Ic425ac0c06897d77e9c86b907ff10b39d78dd7a1 Task-number: QTBUG-17982 Reviewed-by: Martin Jones
* | Base empty QML editor horizontal alignment on ↵Joona Petrell2011-03-081-3/+8
| | | | | | | | | | | | | | | | | | QApplication::keyboardInputDirection() Task-number: QTBUG-15880 Reviewed-by: Martin Jones Change-Id: I240d53c8572fd3d1222b555e93812a3ee38e2558
* | Merge branch '4.7' into qtquick11Joona Petrell2011-03-081-0/+38
|\ \ | |/
| * Set correct initial value for TextEdit and TextInput canPaste propertyYann Bodson2011-03-071-0/+38
| | | | | | | | | | | | Change-Id: Ied5b257305fa68db64fcf270ad2a42f691fbdca2 Task-number: QTBUG-17765 Reviewed-by: Martin Jones
* | Reverse horizontal alignment of QML editors when the layout mirroring is enabledJoona Petrell2011-03-071-0/+24
| | | | | | | | | | | | Task-number: QTBUG-15880 Reviewed-by: Martin Jones Change-Id: Ie9cebd7bc6d40f5f555bfd83ddc3a24a55c6cb4d
* | Remove text alignment of empty QML editors following the layout directionJoona Petrell2011-03-041-8/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-15880 Reviewed-by: Martin Jones Removed implicit text alignment of empty text in QML editor following the application's default layout direction. Change was originally made few days ago in the commit 88253db8a7d7910e1393b1948fb3747117538c92. Aligning empty and neutral text to the right for RTL locales requires much more comprehensive changes to the Qt's internal text classes than initially thought. Change-Id: I93a26df259b87dff47d57423949270656746c9a7
* | Merge branch '4.7' into qtquick11Joona Petrell2011-03-041-0/+9
|\ \ | |/
| * Add QML file for TextEdit positionAt test.Andrew den Exter2011-03-021-0/+9
| | | | | | | | Change-Id: I4632f77f87e8ced55a9959baaebd2b1624d0b568
* | Add a way to query the reading direction of QML editor textJoona Petrell2011-03-031-0/+59
| | | | | | | | | | | | | | Task-number: QTBUG-17490 Reviewed-by: Martin Jones Change-Id: I3dd3854f820860d32e822605ed547150d5f17eb2
* | Merge branch '4.7' into qtquick11Martin Jones2011-03-011-2/+303
|\ \ | |/ | | | | | | | | | | Conflicts: src/declarative/graphicsitems/qdeclarativelistview.cpp Change-Id: Ic21311365c6139520ae337a379bdedb6ffe497db
| * Don't return positions within preedit text from positionAt().Andrew den Exter2011-03-011-0/+52
| | | | | | | | | | | | | | | | | | | | Preedit text isn't visible outside the inner workings of the Text elements so any position returned that is greater than the current cursor position is invalid. Change-Id: I433fc635dcd6d087bde13fc47a1a92e4222a3b2c Task-number: QTBUG-17834 Reviewed-by: Martin Jones
| * Add an is input method composing property to TextEdit and TextInput.Andrew den Exter2011-03-011-0/+38
| | | | | | | | | | | | | | | | | | | | | | Allows input handling to be disabled or changed while an input method is active. This might be used to allow mouse events through to the element or in conjunction with the cursor position to determine whether a click occurred on the preedit text. Change-Id: I35e148691920579c1d7c6f27b7e805d9551beadd Task-number: QTBUG-17835 Reviewed-by: Martin Jones
| * Fix auto test failure on mac.Andrew den Exter2011-02-221-30/+30
| | | | | | | | | | | | | | Allow for some error in the cursor position due to plaform specific offsets and the like. Change-Id: I2bef793596ab2a5e38cf77aee624bd9fdd5ca38c
| * Hide the TextInput/Edit cursor when the view doesn't have focus.Andrew den Exter2011-02-211-0/+71
| | | | | | | | | | | | | | | | Only display a cursor if both the item and its scene have focus. Change-Id: I0c91ab4d533cd7d773ffc2489633e12c0d399ad9 Task-number: QTBUG-17365 Reviewed-by: Martin Jones
| * Forward mouse events from TextInput and TextEdit to QInputContext.Andrew den Exter2011-02-211-2/+140
| | | | | | | | | | | | | | | | | | This brings TextInput in line with QLineEdit. The fix for TextEdit applies equally to QTextEdit. Change-Id: I5c47e5c8e951ee53cb1fe45d9c302050cd19deef Task-number: QTBUG-15705 Reviewed-by: axis
| * Fix TextEdit auto test failure on windows.Andrew den Exter2011-02-181-0/+2
| | | | | | | | | | A leaked window from a previous test held focus meaning events weren't being delivered to the expected widget. Delete the offending widget.
* | Make sure horizontal QML editor text aligment always returns the actual ↵Joona Petrell2011-03-011-5/+32
|/ | | | | | | | | | | alignment Also, implicit empty text alignment now follows the Application's default layout direction traditionally set by the locale. Task-number: QTBUG-15880 Reviewed-by: Martin Jones Change-Id: I88340513d489290bafd393072786a19731097b77
* Fix TextInput, TextEdit auto test failure on windows and mac.Andrew den Exter2011-02-161-0/+6
| | | | | | | Micro focus is only updated on X11, QWS and Symbian platforms. Change-Id: Id02655cba79429e91022593ff0d1d6b8068c84ec Reviewed-by: Martin Jones
* Update the input context when the pre-edit cursor position changes.Andrew den Exter2011-02-161-1/+66
| | | | | | | | | | The micro focus rect changes both when the regular cursor position and the pre-edit cursor positions change. Ensure updateMicroFocus is called TextInput in both cases. Change-Id: I6822a710b841e106ce2462f74fea398250596913 Task-number: QTBUG-17396 Reviewed-by: Martin Jones
* Don't accept input methods when a TextEdit or TextInput is read only.Andrew den Exter2011-02-031-0/+10
| | | | | | | | | Neither would open a software input panel or allow text entry while read only, but on Symbian at least the text input mode indicator was still displayed giving the appearance of being able to enter text. Task-number: QT-4497 Reviewed-by: Damian Jansen
* Add a mouseSelectionMode property to TextEdit and TextInput.Andrew den Exter2011-02-014-58/+314
| | | | | | | | | | | Adds an option to do per word selection when selectByMouse is true. Also changes the selection behavior so that the first word selected remains selected when the direction of the selection changes which is more consistent with other implementations including the existing per word selection in QTextEdit. Task-number: QTBUG-16283 Reviewed-by: Martin Jones
* Add missing versioning tests for new QtQuick 1.1 properties/methods.Martin Jones2011-01-311-2/+14
| | | | | Task-number: QTBUG-15489 Reviewed-by: Bea Lam
* Fixing right-to-left text in Text and TextInputChristopher Ham2011-01-282-0/+48
| | | | | | | | | The Text and TextInput items should now automatically flip the alignment of right-to-left text. Autotests also added to ensure the text is on the correct side (added for TextInput also). Task-number: QTBUG-15880 Reviewed-by: Martin Jones
* Add missing revisions for QtQuick 1.1 additionsMartin Jones2011-01-271-0/+41
| | | | | Task-number: QTBUG-15279 Reviewed-by: Michael Brasser
* Expose implicitWidth and implicitHeight properties of Item.Martin Jones2011-01-241-0/+29
| | | | | | | | Overridden as readonly for elements that have an inherent implicit size such as Text, TextEdit, TextInput, positioners, Loader. Task-number: QTBUG-14957 Reviewed-by: Michael Brasser
* Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-qml into qtquick11Martin Jones2011-01-191-1/+13
|\
| * Cleanup created views in TextEdit tests.Martin Jones2011-01-191-0/+12
| | | | | | | | Reviewed-by: Michael Brasser
| * Update copyright year to 2011.Jason McDonald2011-01-101-1/+1
| | | | | | | | Reviewed-by: Trust Me
* | Add canPaste property to TextInput and TextEditAlan Alpert2011-01-171-0/+8
| | | | | | | | | | Task-number: QTBUG-16190 Reviewed-by: Martin Jones
* | Disable dragging text in TextEdit.Andrew den Exter2011-01-111-0/+46
| | | | | | | | | | | | | | | | Add a dragEnabled property to QTextControl so text dragging can optionally be disabled. Task-number: QTBUG-16248 Reviewed-by: Martin Jones
* | Add selection modes to TextEdit and TextInput.Andrew den Exter2011-01-101-1/+163
| | | | | | | | | | | | | | | | | | Add an overload for moveCursorSelection which takes a parameter specifying whether to update the selection with individual characters or whole words. Task-number: QTBUG-16283 Reviewed-by: Martin Jones
* | Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-qml into qtquick11Martin Jones2011-01-071-0/+13
|\ \ | |/ | | | | | | | | Conflicts: src/declarative/graphicsitems/qdeclarativeitem.cpp tests/auto/declarative/qdeclarativexmllistmodel/tst_qdeclarativexmllistmodel.cpp
| * Setting TextInput.cursorPosition outside bounds crashed.Martin Jones2010-12-201-0/+13
| | | | | | | | | | | | | | Check bounds in TextInput and TextEdit. Task-number: QTBUG-16188 Reviewed-by: Bea Lam
| * Revert a fix made for bug QTBUG-15341Joona Petrell2010-12-141-40/+0
| | | | | | | | Reverted a commit 2eee49127b80b5b56c605f76ccea004b03d89577 "Remove active selection when TextEdit loses focus". Contrary to TextInput, by default TextEdit keeps the selection visible when the editor loses active focus. If this is not wanted, a property called persistentSelection can be set false to make selection dependant on the focus.
| * Remove active selection when TextEdit loses focusJoona Petrell2010-12-141-0/+40
| | | | | | | | | | Task-number: QTBUG-15341 Reviewed-by: Yann Bodson
* | Add convenience deselect() functions to TextInput and TextEditJoona Petrell2010-12-301-0/+7
|/ | | | | Task-number: QTBUG-16059 Reviewed-by: Christopher Ham
* Bug: TextEdit ignores plain text format when pasting textYann Bodson2010-10-121-0/+25
| | | | | Task-number: QTBUG-14003 Reviewed-by: Michael Brasser