summaryrefslogtreecommitdiff
path: root/src/quick/items/qquicktextinput.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Add support for shared glyph cacheEskil Abrahamsen Blomfeldt2012-01-241-2/+28
| | | | | | | | Use a shared graphics cache to back the distance fields if it is available. Change-Id: Id5e6e7a28e38e349d787e66016b2d0faebc791d7 Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
* TextInput documentation fixDamian Jansen2012-01-241-6/+6
| | | | | | | A few instances where TextEdit is indicated Change-Id: I6d6a6c1f92d673978856befb9c2581b657cdb0f7 Reviewed-by: Andrew den Exter <andrew.den-exter@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>
* Update TextInput.acceptableInput on component complete.Andrew den Exter2012-01-201-21/+41
| | | | | | | | | | | | QValidator doesn't notify when it's validation criteria changes so is susceptible to order of evaluation issues. Deferring the initial validation will ensure validators with static criteria are correctly applied. Notification from QValidator on changes would solve this for all cases: QTBUG-23694. Task-number: QTBUG-21103 Change-Id: I920f36645fd18ce809db56b5daf73545f1d603dc Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Extend the documentation on DoubleValidator.Andrew den Exter2012-01-191-0/+17
| | | | | | | | Elaborate on what is valid, intermediate, and invalid. Task-number: QTBUG-22081 Change-Id: If0ef270eaee60b530fdf6275e36b2208d41c7639 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Made QQuickTextInput follow input direction changesPekka Vuorela2012-01-171-6/+30
| | | | | | | | | | | | | Cursor of empty field should align based on input method direction. Now input method allowed to change direction on run time. Also earlier cursor wasn't properly drawn on correct alignment at all. Change-Id: I4601f10e6b5dde09591bd484b05f001add6c1573 Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com> Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
* Fix preedit text visibility when TextInput is emptyJiang Jiang2012-01-121-1/+1
| | | | | | | Task-number: QTBUG-22646 Change-Id: I5162ffdebdee6f956a9a79b2307a2ac53cc4890b Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
* Adapt to QInputPanel::inputDirection() APIPekka Vuorela2012-01-121-1/+2
| | | | | | | Information moved from QGuiApplication into QInputPanel. Change-Id: Idd80609f4b67bffae7222a1fa27918724ebf60f6 Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
* Fix validators not allowing backspace or delete.Andrew den Exter2012-01-121-2/+6
| | | | | | | | | | TextInput will allow non-valid changes to already invalid text, when a validator is changed update the current validity so changes can be made to bring the text back to a valid state. Task-number: QTBUG-22080 Change-Id: I501961b473f58c317bce474b1df8d91fd1f967d4 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Add undo and redo functions to TextInput and TextEdit.Andrew den Exter2012-01-121-4/+73
| | | | | | | | | 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>
* Fix failing tst_qquicktextinput::horizontalAlignment_RightToLeft test.Andrew den Exter2012-01-121-1/+2
| | | | | | | | | | How the text is laid out is dependent on the horizontalAlignment so that needs to be determined before updating the display text and doing the layout. Task-number: QTBUG-23485 Change-Id: I1872b1bfc60fd829a0d69c21a19cd3b2b4dc8340 Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
* QQuickTextInput to better call QInputPanel::update()Pekka Vuorela2012-01-051-4/+17
| | | | | | | | | | Some updates were previously omitted, e.g. if text content changed but cursor position remained the same, or if input method changed the selection. Change-Id: I11abd105632d73f8ebb23d0e8c308c53c236cc15 Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com> Reviewed-by: Lars Knoll <lars.knoll@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>
* Document inputMethodHints and cursorRectangle properties.Andrew den Exter2012-01-051-2/+53
| | | | | | | Task-number: QTBUG-22612 Task-number: QTBUG-20764 Change-Id: Ibab86c5934f0ad6e3115a00371a5b2a6961720b5 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Fix clipping of TextInput contents.Andrew den Exter2012-01-051-3/+1
| | | | | | | | | | | | The boundingRect represents the clip rectangle of an item rather than the size and position of its unclipped content. This would prevent any content from being clipped except the boundingRect is only re-evaluated when the size of the item changes so the content is instead clipped to the size of the original content. Task-number: QTBUG-23422 Change-Id: I96f830f833129b3230f65452db67b00028c40d6a Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Add length property and insert, remove and getText functions to TextInput.Andrew den Exter2012-01-041-5/+195
| | | | | | | | These mimic the functionality of their pre-existing counterparts in TextEdit. Change-Id: Idcb7549cd07ed3c287ab00b7828a3158690faf0e Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Fix crash in TextInput.Andrew den Exter2012-01-041-7/+9
| | | | | | | | | Ensure the text is laid out before calling componentComplete() on QImplicitSizeItem, as that can potentially evaluate bindings which would then access the uninitialized layout. Change-Id: I5152c1494c54209dae61c13b2f45d343fb76bf9e Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
* Speed up TextInput and TextEdit creation.Andrew den Exter2012-01-041-3/+1
| | | | | | | | Update the canPaste property directly when changing the read-only property instead of connecting to the readOnlyChanged signal. Change-Id: Ic6f6ba66f6b94448045703f7d2a66218548190dd Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Use Qt::ImhSensitiveData input hint on TextInput with password echo modePekka Vuorela2012-01-031-1/+1
| | | | | Change-Id: I1e9255af24b51ca42c1e6df7a92664be532ce725 Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
* Remove use of Qt::ImhMultiLine, to be deprecated/removedPekka Vuorela2012-01-031-1/+0
| | | | | Change-Id: I02a1611c945bf3804081bb9d0cd8da470a5774d8 Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
* Remove uneccessary layout in TextInput initialization.Andrew den Exter2011-12-211-27/+12
| | | | | | | | | | The layout was only done to ensure there was always at least one QTextLine in the layout to avoid validity checks later, but since lineForTextPosition can return an invalid QTextLine the checks are still needed anyway. Change-Id: Iae65e3460812a60e2aafecd553bf4241bd640d04 Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
* Delay initializing the canPaste property until it's requested.Andrew den Exter2011-12-211-3/+14
| | | | | | | | | | 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>
* Make editors commit preedit themselves on losing focusPekka Vuorela2011-12-201-1/+4
| | | | | Change-Id: I1d42a8804068718c7347b4f652289f9724c25a3c Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
* QQuickLineControl more robust on input method & selection statePekka Vuorela2011-12-201-0/+1
| | | | | | | | | | | | | Input method event having replacement information out of bounds left the controller in selection state when it shouldn't be. Also now more liberal on accepted events. We cannot detect if input method is confused for replacement inside boundaries, but going beyond the end is more likely to be meant to replace until the end than to leave previous text in addition to the new one. Change-Id: I485009ac682c11876b39f7e22d7dfb91a6d162fe Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com> Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
* Delay masking the last character in Password echo mode.Andrew den Exter2011-12-201-3/+43
| | | | | | | | | | | | | | | If QT_GUI_PASSWORD_ECHO_DELAY is defined in qplatformdefs.h with an integer value in milliseconds, QLineEdit and TextInput will display the last character entered unmasked for that delay period and then mask the character as normal. If QT_GUI_PASSWORD_ECHO_DELAY is not defined then the behaviour is unchanged. Task-number: QTBUG-17003 Task-number: QTBUG-20719 (cherry picked from commit f9e7aee2019d321edd655bfde7de43f20a106971) Change-Id: I9a8647a0adeb94fc6beea949cdce7336671c898e Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Add wrapMode and verticalAlignment properties to TextInput.Andrew den Exter2011-12-201-114/+275
| | | | | | | | | | | | Wrap mode provides an alternative to horizontal scrolling when the width of the text exceeds the width of the TextInput. With auto scroll wrapping introdoces an implicit verticalAlignment so support setting it explicitly as well. Task-number: QTBUG-22305 Task-number: QTBUG-16203 Change-Id: I1bd3a5335edb3ac48df3d5ccd8ae7274caa91883 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Merge QQuickLineControl into QQuickTextInput.Andrew den Exter2011-12-161-201/+1590
| | | | | | | | | | There's no clear separation of responsibilty between these classes and keeping them in sync and forwarding signals is a unnecessary overhead that can be avoided by combining them. Task-number: QTBUG-22627 Change-Id: I4350eb3c612b10d4ed34886374889ae893b8183a Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Remove unused code from QQuickLineControl.Andrew den Exter2011-12-151-18/+56
| | | | | | | Task-number: QTBUG-22627 Change-Id: I234977638ac6d42ad0fa648ae366823e5c542ed6 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Create a copy of QLineControl in the QtDeclarative library.Andrew den Exter2011-12-121-6/+6
| | | | | | | | | | First half of a move of QLineControl from qtbase to qtdeclarative, some time in the future QLineControl will be deleted from qtbase to finish the move. Task-number: QTBUG-22627 Change-Id: I0c3449f57f1a3296a0ff52f2b9a1a78041ae28b2 Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
* Fix TextInput not reacting to text color change.Andrew den Exter2011-12-121-2/+7
| | | | | | | | | | Trigger a relayout with the new color when the color property is changed. Task-number: QTBUG-22402 Change-Id: I2dc190e097e878ac498fd04c2800a6e11947527c Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
* Size TextInput cursor correctly.Andrew den Exter2011-12-121-9/+2
| | | | | | | | | Use the cursorRectangle property to size and position the TextNode's cursor rather than recalculating the rectangle in an incompatible way. Task-number: QTBUG-22386 Change-Id: I8ee02b590796b0304683b9b246aba1e59c1fd6a5 Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
* Say hello to QtQuick moduleKent Hansen2011-12-021-0/+2007
This change moves the QtQuick 2 types and C++ API (including SceneGraph) to a new module (AKA library), QtQuick. 99% of this change is moving files from src/declarative to src/quick, and from tests/auto/declarative to tests/auto/qtquick2. The loading of QtQuick 2 ("import QtQuick 2.0") is now delegated to a plugin, src/imports/qtquick2, just like it's done for QtQuick 1. All tools, examples, and tests that use QtQuick C++ API have gotten "QT += quick" or "QT += quick-private" added to their .pro file. A few additional internal QtDeclarative classes had to be exported (via Q_DECLARATIVE_PRIVATE_EXPORT) since they're needed by the QtQuick 2 implementation. The old header locations (e.g. QtDeclarative/qquickitem.h) will still be supported for some time, but will produce compile-time warnings. (To avoid the QtQuick implementation using the compatibility headers (since QtDeclarative's includepath comes first), a few include statements were modified, e.g. from "#include <qsgnode.h>" to "#include <QtQuick/qsgnode.h>".) There's a change in qtbase that automatically adds QtQuick to the module list if QtDeclarative is used. Together with the compatibility headers, this should help reduce the migration pain for existing projects. In theory, simply getting an existing QtDeclarative-based project to compile and link shouldn't require any changes for now -- but porting to the new scheme is of course recommended, and will eventually become mandatory. Task-number: QTBUG-22889 Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Change-Id: Ia52be9373172ba2f37e7623231ecb060316c96a7 Reviewed-by: Kent Hansen <kent.hansen@nokia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>