aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items/qquicktextcontrol.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Update copyright year in Digia's license headersSergio Ahumada2013-01-101-1/+1
| | | | | | Change-Id: I6c3bd7bebe3d62d1cfd0fa6334544c9db8398c76 Reviewed-by: Akseli Salovaara <akseli.salovaara@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Enable module build with QT_NO_IMTasuku Suzuki2012-11-261-0/+28
| | | | | | Change-Id: I90f8ec7e6357db7b4038bb1646fe9d3835821556 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Alan Alpert (RIM) <aalpert@rim.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-231-24/+24
| | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: Ie7f5d49ed8235d7a7845ab68f99ad1c220e64d5c Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Fix pasting with the middle button in TextInput and TextEdit.Andrew den Exter2012-08-061-2/+4
| | | | | | | | Neither item accepted the middle button which prevented the mouse events ever reaching them. Change-Id: Ia8f693099df4d6c248976453d554fef96d1d3b33 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Remove code for unused LinksAccessibleByKeyboard option.Andrew den Exter2012-07-111-8/+0
| | | | | | | | The text interaction flags aren't exposed publicly and the option isn't set by TextEdit itself so there's no need to handle it. Change-Id: I83b98e58e3b8cb8c55752d8eefe3bf36bff75249 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Speed up TextEdit construction time.Andrew den Exter2012-07-091-51/+26
| | | | | | | | | | | | Defer setting content on the QTextDocument until componentComplete() to avoid unnecessary layouts and move one time setup for the text document from setContent to the constructor. Reduces the construction time of a TextEdit with RichText textFormat by about a third. Change-Id: Idde0772063bf769cde984efddd68589c55a7431a Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Don't calculate selection rects unnecessarily.Andrew den Exter2012-07-041-101/+9
| | | | | | | | QQuickTextEdit ignores the updateRequest QRect arguments, so don't bother calculating them. Change-Id: Icb9126ab799c6b216eb0c4b9e3ff3f6a4bf8f03c Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Remove dead code from QQuickTextControl.Andrew den Exter2012-07-041-70/+0
| | | | | | | | Either unused functions, or code paths for signals that aren't connected to anything. Change-Id: Ide24f1263d05f93917a16a3c17cb06a619cd3421 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Avoid string-based lookup of signalsKent Hansen2012-06-011-2/+3
| | | | | Change-Id: I5b83b5d07b6a5d2de86d0f37471cf59baa7b0e43 Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
* Ensure the cursor rectangle is updated when preedit text changes.Andrew den Exter2012-05-031-1/+1
| | | | | | | | | Updating only when the cursor position changes isn't enough because changing pre-edit text changes the width of the pre-edit area and the x offset of all cursor positions within it. Change-Id: I3c0a5e4ad4714a903ca84c1a25374491f34d95a0 Reviewed-by: Yann Bodson <yann.bodson@nokia.com>
* Fix TextEdit with right aligned text when size changesPekka Vuorela2012-04-271-9/+5
| | | | | | | | | | | Geometry change was avoiding updating size of the QTextDocument, thus it was not able to right align before something else triggered size change, e.g. a modification to the text. Also removed unnecessary cursorRectangleChanged signal that was emitted when moving focus with mouse. Change-Id: I293fd5119473eb3def5acd1b3fbb951c12e14412 Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
* Ensure the cursor delegate position is correct when wrapping.Andrew den Exter2012-04-191-20/+27
| | | | | | | | | | When inserting text into a TextEdit with implicit width and wrapping the cursor delegate position has to be updated after the width is expanded to the implicit width otherwise it will be positioned in a wrapped location. Change-Id: Ibcb709ec1b4f6827ea8ae919f2e0c932c7372869 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* QQuickTextEdit to trigger input method updates on selectAll()Pekka Vuorela2012-04-121-5/+8
| | | | | | Change-Id: I8642eca0e584b811308b73817e7decf2f392f1b5 Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com> Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
* Set cursorVisible to false when im cursor length is 0.Andrew den Exter2012-04-021-13/+61
| | | | | | | | | | | | If the length of the QInputMethodEvent::Cursor attribute is 0 the cursor is supposed to be hidden. To ensure this and any other IM state is reverted when the input method is reset send a empty event to the editor when preedit is cancelled or removed and count formatting or cursor changes when determining if the input method is composing (i.e has state that needs to be reset). Change-Id: Ifca69aa0c18776b1aef355ed6ae9aecc40b9d475 Reviewed-by: Yann Bodson <yann.bodson@nokia.com>
* Remove tentative commit from editorsPekka Vuorela2012-03-261-14/+5
| | | | | | | | | Feature to be reimplemented simplified. Now using new FocusAboutToChange event for using input method to commit stuff when window is losing focus. Change-Id: I81c96c36d9f0a1b38adb4324f3b892c33547cb50 Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com>
* Make TextEdit word selection behaviour consistent.Andrew den Exter2012-03-201-22/+5
| | | | | | | | | | | | | Word selection initiated by a double click in QTextEdit only selects a word if the drag point is closer to the end than the start (assuming ltr selection) which can make it difficult to select small words with touch input, as such the SelectWords mouseSelectionMode of TextEdit selected a word if the drag point intersected any part of the word. Since we no longer have to retain compability for QTextEdit we can settle on a single behaviour for word selection. Change-Id: Iaabb7938a2b61b84a290a9ee41e407c83144b96f Reviewed-by: Yann Bodson <yann.bodson@nokia.com>
* Remove unused functions from QQuickTextControl.Andrew den Exter2012-03-201-100/+0
| | | | | Change-Id: I036a2c2ff05cd94a7c58e29bf8743fef3a550fbd Reviewed-by: Yann Bodson <yann.bodson@nokia.com>
* Reduce QQuickTextEdit memory usage.Andrew den Exter2012-02-231-86/+8
| | | | | | | | | Remove unnecessary members from QQuickTextEditPrivate and QQuickTextControlPrivate and re-order and pack to reduce padding for alignment. Change-Id: I14f5e3fc01646d02745f095c2a4b168cd675745d Reviewed-by: Yann Bodson <yann.bodson@nokia.com>
* Use QInputMethod instead of deprecated QInputPanelPekka Vuorela2012-02-101-4/+4
| | | | | | | | | | Similarly deprecate Qt.application.inputPanel and introduce replacement Qt.inputMethod. Change-Id: Ie4fd467f93f75023c86b0a2d038d858fe5001146 Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Sami Kananoja <sami.kananoja@nokia.com>
* Add a persistentSelection property to TextInput.Andrew den Exter2012-02-021-1/+2
| | | | | | | | Improves feature parity with TextEdit. Task-number: QTBUG-16355 Change-Id: I3919c71454a4f4574a1ee35ad38969459beb8363 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Remove "All rights reserved" line from license headers.Jason McDonald2012-01-301-1/+1
| | | | | | | | | | As in the past, to avoid rewriting various autotests that contain line-number information, an extra blank line has been inserted at the end of the license text to ensure that this commit does not change the total number of lines in the license header. Change-Id: If39bd256b0fa85eba17ea30f8ab87ea27d758908 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Update obsolete contact address.Jason McDonald2012-01-231-1/+1
| | | | | | | | Replace Nokia contact email address with Qt Project website. Change-Id: I6a730abc0c396fb545a48b2d6938abedac2e3f1c Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com> Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
* Avoid creating unnecessary copies of TextEdit's text data.Andrew den Exter2012-01-161-1/+1
| | | | | | | | Delay rebuilding the text data from QTextDocument until it is actually requested rather than everytime the contents of the document change. Change-Id: Ibfdc9e9e0372010f0731fb02a223c8b59a67f2c3 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Add undo and redo functions to TextInput and TextEdit.Andrew den Exter2012-01-121-6/+0
| | | | | | | | | The functionality already existed and was usable through keyboard short cuts but was not accessible through API. Task-number: QTBUG-16191 Change-Id: I080fa2ddb76668a7a632aa7477004f99037ea68b Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Update copyright year in license headers.Jason McDonald2012-01-051-1/+1
| | | | | Change-Id: I0a8d99909cac867dce72da70b1bbcb649989a51b Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Delay initializing the canPaste property until it's requested.Andrew den Exter2011-12-211-2/+2
| | | | | | | | | | With xcb querying data from the clipboard can take as long as 50 ms. Deferring the check until it is requested speeds up construction time when it's not used and only checking the available formats when it is requested should also help. Change-Id: I796fc83d0457d9ac1490cfb9f510c6342eb8a872 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Activate links in a read only TextEdit.Andrew den Exter2011-12-151-3/+6
| | | | | | | | | Don't ignore mouse press events if the LinksAccessibleByMouse interaction flag is set. Task-number: QTBUG-23065 Change-Id: I25b3e3b0cf194b71fc863ed239196a567f42c19c Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Remove QQuickTextControl::ensureCursorVisible()Andrew den Exter2011-12-151-32/+18
| | | | | | | | | | | | QQuickTextEdit doesn't implement scrolling internally and QML code will use the cursorRectangle property to determine if it should scroll. All instances of ensureCursorVisible() have been replaced by cursorRectangleChanged() which was previously microFocusChanged(). Task-number: QTBUG-22627 Change-Id: I5df9e1d1cb4a8553eabd417a658e80da1c27e10c Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Remove unused code from QQuickTextControl.Andrew den Exter2011-12-151-885/+31
| | | | | | | | | | | QTextControl included a lot of functionality that was unused by TextEdit. Anything that is unused and therefore untested should go. Task-number: QTBUG-22627 Change-Id: Ie68b279cb8618bec0af76287c7c4db34d0642a0a Reviewed-by: Martin Jones <martin.jones@nokia.com>
* QQuickTextControl - mouse events to override input contextPekka Vuorela2011-12-141-116/+141
| | | | | | | | | | | | | | - Selection can start on top of preedit - Mouse press outside preedit commits - Double click to commit on top of preedit - Focus out to commit preedit Similar to qtbase 4b3d88a9c67402b6a234d597bab25846f039bbdb and b5c37d9e137dee2754335e83b8437dfd0e6cc7e7 for QTextEdit Change-Id: Ib9c37528ba7fd588ee993b7ff33f79f96857e421 Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com> Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
* Protect QTextControl::setTextCursor for existing preeditPekka Vuorela2011-12-141-0/+1
| | | | | | Change-Id: I29fc7c472a3a20eeaf74e0dc411313e5750e9dee Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com> Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
* TextEdits to include tentative commit in text propertyPekka Vuorela2011-12-141-0/+19
| | | | | | | | | | Similar to what qtbase 1dbfbf4c66187e7522888c19d78024cfceaea570 did for QTextEdit. Now available only in plain text, html support pending. Change-Id: I0b23a45fc484512d3354f66e1a6134e2d70eb8b5 Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com> Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
* Create a copy of QTextControl in the QtDeclarative library.Andrew den Exter2011-12-091-0/+2868
First half of a move of QTextControl from qtbase to qtdeclarative, some time in the future QTextControl will be deleted from qtbase to finish the move. Task-number: QTBUG-22627 Change-Id: I72da2c71ab5b090e2a0a15219b81e522e97c541b Reviewed-by: Lars Knoll <lars.knoll@nokia.com>