aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items/qquicktextinput_p_p.h
Commit message (Collapse)AuthorAgeFilesLines
* qquicktextinput: Fix validation for IM eventBartlomiej Moskal2021-02-191-1/+9
| | | | | | | | | | | | | | | | | | If validation did not pass after text pre-editing is finished, it need to be roll back to state before pre-editing started. Before this change, if validation did not pass, text was always rolled back to previous state. In pre-editing text case, it means back to the state in which part of the text was removed (and later changed to pre-edited text). It may cause a situation of removing part of the text that was already validated Fixes: QTBUG-90239 Change-Id: I3ec39e0f6b8a93d4e6fd190af30d4c80a0e495eb Reviewed-by: Rami Potinkara <rami.potinkara@qt.io> Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> (cherry picked from commit b1ae151acc80254ab0ec2937c55b99223205875c) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QQuickTextInput: Store mask data in std::unique_ptrFabian Kosmale2020-11-241-1/+3
| | | | | | | | | | This ensures that the memory is freed reliably Fixes: QTBUG-88807 Change-Id: I841a5a2b226a69ce50975d95702a948857d1b54f Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> (cherry picked from commit d2d8e90e9f218103d60737e1273ab5322834d9ec) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* qquicktextinput: compile with explicit QChar(int) constructorDavid Faure2020-11-091-1/+1
| | | | | Change-Id: I78fe89cd97b462299969d57cda099ce54fa8078a Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* QQuickTextInputPrivate: refactor getImplicitWidth() to calculateImplicitWidth()Mitch Curtis2020-06-121-0/+1
| | | | | | | | | | | | This patch moves the implicit width calculation in getImplicitWidth() into calculateImplicitWidth(const QString &text). This allows QQuickComboBox in qtquickcontrols2 to get the implicit width of a TextInput (TextField) item, as QQuickTextInput does some extra layouting and accounting for padding that QFontMetrics does not. Change-Id: I81e6c2627e21ca4d89ea9502abbb6aec79068793 Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* TextInput: Stop leaking password values to process memoryIvan Čukić2019-01-291-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | The contents of a deleted QString can still remain in memory and can be accessible by tools that read the raw process memory. The same problem appears when the QString reallocates -- the old buffer gets deleted, but its contents will remain in memory. This means that a TextInput that serves as a password input field can leak parts of the password while the user is entering it (due to reallocation) and the whole password when the TextInput instance is destroyed. With this patch, the contents of the m_text string member variable will be zeroed-out before the TextInput is destructed. This is done only in the cases when the TextInput serves as a password field. Also, this patch reserves the space for 30 characters for m_text when the TextInput is used for password input. This is enough to make sure no reallocation happens in majority of cases as barely anyone uses passwords longer than 30 characters. [ChangeLog][QtQuick][TextInput/security] When the TextInput is used for password input, preallocate a buffer for the string that stores the entered value and zero-out the string on TextInput destruction to avoid leaking sensitive data to process memory Change-Id: I8f1f307b1cfc25ad51f48bae8509a258042a2e7f Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* use nullptr consistently (clang-tidy)Shawn Rutledge2018-02-261-3/+3
| | | | | | | | | | | | | From now on we prefer nullptr instead of 0 to clarify cases where we are assigning or testing a pointer rather than a numeric zero. Also, replaced cases where 0 was passed as Qt::KeyboardModifiers with Qt::NoModifier (clang-tidy replaced them with nullptr, which waas wrong, so it was just as well to make the tests more readable rather than to revert those lines). Change-Id: I4735d35e4d9f42db5216862ce091429eadc6e65d Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Replace Q_DECL_OVERRIDE with overrideKevin Funk2017-09-251-2/+2
| | | | | Change-Id: I176f91a8c51e81a2df3fe91733118261491223ee Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Add a way to set the default render type of text-like elementsGiuseppe D'Angelo2017-08-231-5/+2
| | | | | | | | | | | | | | | | | | | | | | | | | f3446071da8357620d0c8593a04e3b4fbba88f21 introduced a build-time way to select the default render type of text-like elements. This patch adds also a way to select it at runtime, via a setter on QQuickWindow. (QQuickWindow has been chosen as convenience, rather than adding another namespace/class to just have this setter.) Given that QT_QUICK_DEFAULT_TEXT_RENDER_TYPE was never documented, I've taken the liberty of changing the accepted values for it (to match the new enumerator names in QQuickWindow, rather than the ones in QQuickText/QQuickTextEdit/etc.). [ChangeLog][QtQuick][QQuickWindow] It is now possible to set the default render type of text-like elements globally via the QQuickWindow::setTextRenderType() function. If you were using the (undocumented) QT_QUICK_DEFAULT_TEXT_RENDER_TYPE macro when building Qt Quick for the same purpose, note that the macro value needs now to be set to the "NativeTextRendering" value, instead of "NativeRendering". Change-Id: Id4b2dc3ec823971486e445ca4173b8be848fb4e3 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Accept PUA characters, ZWNJ and ZWJ as input in TextInput/EditEskil Abrahamsen Blomfeldt2016-12-131-0/+2
| | | | | | | | | | | | | | | Private Use Area characters are quite valid input characters when used in combination with a custom font. Joiners also serve an important language purpose in semitic writing systems. [ChangeLog][QtWidgets][Input] Support characters in Private Use Area, as well as zero-width joiners and zero-width non-joiners in input in TextInput and TextEdit. Task-number: QTBUG-42074 Task-number: QTBUG-57003 Change-Id: I4a9d6b9ea172d29375c20abfb7aebb6748c5d300 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
* Get rid of most QT_NO_FOO usagesLars Knoll2016-11-291-13/+13
| | | | | | | | Instead use QT_CONFIG(foo). This change actually detected a few mis-spelled macros and invalid usages. Change-Id: I06ac327098dd1a458e6bc379d637b8e2dac52f85 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Merge remote-tracking branch 'origin/5.7' into devLiang Qi2016-05-131-5/+7
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/qml/jsapi/qjsengine.cpp src/qml/qml/qqmlengine_p.h src/quick/items/qquickanchors.cpp src/quick/items/qquickanimatedimage_p_p.h src/quick/items/qquickitem_p.h tests/auto/qml/qqmlecmascript/testtypes.h tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp tests/benchmarks/qml/creation/tst_creation.cpp Change-Id: I65861e32f16e8a04c7090a90231627e1ebf6ba6f
| * QQuickTextInput: Listen for changes to cursorFlashTimeRichard Moe Gustavsen2016-04-211-5/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | cursorFlashTime will now change dynamically from QPA while platform controlled text selection (on mobile) is ongoing. This patch will therefore update QWidgetLineControl so that it listens to the cursorFlashTimeChanged signal and changes the blinking rate when triggered. The previous code had a function setCursorBlinkPeriod, which is now changed to setBlinkingCursorEnabled (like in QQuickTextControlPrivate). This is because all callers of the function did either pass "QApplication::cursorFlashTime" or "0", which basically means enable or disable blinking. This moves the control of the blinking rate fully to updateCursorFlashTime, which simplifies the code a bit, especially when cursorFlashTime can change. Note that when setting a blink period to 0, it means "show the cursor without blinking". AFAICS, the current implementation did not guarantee that. This is now made more explicit in the code. If hiding the cursor is needed, a separate function "setCursorVisible" is already available for controlling that. Change-Id: Ie3222525474e03b485ff8585fd8d7da6fd5b26e5 Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.7' into devLiang Qi2016-05-041-0/+2
|\| | | | | | | Change-Id: I694ac053b53b669ef5578fd0074de5ce109f7a09
| * Add support for input method selection handlesJan Arve Sæther2016-04-141-0/+2
| | | | | | | | | | | | | | | | | | QQuickTextInput needs to report back Qt::ImhAnchorRectangle, and make it possible to query the cursor position of any given point with inputMethodQuery(Qt::ImCursorPosition, point) Change-Id: Iabe1946e7a8642b51c4601b51e2a13763bdbbd0c Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com>
* | Add overwriteMode to QML TextEdit and QML TextInputDan Cape2016-03-031-0/+2
|/ | | | | | | | | | Overwrite mode was added to QML TextEdit and QML TextInput to match the functionality provided by QTextEdit. Tests were updated as well to ensure the mode functions as expected. Task-number: QTBUG-26513 Change-Id: I1769159b298220107b09f9f13dc3af5f274715cc Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* Updated license headersJani Heikkinen2016-01-191-14/+20
| | | | | | | | | | | From Qt 5.7 -> LGPL v2.1 isn't an option anymore, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new LGPL header instead of LGPL21 one (in those files which will be under LGPL v3) Change-Id: Ic36f1a0a1436fe6ac6eeca8c2375a79857e9cb12 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* QQuickTextInput: added clear() methodLiang Qi2016-01-191-0/+1
| | | | | | Task-number: QTBUG-50428 Change-Id: I394c2cf1bc397dcbf6d82d3211a6b39519d7582b Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Merge remote-tracking branch 'origin/5.6' into devLiang Qi2015-10-141-1/+4
|\ | | | | | | Change-Id: I11ea57222ba5aa683b7bfd7735fbc1d2cf86e875
| * QQuickTextEdit/Input: revise implicit resizing - take twoJ-P Nurmi2015-10-041-6/+2
| | | | | | | | | | | | | | | | Referencing unexported symbols (ExtraData) from an inlined method does not work with MinGW. Change-Id: I19935c84c4e2014f73bcd1801d182d193166bd44 Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
| * QQuickTextEdit/Input: revise implicit resizingJ-P Nurmi2015-10-031-1/+8
| | | | | | | | | | | | | | | | | | | | Rename explicitImplicitSize to better descriptive implicitResize, and add a method to disable the default behavior. QQuickTextField was unable to access the flag directly, because ExtraData is not exported (and we prefer to keep it that way). Change-Id: Ia8b8281267adfc376e03a14882708e9cf80f0451 Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
* | Add a way to set default font rendering at build time.Stephen Kelly2015-10-131-0/+4
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QML text rendering elements have a renderType property controlling whether to use 'Qt' rendering or 'Native' rendering. There is no reason to mix different types of rendering in one static ui. The element-local properties may be used to change the rendering type during animation for example, but otherwise there should be an application-wide rendering mode for text. That means that all Text-based elements in QML should default to the same rendering mode. Additionally, applications wishing to use NativeRendering, wish to use it for all text-based elements, so they require changing the defaults of the elements themselves, still allowing the possibility of changing the rendering mode during animation. Creating third party wrappers for each of the QML text rendering types is not a solution because an application requires the same font rendering for all text. That is, whether written directly with QML Text* elements, or using QtQuick controls, or another 3rd party component set, it is necessary to set the same font rendering mode for all text, except in temporary execptional cases. The known options to achieve this are 1) Create an environment variable to set the default rendering. 2) Add C++ API to set the default 3) Add a build-time option to set the default. The first option is unsatisfying because it is fragile and is easy to get wrong. The second option is incomplete because it does not affect qmlscene etc, so it would require adding a command line argument to qmlscene to change the default. That is unsatisfying because it is also fragile. It is necessary for the sanity of developers and designers (and also end users) that qmlscene use the correct default by default. It must be easy to create qml files for designers to run with qmlscene and which look correct. The third option is the one chosen for this patch. It is most suitable for environments where the Qt build and settings are contained because a particular Qt build is shipped with the application using it (This is the most common way Qt is used). It affects all uses of the text rendering elements, whether used through qmlscene or through another entry point, and it allows changing the property in QML code away from the build-time-determined default. When building Qt, -DQT_QUICK_DEFAULT_TEXT_RENDER_TYPE=NativeRendering may be passed to configure to affect the default rendering for the Qt build. It also leaves the question why the default text rendering is 'Qt' instead of being 'Native', given that many of the Qt controls need to switch to Native anyway (though this depends on the platform and the style). Change-Id: Ib0eed61caf4895b29e5c05e0418fad9962779f85 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* TextInput & TextEdit: allow controls to override the implicit sizeJ-P Nurmi2015-09-061-0/+1
| | | | | | Change-Id: I4b5eae46a9fef574249eee9061858bdf874c54be Reviewed-by: Liang Qi <liang.qi@theqtcompany.com> Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
* Export QQuickTextInputPrivate and QQuickTextEditPrivateJ-P Nurmi2015-06-231-1/+1
| | | | | | | ...so that QtQuick.Controls 2 TextField and TextArea can inherit them. Change-Id: I9383927c51a70848753a9f41f374d4161000fbb1 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
* QQuickTextInput: move paddings into extraDataLiang Qi2015-06-151-19/+17
| | | | | | Task-number: QTBUG-46529 Change-Id: Ifa072dccdf2dc8c52c6865d13ccf1930c92ec51d Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* Merge "Merge remote-tracking branch 'origin/5.5' into dev" into refs/staging/devGabriel de Dietrich2015-03-061-4/+4
|\
| * Fix invocations of static methods of QGuiApplication/QCoreApplication.Friedemann Kleint2015-03-051-4/+4
| | | | | | | | | | Change-Id: I7bcc209b0c6e77cf6d974af85a19487345a48975 Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
* | TextInput: add support for paddingJ-P Nurmi2015-03-051-0/+24
|/ | | | | | | | | | | | | | This makes it possible for TextField to inherit TextInput, reserve space for the decoration, and set the desired property defaults without having to create dozens of property aliases. [ChangeLog][QtQuick][TextInput] Added padding, leftPadding, topPadding, rightPadding and bottomPadding properties. Task-number: QTBUG-41559 Change-Id: Iaa7697a10a6f66685c7cae454edf4c1984d411bc Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com> Reviewed-by: Alan Alpert <aalpert@blackberry.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>
* Merge remote-tracking branch 'origin/5.4' into devOswald Buddenhagen2014-09-111-21/+11
|\ | | | | | | | | | | | | | | | | Conflicts: src/quick/items/qquickpainteditem.h src/quick/items/qquickshadereffectsource.cpp src/quick/items/qquickshadereffectsource_p.h Change-Id: If98096443afe85fc4370cef971eace050006a61b
| * Fix cursor blinking for TextInput and TextEditSimon Hausmann2014-08-261-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before commit fb339b21b8a24b835cea7a057c47b7c5ad80dd72 relied on the simple transparent rectangle node to remain invisible. After that commit we used the regular rectangle node, which doesn't seem to like toggling the color between transparent and solid black and therefore the cursor was always visible. As advised by Gunnar this patch implements a much simpler logic: When the cursor is supposed to be invisible, we just don't create a scene graph node for it anymore. Change-Id: I7b0e173f6d37997559ee0911f37903efdb14847f Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com> Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
| * 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>
* | Add Q_DECL_OVERRIDEAlbert Astals Cid2014-08-141-2/+2
|/ | | | | Change-Id: I2e64950aef710f943c3bc50bc9bf8a1f7fb58d28 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* Introduce TextInput::ensureVisible(int position)J-P Nurmi2014-05-211-0/+1
| | | | | | | | | | | | | | | This is required for TextField to be able to implement text selection handles. TextField needs to be able to ensure that the appropriate character position becomes visible when the handles are moved around. [ChangeLog][QtQuick][TextInput] Added TextInput::ensureVisible(int pos) method to be able to control the scrolling position of a TextInput that has automatic scrolling enabled. Task-number: QTBUG-38934 Change-Id: Id77eafcda6324d10868e0798519e5b712a0d33ed Reviewed-by: Alan Alpert <aalpert@blackberry.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* Makes PasswordMaskDelay configurable through TextInputRisto Avila2014-03-121-0/+2
| | | | | | | | | | | Adds a new property to TextInput which can be used to override QPlatformTheme::PasswordMaskDelay. The new property is TextInput.passwordMaskDelay and takes in delay (ms) which time character is shown before masking it. This is only when echoMode is set to TextInput.Password [ChangeLog][QtQuick][TextInput] Added passwordMaskDelay property Change-Id: I52812b883db11fdd21b25154887c51df8a44f69c Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* Update QQuickTextInput's baselineOffset when only height changesJan Arve Saether2014-02-221-0/+1
| | | | | | | Task-number: QTBUG-36529 Change-Id: I2cd577013c4965e76c9350abaebb9b7a6e4e0270 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* Fix license headers of QtQuick sources.Gunnar Sletta2013-09-301-1/+1
| | | | | Change-Id: I3750c47640bf21c3567c5fa1c4667e3e2552942e Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Get rid of the first half of QQmlGuard usageLars Knoll2013-07-051-2/+2
| | | | | | | | | QQmlGuard was being used as a more performant replacement for QPointer. QPointer got now fixed in Qt 5.0, making this class obsolete. Change-Id: I77eef066c4823af4b074ef32d4d78dbd67c36cd0 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Use the platform theme's password mask character for text input fields.Mitch Curtis2013-04-231-1/+1
| | | | | | | | Task-number: QTBUG-29871 Change-Id: I3b15dfab5ca6455df465c502c93aac7b85a64531 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com> Reviewed-by: Caroline Chao <caroline.chao@digia.com>
* TextInput: Handle focus event directlyCaroline Chao2013-03-071-1/+1
| | | | | | | | | Use focusInEvent and focusOutEvent instead of changeItem to handle focus event. (One benefit is the focus events have the focus reason and changeItem doesn't). Change-Id: I164820f375f0ffddc529d59565a3e448b84c6042 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* 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>
* Compile with QT_NO_VALIDATOR.Volker Krause2012-11-301-3/+3
| | | | | | | | Theses enums were apparently renamed for the case QValidator is present, so follow this here as well. Change-Id: Ic2a3fd5296a6dd9da356c2e5efd88f56d0843664 Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
* Enable module build with QT_NO_IMTasuku Suzuki2012-11-261-1/+19
| | | | | | 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 restoration of cursor position and selection after undo/redo.Andrew den Exter2012-07-241-0/+5
| | | | | | | | | If a text selection was deleted, the selection should be restored by an undo, but not if the selection was part of an atomic operation like the DeleteStartOfWord key sequence. Change-Id: Ia37f29c78f6367c60377c539c4e394e014485a49 Reviewed-by: Yann Bodson <yann.bodson@nokia.com>
* Add option to use native rasterizer for SceneGraph textEskil Abrahamsen Blomfeldt2012-07-101-0/+2
| | | | | | | | | | For old-style (desktop components) apps using QML 2 on regular density displays, distance field text will look out of place. We introduce an option to use the native rasterizer instead if you would rather have native look and feel than scalable text items. Change-Id: Idb38e3c89f2deab9ae1963357c6c5fb235ddeab8 Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
* Defer construction of TextEdit/TextInput delegates.Andrew den Exter2012-05-141-1/+8
| | | | | | | | | | | | | | | Don't create instances of the delegate components until the item gains focus, or the cursorVisible property is set to true. Cursor delegates are typically small and relatively fast to create and so won't have a significant cost during a one off focus in event, but that cost can still add up when creating a number of TextInputs or TextEdits at once. If a delegate that is instantiated immeditately is required it is possible to instead create a child item and bind to the cursorRectangle and cursorVisible properties. Change-Id: I5ec2b5b6a30e534aee3dd5a58c6a5ac0686f5ce2 Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
* QQuickTextInput aligment to follow input method on neutral contentPekka Vuorela2012-04-271-8/+2
| | | | | | | | | | | | Earlier input method was followed only on empty editor. This made inputting one space character with arabic to be visualized left to right. As related change arabic numbers are aligned right even though the flow goes left to right. Change-Id: I36448949569f6290faad69de14df424575d8b97e Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
* Fix bounding rects of text items.Andrew den Exter2012-04-271-1/+1
| | | | | | | | | | Ensure the rectangles are correctly positioned with right and center aligned text, not just sized correctly. Also add padding to the clip rects so the cursor and styled text aren't clipped at the item boundaries. Change-Id: I03ef140589154ebd49b600b0a4c4fbeff845c10f Reviewed-by: Yann Bodson <yann.bodson@nokia.com>
* Set cursorVisible to false when im cursor length is 0.Andrew den Exter2012-04-021-2/+3
| | | | | | | | | | | | 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>
* TextInput to use password mask delay if platform style defines onePekka Vuorela2012-03-271-4/+0
| | | | | | | Change-Id: I05b98db2d7855f29b11749524a74e04a71178347 Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>