aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items/qquicktextnode.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Get rid of most QT_NO_FOO usagesLars Knoll2016-11-291-2/+2
| | | | | | | | 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 5.8Liang Qi2016-11-281-3/+5
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The renderers added in 5.8 had to be adapted to the changed profiling macros from 5.6. Conflicts: src/plugins/scenegraph/d3d12/qsgd3d12renderloop.cpp src/plugins/scenegraph/d3d12/qsgd3d12threadedrenderloop.cpp src/quick/scenegraph/adaptations/software/qsgsoftwarerenderloop.cpp src/quick/scenegraph/adaptations/software/qsgsoftwarethreadedrenderloop.cpp src/quick/util/qquickprofiler_p.h tests/auto/qml/qjsengine/tst_qjsengine.cpp tests/auto/qml/qqmlvaluetypes/tst_qqmlvaluetypes.cpp Change-Id: Icb370b7c95aab12589ad73881ac6d178759a5c6b
| * Merge remote-tracking branch 'origin/5.6' into 5.75.7Liang Qi2016-11-251-3/+5
| |\ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/qml/compiler/qv4ssa.cpp src/qml/qml/v8/qqmlbuiltinfunctions.cpp src/quick/util/qquickprofiler_p.h Change-Id: I11a89c2a166115d6697adfba09928805643e709e
| | * Text: Make use of the new cached isSmoothlyScaled attribute on QFontEngineRobin Burchell2016-11-181-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Relies on qtbase/f2205c48c21a6b135f2f59d0cf46e72f90f9f0f4. Asking QFontDatabase whether or not the font can be smoothly scaled is expensive Now that the attribute is available on QFontEngine, we can bypass all that. Benchmark results from qmlbench on creation/delegates_text on a 2011 mbp. Before: Average: 173.2 ops/frame; using 5/5 samples; MedianAll=173; StdDev=1.94, CoV=0.0112 - StdDev (all samples included)=1.94 After: Average: 180.8 ops/frame; using 5/5 samples; MedianAll=182; StdDev=1.94, CoV=0.0107 - StdDev (all samples included)=1.94 Change-Id: I56efd903037a29ee014de0cbf482cfbef7fce494 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* | | Merge remote-tracking branch 'origin/5.7' into 5.8Simon Hausmann2016-11-151-6/+2
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/qml/jsruntime/qv4string.cpp The conflict resolution for qv4tsring.cpp is to essentially omit the change of commit 64714ea431f2fd355ed27edc69dba4e992511e75 as the code in 5.8 already uses the add/mul_overflow functions. This merge also reverts commit f4ac007f4a19bc095ff15d415a6629986de78e49 as we can deal with dead store elimination now. Change-Id: Iee08c87cbe1a2ff23a73ce621d56262b4e007c56
| * | Fix performance regression in rich text with imagesEskil Abrahamsen Blomfeldt2016-11-141-6/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In a3da23d5a92ab0f9b8280b9ed591986f8ac6a2d6 we added linear filtering to the image node in rich text when smooth was set to true (which it is by default). But we also enabled mipmapping, which caused a bad performance regression when updating the text item. If we want to support mipmapping, we would have to add a separate property for this like in the image node, but since the original bug report only called for supporting smooth scaling like in Image, we can simply revert part of the change. [ChangeLog][QtQuick][Text] Fixed a performance regression when rendering a rich text item with scaled images. Task-number: QTBUG-54723 Change-Id: Ib930112b76f0fe0b2e658f86520a9290354b8f6f Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* | | Merge remote-tracking branch 'origin/5.7' into 5.8Liang Qi2016-09-211-0/+8
|\| | | | | | | | | | | | | | | | | | | | Conflicts: src/qml/qml/qqmltypeloader.cpp Change-Id: I07647700fc86764c95a5ef95c568e700a70fe45f
| * | Fix smooth scaling for Qt Quick Text itemsJake Petroules2016-09-141-0/+8
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-54723 Change-Id: Id94f32791f1d80f0466d9f828de55b413ed1baf4 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* | | Add cross-backend simple rect, texture, and ninepatch nodesLaszlo Agocs2016-06-221-3/+3
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QSGSimpleRectNode is deprecated -> use QSGRectangleNode via QQuickWindow::createRectangleNode() instead. QSGSimpleTextureNode is deprecated -> use QSGImageNode via QQuickWindow::createImageNode() instead. The OpenGL version of the simple rectangle node is switched over to the vertex color material instead of flat, to allow for better batching. Use the same concept for nine patch nodes. The "style" node from Quick Controls 1 is now QSGNinePatchNode in order to provide a proper cross-backend solution which is already necessary due to the software backend, but now generalize it to apply to the accelerated backends with proper materials as well. QC can now simply call createNinePatchNode() without further ado. Also fixes a bug with the D3D12 texture material not enabling blending when needed. When it comes to the internal class names, QSGRectangleNode and QSGImageNode get the Internal prefix in the adaptation layer in order to differentiate from the public API. This involves quite a lot of renaming, but results in a nice and clean public API. Change-Id: Iddf9f9412377843ea6d652bcf25e68d1d74659ea Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* | Merge remote-tracking branch 'origin/5.6' into devLiang Qi2016-01-291-118/+0
|\| | | | | | | Change-Id: Iec1b2de53c275996364c4bab0123ccb3e6e9895e
| * QQuickTextNode: Nuke some dead code.Robin Burchell2016-01-261-118/+0
| | | | | | | | | | | | | | | | | | | | This has been commented out since the initial introduction in 2011. I doubt it's actually useful anymore, and if it is, it's in git history regardless. Change-Id: Ife36f423a21d4b12ebca154b4ad14848844e4eef Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com> Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* | 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>
* QQuickText: Don't store node engine per node.Robin Burchell2015-06-061-23/+22
| | | | | | | | | | | | | | | Since these are only used during one particular phase of dealing with text, it is extremely wasteful to heap allocate them and keep them around for the entire lifetime of the node (~3kb of total allocation _each_ according to OS X). Removing these cuts around 100mb of transient allocations off the qmlbench text creation benchmark (and takes the total allocations during a test run from ~496 MB to ~389 MB). It also improves the approximate throughput for creation of text items by ~5%. Change-Id: I45c8a50879ed545da1fb13ab3c2c5d857b112cf7 Reviewed-by: Gunnar Sletta <gunnar@sletta.org> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* Cleanup math function includes and usageAllan Sandfeld Jensen2015-02-191-1/+0
| | | | | | | | Use std::math on floats and doubles, and qMath on qreals, and only include the math headers actually needed. Change-Id: I1d511d7b1bac0050eaa947c7baee760b736858bf Reviewed-by: Sean Harmer <sean.harmer@kdab.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>
* Fix cursor blinking for TextInput and TextEditSimon Hausmann2014-08-261-0/+8
| | | | | | | | | | | | | | | 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>
* Create rectangle nodes in the text editing through the contextLars Knoll2014-08-131-2/+9
| | | | | | | | | | Unfortunately we can't re-use the QSGSimpleRectNode, as it doesn't provide us with virtual methods to move it's creation into the context. But's since it's only 20 lines of code anyway, this is still a nice cleanup. And it also allows the re-use of any optimizations in the renderer for QSGRectangleNode. Change-Id: I957777fbbeb0a994a9c257baf3bfe87fce8cc9e8 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Clean up the textures when deleting the contentAndy Shaw2014-07-241-0/+2
| | | | | | | | | | Whenever the content is deleted then the textures will be recreated so the existing list of textures should be deleted and cleared to reclaim the memory. Change-Id: I4fdf77817a5f4b2330414e9d113c669d18de9af8 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* QWindowsFontEnginge uses GetGlyphOutline which seems to failJørgen Lind2014-05-071-2/+9
| | | | | | | for fonts containing embedded bitmaps. Change-Id: I035df24d16f1c9707fff54b0920c8139fda3ddec Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* Move logic for determining native vs. DF text into single factory functionTor Arne Vestbø2014-01-271-5/+3
| | | | | | | | | | Makes QSGContext::createGlyphNode() the central point of determining which glyph node to produce, instead of letting the caller call two different versions of the factory, each one calling the other in various cases and behind various ifdefs. Change-Id: I30fb17cceab45d9e13ddf3ece7a65f220c5e5acd Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* Use QFontDatabase to check if a font is scalable.Yoann Lopes2013-11-251-2/+5
| | | | | | | | | The flag set in QFontEngine was not always correctly set, use QFontDatabase instead which is slower but should always be correct. We fallback to native font rendering when the font is not scalable. Change-Id: Ie9a2397abd42890d0fb05bc2f9c46a60040296f2 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* Fallback to native font rendering for bitmap fonts.Yoann Lopes2013-11-091-1/+2
| | | | | | | | | Distance field rendering requires glyph outlines, which are not available for bitmap fonts. Task-number: QTBUG-32737 Change-Id: I64569e4e6b2285ca998b5f80ec31ab04cf1f3d09 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* Use one render loop per QQuickWindowGunnar Sletta2013-10-301-6/+9
| | | | | | | | | | | | | | | | | | | See the task for the full reasoning behind this patch. The threaded renderloop has been refactored to have one window per thread. This is mostly a simplification of the current code path where for loops over multiple windows are turned into if (window). The QSGContext has been split into two classes, QSGRenderContext for which there is one per OpenGLContext. The rest of the patch is name changes and a couple of cleanups in the hopes of simplifying this change. Task-number: QTBUG-33993 Change-Id: I31c81f9694d7da7474a72333169be38de62613c4 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Fix license headers of QtQuick sources.Gunnar Sletta2013-09-301-1/+1
| | | | | Change-Id: I3750c47640bf21c3567c5fa1c4667e3e2552942e Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Support opt-in QSGNode descriptions without breaking binary compat.Gunnar Sletta2013-08-121-2/+2
| | | | | | | | | | This define is quite useful for debugging scene graph internals, but it is disabled by default to conserve memory. For clarity, I renamed the define to QSG_RUNTIME_DESCRIPTION. Change-Id: Ie5ff44d67af38adc65d0d09255d8533dc7a33bff Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* Silence a warning for unused variable in QQuickTextNode.Pierre Rossi2013-04-171-3/+3
| | | | | | | | | | | While refactoring it seems the position was forgotten. As it is exposed in addTextLayout, we should try to pass it along when initializing the selection engine. Task-number: QTBUG-30338 Change-Id: Id8d9221efe0027315ba1d48c47c9ea2ecd8d7561 Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* Fix new warnings in qtdeclarative (found by GCC 4.8)Thiago Macieira2013-04-091-0/+1
| | | | | | | | | qqmlproperty.cpp:1561:35: warning: typedef ‘VMEMO’ locally defined but not used [-Wunused-local-typedefs] qquickglobal.cpp:1017:13: warning: ‘initialized’ defined but not used [-Wunused-variable] qquicktextnode.cpp:245:6: warning: unused parameter ‘position’ [-Wunused-parameter] Change-Id: I48c5486953278dc960249f68e0e122d108f56e07 Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* Optimize QQuickTextEdit for larger documents.Pierre Rossi2013-03-201-1094/+35
| | | | | | | | | | | | | | | | | The rationale is to not end up re-processing the whole document on each update Since we know where the editing takes place, we can break down the text edit's contents in several text nodes and only re-create the affected text nodes upon editing. This requires ripping out the SelectionEngine helper class from QQuickTextNode so that QQuickTextEdit can tap into its functionality directly. A positive side-effect of this exercise is that it should be much harder to to come across GlyphNodes packing more than 16300 glyphs or so. Task-number: QTBUG-29596 Change-Id: Id29b0709baa43f5b29c44ab02398ba996be3e28a Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
* Fix embedding images in text elementsEskil Abrahamsen Blomfeldt2013-02-191-0/+1
| | | | | | | | | | | It seems that the the inner target rect has either been added recently or its default has been changed to something invalid, because we need to set it to the same as targetRect for the image to show up at all. Task-number: QTBUG-29560 Change-Id: I0fe6b7c5ab07afc780b8ea33a7ccc210861e0821 Reviewed-by: Gunnar Sletta <gunnar.sletta@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>
* Enable module build with QT_NO_IMTasuku Suzuki2012-11-261-0/+10
| | | | | | 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>
* Add option to use native rasterizer for SceneGraph textEskil Abrahamsen Blomfeldt2012-07-101-2/+4
| | | | | | | | | | 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>
* Fix crash when selecting transformed text.Andrew den Exter2012-06-221-7/+9
| | | | | | | | | QSGClipNode cannot be used directly, a sub-class or external provider of geometry is required. Task-number: QTBUG-26234 Change-Id: I0354ec17b619886b95f7994ad5af5c96e97397a0 Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
* Avoid non-deterministic ordering of glyph nodes.aavit2012-05-301-6/+3
| | | | | | | | | | The ordering of glyph nodes depended on the internal ordering of a QHash, where the key contains the value of a heap pointer, so it could change with each run (even if QT_HASH_SEED was set). This made effective regression testing impossible. Change-Id: I1e5cff7db6d0db9ebbfb1e5b2e3d6e56170752b7 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
* Don't create glyphs for truncated text.Andrew den Exter2012-04-191-2/+7
| | | | | | | | Instead of positioning truncated lines far out of the way where they won't be seen, simply skip them when creating the glyph node. Change-Id: I83bd8f76619d822fb22ec2ebd8c1e45c45b8b990 Reviewed-by: Yann Bodson <yann.bodson@nokia.com>
* Use relative position to when getting line from layout.Andrew den Exter2012-04-101-1/+1
| | | | | | | | | textPos is the absolute position in the document, when querying an individual layout use the position relative to the start of the layout. Change-Id: Ic1d97fcc498051c99291357dba3303b3141ed502 Reviewed-by: Yann Bodson <yann.bodson@nokia.com> Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
* Remove workaround for QTBUG-22919.Andrew den Exter2012-04-041-3/+0
| | | | | | | Fixed in qtbase. Change-Id: I2faff485d3aaf5639b211bd0a1b30bf9d37d2e69 Reviewed-by: Yann Bodson <yann.bodson@nokia.com>
* Fix visibility of trailing preedit text.Andrew den Exter2012-04-031-6/+13
| | | | | | | | | The block iterator doesn't take into account pre-edit text so we need to explicitly add pre-edit if it is positioned after the last fragment in a block. Change-Id: I1d26ee3ff86ea27674fc4f165b23ac5692a9ec17 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
* Rename QDeclarative symbols to QQuick and QQmlMatthew Vogt2012-02-241-2/+2
| | | | | | | | | | | | | Symbols beginning with QDeclarative are already exported by the quick1 module. Users can apply the bin/rename-qtdeclarative-symbols.sh script to modify client code using the previous names of the renamed symbols. Task-number: QTBUG-23737 Change-Id: Ifaa482663767634931e8711a8e9bf6e404859e66 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Add linkColor property to Text.Andrew den Exter2012-02-091-8/+27
| | | | | | | | | | | | | | | Allows the color of links in text to be changed from the default blue. This currently only works with StyledText and the distance field rendererer. It could be made to work with RichText overwriting the specified foreground color in all instances or by not setting a default color in the html parser. The former would prevent the color being set with CSS or some future means for altering text formats. The latter would break rendering with QPainter. Task-number: QTBUG-23048 Change-Id: I98df215cabe8a089f648fd4a6206622b4318fb8f Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Fix truncation and incorrect formatting of RichText.Andrew den Exter2012-02-071-1/+1
| | | | | | | | | Update the text position when adding text. Task-number: QTBUG-23981 Change-Id: I4a10916559745e8df805b1f8563522341bc6f69b Reviewed-by: Yann Bodson <yann.bodson@nokia.com> Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
* Fix TextEdit vertical alignment.Andrew den Exter2012-02-061-2/+2
| | | | | | | | | | Don't ignore the position of a QTextDocument when contructing a text node, and translate the rectangle returned by positionToRectangle by the y offset. Task-number: QTBUG-23935 Change-Id: I55a2b69a32a8b623be7e36de54ad083c2f8591e5 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>
* Add support for shared glyph cacheEskil Abrahamsen Blomfeldt2012-01-241-2/+3
| | | | | | | | 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>
* 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>
* Don't load embedded images from the current working directory.Andrew den Exter2012-01-191-2/+10
| | | | | | | | | | | Override QTextImageHandler's image loading as it will attempt to resolve relative paths and load the image itself if the document returns an invalid image from loadResource, which we don't want as it bypasses the pixmap cache and resolves against the application and current working directory instead of the Text items context. Change-Id: Ia1d3633036f96d902e1ac03dae5d5b203fba7ff1 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Update copyright year in Nokia copyright headers.Jason McDonald2012-01-171-1/+1
| | | | | | | | Update copyright headers from before 2011, and a couple of new ones that were merged after the previous change to copyright headers. Change-Id: Ia76e08e2734afa4ef3f1207dbcda5ff3bc81b366 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Fix preedit text visibility for TextEditJiang Jiang2012-01-161-30/+55
| | | | | | | | | | | | | For an empty TextEdit with preedit text, we need to add the text separately since the blockIterator will not go through that case. Also fixed preedit text appended at the end of any commited text. Move the code for adding text into SelectionEngine so that we can reuse it for adding preedit text. Task-number: QTBUG-22647 Change-Id: Id4fe04099b16949ff5de0747881c6dc96ef0673f Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>