aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items/qquicktext.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/stable' into devSimon Hausmann2014-02-111-0/+4
|\ | | | | | | | | | | | | | | | | Conflicts: src/qml/compiler/qv4ssa.cpp src/qml/jsruntime/qv4arrayobject.cpp src/qml/jsruntime/qv4context.cpp Change-Id: Ied5b23bec4dc14abe51127c507aed668f855c1e1
| * Docs: add a working example to Text::fontSizeMode docsJ-P Nurmi2014-01-291-0/+4
| | | | | | | | | | | | | | | | | | It's easy to miss the maximum bound specified by either the font.pointSize or font.pixelSize properties. Task-number: QTBUG-30005 Change-Id: If1dadebd6673f0e945a1ca95b64521f27d30f5a9 Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* | Expose Text::linkAt(x, y)J-P Nurmi2014-01-291-2/+17
| | | | | | | | | | | | | | | | | | | | [ChangeLog][QtQuick] Added Text::linkAt(x,y) method. Task-number: QTBUG-18946 Change-Id: I3b4071c6117ac0ee636f2fdbd2c392eb05b02dd7 Reviewed-by: Martin Jones <martin.jones@jollamobile.com> Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com> Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* | Allow renderType: Text.NativeRendering on retina displays/devicesTor Arne Vestbø2014-01-271-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Setting the renderType to Text.NativeRendering might be needed in some cases where distance-field does not produce the expected results, such as for emoji characters or really large fonts. These use cases are valid on retina displays as well, so having the setter second-guess the request from the user to use native rendering is not ideal. Change-Id: I7c6049766e60574487c29de07fbd5c100ec69a2a Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com> Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* | Merge remote-tracking branch 'origin/stable' into devSimon Hausmann2014-01-241-4/+4
|\| | | | | | | | | | | | | | | | | | | | | Conflicts: src/imports/dialogs/qquickmessagedialog.cpp src/imports/dialogs/qquickmessagedialog_p.h src/qml/debugger/qqmlprofilerservice_p.h src/qml/jsruntime/qv4regexpobject.cpp tests/auto/qml/debugger/qqmlprofilerservice/qqmlprofilerservice.pro Change-Id: Ic8a43366b44d6970966acbf03b206d0dee00c28d
| * QQuickText: fix layout mirroringJ-P Nurmi2014-01-221-4/+4
| | | | | | | | | | | | Task-number: QTBUG-35095 Change-Id: I8550821e01ecc931788c1ed73366ba1ceed7a817 Reviewed-by: Andrew den Exter <andrew.den.exter@qinetic.com.au>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-12-161-49/+49
|\| | | | | | | | | | | | | | | | | Conflicts: src/quick/items/qquickitem.cpp src/quick/items/qquicktext.cpp tests/auto/quick/qquicklistview/tst_qquicklistview.cpp Change-Id: I0bc5786098193c2c40b6fd8905de75d90f6ed0cf
| * Doc: Change the order of QQuickText function definitionsTopi Reinio2013-11-301-49/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | For Text QML type, some property and method documentation is missing from the output because in the source file, they appear before the '\qmltype Text' command. This change reorders the functions so that qdoc will see all documentation for Text QML type. Task-number: QTBUG-35018 Change-Id: Icd995f66679d5105912ee12a7aeffd510921a54d Reviewed-by: Martin Smith <martin.smith@digia.com> Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* | QQuickTextDocumentWithImageResources: use QTextDocument::baseUrlJ-P Nurmi2013-12-041-19/+8
| | | | | | | | | | | | | | | | | | QTextDocument::baseUrl was introduced in qtbase commit 1f22c1d. The ultimate goal is to get rid of QQuickTextDocumentWithImageResources and eventually make QQuickTextEdit's document interchangeable. Change-Id: Ibafeecc395b52f7200d8164f809bf76538e5620c Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* | Support toggling antialiasing for Text and Rectangle.Michael Brasser2013-12-031-0/+28
| | | | | | | | | | | | | | Task-number: QTBUG-27968 Task-number: QTBUG-34366 Change-Id: Ic446ff4470abf21696e1764f902bd71e79762697 Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* | Ensure correct horizontal alignment for implicit width multiline text.Michael Brasser2013-12-021-1/+1
| | | | | | | | | | | | Task-number: QTBUG-30896 Change-Id: I5ca18ac67cf3640c97374d79f2546fc53698f86b Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com>
* | Ensure correct horizontal alignment when onLineLaidOut is used.Michael Brasser2013-12-021-2/+3
|/ | | | | | Task-number: QTBUG-34647 Change-Id: I07cb1f6f433d64c8889750a1fef06cd3b3bcc9e5 Reviewed-by: Andrew den Exter <andrew.den.exter@qinetic.com.au>
* Fix QQuickText hover event handlingJ-P Nurmi2013-11-051-12/+13
| | | | | | | | | | Catch hover events only when the item contains either rich or styled text, and make sure to ignore hover events as appropriate to propagate them further. Task-number: QTBUG-33842 Change-Id: Idef5be7c502711393ab532c4ace31663b0e0a872 Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* Use one render loop per QQuickWindowGunnar Sletta2013-10-301-4/+3
| | | | | | | | | | | | | | | | | | | 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>
* qdoc: no longer recognizes the version nr in QML refsMartin Smith2013-10-021-40/+40
| | | | | | | | | | All QML references of the form <QML-module-name><QML-module-version>::<QML-type>::<member-name> have had the <QML-module-version> removed i. Task-number: QTBUG-33776 Change-Id: Idde279e0f254cd24ea44f9841662dd81a2c5bbc6 Reviewed-by: Jerome Pasion <jerome.pasion@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>
* Doc: Fixed and updated Qt Quick's \qmlmodule pageJerome Pasion2013-09-251-1/+1
| | | | | | | | | | | -incremented version to Qt Quick 2.2 (in \qmlmodule page) -import changed to QtQuick 2.2 -\inqmlmodule no longer needs the version. QDoc will ignore the version but it is better to remove it now to avoid confusion Task-number: QTBUG-32172 Change-Id: I40b52e59667014720be40a35b3a8fb9836825e31 Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* Doc: Made Qt Quick items' \since consistent.Jerome Pasion2013-09-251-2/+2
| | | | | | | | | | | | | | | | Qt 5.2: -"\since QtQuick 2.2" -> "\since 5.2" Qt 5.1: -"\since QtQuick 2.1" -> "\since 5.1" -"\since Qt 5.1" -> "\since 5.1" Qt 5.0: -"\since QtQuick 2.0" -> "\since 5.0" Task-number: QTBUG-32172 Change-Id: I699b00b31373a434ddb8f4caccfef40c588bf8a4 Reviewed-by: Martin Smith <martin.smith@digia.com>
* Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-07-231-1/+1
|\ | | | | | | Change-Id: I2279f181b1c30e81651f8907447ec5c826e11475
| * Fix CLANG-warning '&&' within '||' [-Wlogical-op-parentheses].Friedemann Kleint2013-07-121-1/+1
| | | | | | | | | | Change-Id: Id724c86f87a78048df9b93f2d190593d36261943 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-07-041-0/+4
|\| | | | | | | Change-Id: I15cb7460171b38d11d66367aeb0831ec6e3ca933
| * Relayout the text after the vertical alignment is changedMarco Bubke2013-07-011-0/+4
| | | | | | | | | | | | | | | | | | | | In the designer it is no working without a layout update. Task-number: QTBUG-32041 Change-Id: I2276914c81b38ad8931109b3d800b65a0d11bca7 Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com> Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com>
* | Add QQuickText::hoveredLinkJ-P Nurmi2013-06-181-0/+80
|/ | | | | | Task-number: QTBUG-30804 Change-Id: I6c6993b152285f4bdf34d6e1aa04f25fa7ca41e0 Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* Ensure the vertical text alignment is updated when the Text height changes.Andrew den Exter2013-06-111-2/+3
| | | | | | | | | Task-number: QTBUG-31647 Change-Id: Ia0968a7a40c40411df5b3ed841a42f6cef141525 Reviewed-by: Andrew Knight <andrew.knight@digia.com> Reviewed-by: Vesa Halttunen Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* Fix assert when calculating the implicit width of truncated lines.Andrew den Exter2013-05-311-1/+4
| | | | | | | | | Guard against reading past the end of the final line. Task-number: QTBUG-31471 Change-Id: I489f742936ee16f12ad9762b7c0891bfa9377e21 Reviewed-by: Martin Jones <martin.jones@jollamobile.com>
* Respond appropriately to textFormat changedAlan Alpert2013-05-171-0/+1
| | | | | | | | | | If the text has not changed when textFormat changes between states other than RichText, the text was not re-laid-out. This is necessary if the text includes control tags. Task-number: QTBUG-31191 Change-Id: I3c6f5343aa85e8337b90cf86748a696d5742e906 Reviewed-by: Andrew den Exter <andrew.den.exter@qinetic.com.au>
* Disable native glyph rendering on embeddedGunnar Sletta2013-04-251-1/+2
| | | | | Change-Id: I71769affe8f0138dd65f3b94fb27176bd069ab8d Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* Doc: Replace some references to NokiaSze Howe Koh2013-04-241-2/+2
| | | | | | | Link to internal QDoc pages, or to qt-project.org Change-Id: I5d9adae711213873ab57ccfc5bb2d8f74cf5689b Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Use distance fields for text on retina displaysGunnar Sletta2013-04-021-1/+3
| | | | | Change-Id: I6d3f3e7e4813155f2abb3edc51b145fb709c485b Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* Fix alignment of Text element with implicit sizeEskil Abrahamsen Blomfeldt2013-01-241-0/+3
| | | | | | | | | | | | | In change e1d6b323d474acc5cd70fd9a0b283326316f55a0 there's an optimization which disables layouts on the QTextDocument, but the layout has to be re-enabled before we can call idealWidth() since this will be zero as long as the page size is 0x0. We simply set the page size to undefined again before calling idealWidth. Task-number: QTBUG-29262 Change-Id: I6bebe7be4c99fce0de8fc4178b5e1abc81abbe87 Reviewed-by: Michael Brasser <michael.brasser@live.com> Reviewed-by: aavit <eirik.aavitsland@digia.com>
* Make HTML horizontal alignment work like in QtQuick 1Eskil Abrahamsen Blomfeldt2013-01-241-1/+1
| | | | | | | | | | | If the text width set is higher than the ideal width, there's no risk of wrapping, and thus we align the text based on the full width of the Text element. This matches the behavior in Qt Quick 1.1. Task-number: QTBUG-29262 Change-Id: Ib191e3dd9d17e3bea63ca7825708f53768960e26 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/+4
| | | | | | Change-Id: I90f8ec7e6357db7b4038bb1646fe9d3835821556 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Alan Alpert (RIM) <aalpert@rim.com>
* Improved documentation of Text.textFormat property.Samuel Rødal2012-11-221-1/+5
| | | | | | | | Even though using RichText is not recommended, we should still at least point out what it does. Change-Id: I96d0e1e7074b5fdbb3a5dcaf84e5afe805c92080 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.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>
* Various small doc fixes and improvementsBea Lam2012-08-091-3/+11
| | | | | | | | | | Adds some missing docs and fixes some incorrect doc references. Also removes AnimatedImage docs that were exactly the same as those in base Image type docs. Change-Id: I1357d3c00e63f1b08683bb78246de93dcc0dac7f Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com>
* Reset Styled/PlainText specific state when switching between formats.Andrew den Exter2012-07-311-0/+3
| | | | | | | | | Fixes markup being displayed when switching from a multilength string to styled text and formatting of elided text when switching from elided styled text to elided plain text. Change-Id: Id1e1834d81cb6142d92433a8bc571e05d226b7b3 Reviewed-by: Yann Bodson <yann.bodson@nokia.com>
* Doc: Changed \qmlclass to \qmltype and added \instantiates.Jerome Pasion2012-07-301-1/+2
| | | | | | | | | | -To simplify QDoc, \qmlclass is now \qmltype. -'\instantiates <C+++ class>' is for the types that are defined in C++. Change-Id: I29242d33daf7b972d8b86a356b9689638866b950 Reviewed-by: Laszlo Papp <lpapp@kde.org> Reviewed-by: Bea Lam <bea.lam@nokia.com> Reviewed-by: Martin Smith <martin.smith@nokia.com>
* Update element references to smooth.Michael Brasser2012-07-181-14/+0
| | | | | | | Change-Id: Ide30946e83c8c26d075b9ca3bb1f9e20afd69373 Reviewed-by: Glenn Watson <glenn.watson@nokia.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com> Reviewed-by: Yoann Lopes <yoann.lopes@nokia.com>
* Change Quick docs to refer to "types" rather than "elements"Martin Jones2012-07-161-3/+3
| | | | | | Task-number: QTBUG-24785 Change-Id: I223479b879514abaacb123852323c1cfada7a5e1 Reviewed-by: Bea Lam <bea.lam@nokia.com>
* Remove unneeded mac specific code in QQuickTextYann Bodson2012-07-161-48/+16
| | | | | | | | We don't need to relayout in painting thread. Task-number: QTBUG-26361 Change-Id: Idfad1b90e2772e72411df821d02ea596a094f508 Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com>
* Add option to use native rasterizer for SceneGraph textEskil Abrahamsen Blomfeldt2012-07-101-3/+42
| | | | | | | | | | 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 warning about assigned/unused variable.Friedemann Kleint2012-07-101-4/+0
| | | | | Change-Id: I0c9a7c4bf52e5a1a81d5ac85fc594ad197e3b811 Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com>
* Speed up Text construction with RichTextAndrew den Exter2012-07-091-0/+1
| | | | | | | | | | | | Setting the page size to empty can short cut some unnecessary layouts triggered by QTextDocument/QTextDocumentLayout prior to the Text item requiring a layout. This rougly halves the construction time a Text item with RichText. Task-number: QTBUG-19728 Change-Id: I03e6d293d8e5ac40046aef41171ca5009b718546 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Reduce the number of unnecessary layouts on geometry changes.Andrew den Exter2012-07-091-128/+227
| | | | | | | | | | | | | | | | | Improve checks for geometry changes that don't affect layout, i.e width increasing when the previous layout didn't wrap or elide. Set implicit sizes just once during layout rather than setting the implicit width during and the implicit height after to limit the when an implicit size change can change geometry. And if there are multiple layouts of the same text/font combination re-use cached layout data as much as possible by guarding against unnecessary property changes on the layout, and not creating a new layout for calculating the implicit size of truncated text. Change-Id: Ia05e52e9170e1f5d3364896ab119e00d8a318299 Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
* Fix clicking on links in aligned or elided Text.Andrew den Exter2012-06-251-63/+45
| | | | | | | | | Adjust the mouse position to compensate for any alignment offsets and test the elided text layout for anchors if none is found in the normal layout. Change-Id: Idfda3f7e372d0f2d6c1b7bb5f22d7015d52e8239 Reviewed-by: Yann Bodson <yann.bodson@nokia.com>
* Create new documentation structureChris Adams2012-06-211-1/+1
| | | | | | | | | | | | | | | | | | | | The documentation currently has no clear separation between Qt QML and Qt Quick. With recent commits like: 6c8378eaf1edbbefe6aaa3672b0127816a004fd7 and ab1e510121c8a679fdaca12ccd30e0f7ac12a26b the separation between the language definition and implementation, provided by Qt QML, and the standard library for the QML language, provided by Qt Quick, is clear. This commit creates a new documentation structure that is more navigable and separates concepts into logical categories, with clear separation between QtQML and QtQuick. It also provides a more generic QML Application Developer Resources page which contains links to information for QML application developers. Change-Id: Ia807ccfbfd24ffa0e1c7f0a51ed9d2ed3aa6a733 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Avoid string-based lookup in IS_SIGNAL_CONNECTEDKent Hansen2012-06-101-2/+2
| | | | | | | | | | Specify the signal as a member function suitable for passing to QMetaMethod::fromSignal(), and use the new function QMetaObjectPrivate::signalIndex(QMetaMethod) to get the index in the signal range. Change-Id: If16daa24c2699f7749a17decb611cf395d89d0c4 Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
* Fix alpha being ignored in Text elementGlenn Watson2012-06-071-1/+1
| | | | | | | | The text element was using the implicit constructor to convert QRgb -> QColor which ignores alpha. Use the explicit conversion. Change-Id: I7975ffeab8b423716b9655776f38b0ca2f282cd0 Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com>
* Doc: Grouped Qt Quick types into several groupsJerome Pasion2012-06-061-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -created new groups and converted some overviews into group pages -edited type documentation and added \ingroup -articles still need title fixes and link fixes Groups: qtquick-visual-types qtquick-item-graphics qtquick-shaders qtquick-canvas qtquick-text qtquick-text-validator qtquick-interaction qtquick-positioners qtquick-transformations qtquick-states qtquick-animation-define qtquick-animation-properties qtquick-animation-control qtquick-animation-modifiers qtquick-images-sprites qtquick-images qtquick-models qtquick-containers qtquick-views qtquick-paths qtquick-utility Task: QTBUG-25685 Change-Id: I81d4df3320bf5daad5cabb5e42408013fb24f464 Reviewed-by: Bea Lam <bea.lam@nokia.com> Reviewed-by: Alan Alpert <alan.alpert@nokia.com>