aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items/qquicktext.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Add Markdown support to TextShawn Rutledge2019-05-091-4/+12
| | | | | | | "Markers" (only checkboxes so far) are a new feature too. Change-Id: I5a0ea337ec6cf8bdadf3b4729caaa579e8b625b5 Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-03-271-1/+1
|\ | | | | | | Change-Id: I2f0b4f8543a448c9acffe0932e0fd67c0b7412f4
| * Restore rich Text creation speedShawn Rutledge2019-03-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 634b59f187c8697f03a606cbacb5f0a69650ea7c caused a significant performance regression during layout of any Text item with RichText, by calling QQuickTextDocumentWithImageResources::setPageSize() with an accurate width in ensureDoc(); but ensureDoc() is called multiple times, and doesn't need to calculate actual layout. The accurate width is needed (at least) when doing layout of HTML tables that contain percentage-based column widths. For that purpose it's enough to set the correct "page" size in updateSize(). Fixes: QTBUG-74638 Task-number: QTBUG-72457 Change-Id: I34ab085316018576eba64a67200c527bb64b9533 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Fix text wrap: do not break on last line if right elide is enabledEirik Aavitsland2019-03-261-0/+5
| | | | | | | | | | | | | | | | | | | | For multiline texts with word wrapping, it is not so meaningful to add breaks in the last line if it is anyway going to be elided. Fix by using the WrapAnywhere strategy for the last line for such situations. Fixes: QTBUG-72736 Change-Id: I1263c81277b6ca89ba461529fced1094263c026f Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* | Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-03-131-2/+2
|\| | | | | | | | | | | | | | | Conflicts: src/qml/compiler/qv4codegen.cpp src/qml/animations/qsequentialanimationgroupjob.cpp Change-Id: I8b76e509fd7c8599d4cef25181d790ee28edab54
| * Text: render table cell backgrounds properlyShawn Rutledge2019-02-281-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QQuickTextNodeEngine::addTextBlock() was noticing the background color of text fragments, including those within table cells (and adding to the colorChanges vector for rendering), but not rendering a rectangle for the background of the entire table cell. So while the color was correct, it only took up as much space as the text itself. Also, QTextDocumentLayout needs to be told how much width is available so that QTextDocumentLayoutPrivate::layoutTable() will allocate cell width appropriately in case width is given as a percentage, e.g. <td width="20%">. This is done by calling QTextDocument::setPageSize() with correct width in pixels rather than zero. Fixes: QTBUG-72457 Change-Id: I5c8f861829f76d1cf4044fccd1142c3817bb33bc Reviewed-by: Andy Shaw <andy.shaw@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | QtDeclarative: replace deprecated functionsChristian Ehrlicher2019-02-131-1/+1
|/ | | | | | | | | | Replace the deprecated functions with it successors: - QFontMetrics::width() -> horizontalAdvance() - QLayout::setMargin() -> setContentsMargins() Change-Id: I2a2557cdb2eaec40e2c9955a0082372c582ec6b8 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* Fix missing strike outDaniel Engelke2018-12-101-0/+2
| | | | | | | | | | | | | | | | Added <s></s> and <del></del> tag aka strike out to QQuickStyledText. QQuickStyledText covers the essential text decorations, apart from strike out. In order to use it, one had to switch to RichText, which comes with its own overhead and limitations. <s> for no longer accurate or no longer relevant content <del> for removed content Fixes: QTBUG-72376 Change-Id: I3c191d91d57afcc48090facc49d643f8ad708fb4 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* QQuickText: Signal content height/width changes also when resettingUlf Hermann2018-11-201-9/+17
| | | | | | | | | If we change the content height or content width to the initial one, we still need to signal the change. Fixes: QTBUG-71684 Change-Id: Idf6e3f89423eab3d8f5310c164c5acc5108e0d8b Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* Increase fine-grained signals for some properties in TextAleix Pol2018-07-311-0/+4
| | | | | | | | | | | | Text.[content/painted][Width/Height] were being always notified of changes at bulk. This is can be harmful in performance of QML applications that will trigger change requests on the program whenever a property is modified. This introduces separate signals so it's not a problem anymore. Change-Id: I5b82cf13158298dbc91157b837d0ed4aadeb86cf Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* Merge remote-tracking branch 'origin/5.11' into devUlf Hermann2018-06-251-1/+1
|\ | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/qmltooling/packetprotocol/qpacketprotocol.cpp src/quick/handlers/qquickhandlerpoint.cpp src/quick/handlers/qquicksinglepointhandler.cpp tests/auto/qml/ecmascripttests/test262 Change-Id: I8908ec8c6116ca626fbd269af7625d4c429429ca
| * Doc: Add missing dots (qtdeclarative)Paul Wicking2018-06-191-1/+1
| | | | | | | | | | | | Task-number: QTBUG-68933 Change-Id: Ibb5aa227e82825085e7214e17dcffcb17fd44157 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* | Fix issue where updated text in layout is not correctly rewrappedEskil Abrahamsen Blomfeldt2018-04-261-17/+30
|/ | | | | | | | | | | | | | | | | | | | | | | When the text element is inside a Qt Quick layout and we set the implicit width, this can trigger the Layout to resize the width further down in the stack. At this point, a recursion guard we have in place to protect against binding loops will cause us to ignore the size update. The end result is that the text width has changed, but the contents have not been updated to reflect this. This change detects this case by checking if the width of the text changed while the recursion guard was in place, and if it was, we call updateSize() again to make sure everything is up-to-date. I added a second admittedly ugly recursion guard for this out of paranoia. I haven't seen any case where this might cause an infinite recursion, but it seemed better to be on the safe side. [ChangeLog][Text] Fixed an issue where updating text inside a layout would not cause it to correctly adapt to its new width. Task-number: QTBUG-53279 Change-Id: I1e421a7073428fa490a24be36208a2077f5836dd Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Fix Text with ElideRight not being rendered when reparentedMitch Curtis2018-04-171-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Consider the following example: Item { width: 100 height: 30 Text { width: parent ? parent.width : 0 height: parent ? parent.height : 0 elide: Text.ElideRight text: "wot" } } When setting the Text item's parent to null, its explicit width and height are set to 0. When restoring its parent (the Item), its explicit width and height are set to 100 and 30 again, but the text itself is still not rendered. The cause can be seen here: if (!(widthChanged || widthMaximum) && !d->isLineLaidOutConnected()) { // only height has changed if (newGeometry.height() > oldGeometry.height()) { if (!d->heightExceeded) // Height is adequate and growing. goto geomChangeDone; heightExceeded was false, because 30 > 12 (or whatever the implicit height happened to be), so the text was not laid out again, even though it went from having an explicit height of 0 to an explicit height of 30. Fix the issue by only executing the goto if the old explicit height wasn't 0. Task-number: QTBUG-60328 Task-number: QTBUG-67145 Change-Id: I7f4d2f95bc95c850133ba91ac2d1a02c7ee159b6 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* use nullptr consistently (clang-tidy)Shawn Rutledge2018-02-261-11/+11
| | | | | | | | | | | | | 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>
* Fix misleading doc for kerningRobert Loehning2018-02-081-3/+3
| | | | | | | | | | It currently sounds as if activating kerning would speed up drawing while the opposite is true. Change-Id: I7ba8caa82931617213c70570b6b81f82d5b61e52 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Add property to disable shaping on fontsEskil Abrahamsen Blomfeldt2017-08-251-0/+17
| | | | | | | | | | | | | | | Major performance improvements can be gained if you know for sure your text does not require any shaping features. This patch adds Qt Quick support for the QFont::PreferNoShaping flag (though as a boolean property to work better with property bindings). [ChangeLog][QtQuick][Text] Added "font.preferShaping" property to Text, TextEdit and TextInput. This makes it possible to improve performance at the expense of some cosmetic font features. Task-number: QTBUG-56728 Change-Id: Ib4e23d5b21b9d4929562df521347285b2586a62e Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Add a way to set the default render type of text-like elementsGiuseppe D'Angelo2017-08-231-6/+4
| | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Fix hardcoding font family before the font is loadedEskil Abrahamsen Blomfeldt2017-08-091-0/+8
| | | | | | | | | | | | | | | | | | | | | | When you hardcoded the font family of an application font before the font was actually loaded, the QTextLayout would cache the glyph indexes from the fallback font, and these would later be applied to the proper font in the render thread, causing corrupted text and warnings. It is easy enough to work around this by binding the font.family property to the name property of the FontLoader, but to handle the error case more gracefully, we now check during the polish phase whether the actual font assignment has changed, and redo the QTextLayout when we have to. [ChangeLog][QtQuick][Text] Fixed an issue when the family of an application font was hardcoded and applied to text before the font itself was loaded. Task-number: QTBUG-61984 Change-Id: Ib0e80a78f3b6fe4a3b0188c69516a20d0bf4cb45 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* QQuickText: don't clear the text formats on every layoutJ-P Nurmi2017-07-061-4/+11
| | | | | | | | | | | | | | | In order to fix QTBUG-21919, 6ff9ba0 added a QTextLayout::clearFormats() call to QQuickTextPrivate::updateLayout(). This patch moves that logic to clearFormats(), called from setText() and setTextFormat() in order to avoid clearing the formats on every text layout update. This allows Qt Quick Controls 2 to extend QQuickText with support for mnenonics by adding a text format range to underline the appropriate piece of text in the internal QTextLayout. Task-number: QTBUG-61422 Change-Id: I646d53f0feeeaa3c106db94f187c7accabdc6a61 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Expose "kerning" property for fontsEskil Abrahamsen Blomfeldt2017-06-301-0/+13
| | | | | | | | | | | | For text where the content is known, it can be handy to be able to disable the kerning feature in OpenType to improve performance. [ChangeLog][Qt Quick][Text] Added "kerning" property to the font type to support disabling kerning on text. Task-number: QTBUG-56728 Change-Id: I2e447587a066a7e12c5d38967e0845eaad021014 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Add advance property to QQuickTextEskil Abrahamsen Blomfeldt2017-05-191-0/+47
| | | | | | | | | | | | | | | This is a step on the way to certain optimization possibilities for text in Qt Quick. Basically, to allow users the ability to split text into separate items (so that you can distinguish dynamic from static, and unshaped from shaped text), we also need a way to string those items together visually later. The advance property is required for this. [ChangeLog][QtQuick][Text] Added "advance" property to Text element. Task-number: QTBUG-56728 Change-Id: I8e7bf9bac410fa9c5553b48db90956431a2873f6 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Merge remote-tracking branch 'origin/5.9' into devLars Knoll2017-05-021-0/+2
|\ | | | | | | Change-Id: I71275a2076c3d32ee2896571be882067320a2e9e
| * Run includemocs in qtdeclarativeThiago Macieira2017-04-261-0/+2
| | | | | | | | | | Change-Id: I84e363d735b443cb9beefffd14b8c023a37aa489 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | QQuickText: apply updateSize() optimization for item change listenersJ-P Nurmi2017-04-251-2/+2
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QQuickTextPrivate::updateSize() emits implicitWidthChanged() and implicitHeightChanged() to see if anything is connected to the signals and therefore calls getImplicitWidth() or getImplicitHeight(), which again call updateSize() recursively. This way it can detect the recursion and avoid doing the size calculation multiple times. The problem with emitting the change notifier signals directly is that item change listeners (QQuickItemChangeListener) do not get notified. Item change listeners are commonly used by Qt Quick Layouts and Qt Quick Controls 2. By calling QQuickItemPrivate::implicitWidthChanged() and implicitHeightChanged() the item change listeners are also called in addition to emitting the change notifier signals. Results from qmlbench delegates_buttoncontrol2.qml run with the very latest dev-branch of qtquickcontrols2: Before: Average: 130.2 frames; using samples; MedianAll=130; StdDev=1.92354, CoV=0.0147737 After: Average: 139.4 frames; using samples; MedianAll=140; StdDev=0.894427, CoV=0.00641626 Task-number: QTBUG-59746 Change-Id: I4461cdf8ddc25f80a38756a1e2b5e3d7d1e84791 Reviewed-by: Robin Burchell <robin.burchell@crimson.no>
* QQuickText: optimize updateLayout()Anton Kudryavtsev2017-04-181-8/+2
| | | | | | | | QString::replace(QChar, QChar) was fixed in c12f42e91b146109cc9ee5d050928672776ca1ee So no need to use pre-condition. Change-Id: I98eadfc89350194832b229afe061dc0bd01f1bc9 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* Add fontInfo property to TextEskil Abrahamsen Blomfeldt2017-01-311-1/+88
| | | | | | | | | | | | | | | | This provides a way to determine which font will actually be used to presenting the text, which can be especially useful when not using a fixed size font (the font info will then expose the actual font size used by the Text element.) [ChangeLog][QtQuick][Text] Added fontInfo property to Text type, providing a way to query properties of the actual font used for presenting the text. Task-number: QTBUG-51133 Change-Id: I5860fb1bd25ac5734713f49c8482428f2d531d22 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Robin Burchell <robin.burchell@crimson.no>
* Deprecate Text::doLayout() in favor of forceLayout()J-P Nurmi2017-01-141-1/+13
| | | | | | | | | | | | | Item views and positioners all have now forceLayout(), so make the Text element API consistent with them. The old doLayout(), which sounds more like an internal helper method, is deprecated and marked for removal in Qt 6. [ChangeLog][QtQuick][Text] Deprecated doLayout() in favor of forceLayout(). Change-Id: I051988fca13c4cd84904f7b268d51f6a96f28af3 Reviewed-by: Robin Burchell <robin.burchell@crimson.no>
* Port existing qmlInfo callers to qmlWarningRobin Burchell2017-01-111-1/+1
| | | | | | | | | | | | | Now that qmlInfo actually reports info messages, we want to change existing callers to use warning-level messages to preserve the original message level. This was done through: perl -p -i -e "s/qmlInfo\(/qmlWarning\(/" **/*.{cpp,h,qdoc} .. with a little care taken to only add the hunks that should be changed. Change-Id: I511cee11ce0a26ec1048cd2b84c7536b812a0d89 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Get rid of most QT_NO_FOO usagesLars Knoll2016-11-291-3/+3
| | | | | | | | 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-10-101-3/+3
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/quick/quickwidgets/quickwidget/main.cpp src/qml/jsruntime/qv4jsonobject.cpp src/qml/jsruntime/qv4qobjectwrapper.cpp src/qml/jsruntime/qv4qobjectwrapper_p.h src/qml/qml/qqmlengine.cpp src/qml/qml/qqmlpropertycache.cpp src/qml/qml/qqmlpropertycache_p.h src/quick/items/qquickanimatedsprite.cpp src/quick/items/qquickitem.cpp src/quick/items/qquickitem.h src/quick/items/qquickitem_p.h src/quick/items/qquickview_p.h src/quick/scenegraph/qsgcontext.cpp src/quick/scenegraph/qsgdefaultrendercontext.cpp Change-Id: I172c6fbff97208f21ed4c8b6db3d1747a889f22b
| * Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-09-301-3/+3
| |\ | | | | | | | | | | | | | | | | | | Conflicts: tests/auto/quick/qquicktext/tst_qquicktext.cpp Change-Id: I241cd418bb7e7b95e0a0a2ee4c465d48be2a5582
| | * Fix incorrectly aligned text whose size depends on its implicit sizeMitch Curtis2016-09-291-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The if statement in QQuickTextPrivate::setupTextLayout() was missing an OR clause for the case where the line width is neither greater nor less than the old width/natural width, but has actually changed. If that sounds confusing, it's because it is. Basically, the outer layouting loop in that function needs to run twice for this scenario, so that's what this patch makes it do. Change-Id: I13777667eb13506d50f05e9766785a1c2c46125c Task-number: QTBUG-50738 Task-number: QTBUG-50740 Reviewed-by: Liang Qi <liang.qi@qt.io>
| | * QQuickText: fix paddings when wrapping or eliding is usedJ-P Nurmi2016-09-291-1/+1
| | | | | | | | | | | | | | | | | | Change-Id: I8ec8c8eff41e77225ef42f7bd9e52f4558d00130 Task-number: QTBUG-55779 Reviewed-by: Liang Qi <liang.qi@qt.io>
* | | Quick: replace 'foreach' with 'range for'Anton Kudryavtsev2016-08-181-5/+6
| | | | | | | | | | | | | | | Change-Id: I3493b16a184fc811289db9e98eff37bb987113a3 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | | Merge remote-tracking branch 'origin/5.7' into devLiang Qi2016-08-171-0/+1
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/qml/compiler/qqmltypecompiler.cpp src/qml/compiler/qv4isel_moth.cpp src/qml/compiler/qv4ssa_p.h src/qml/qml/qqmlobjectcreator.cpp Change-Id: I8bb7fe773d657f908f20ee5e72c2b9bd643f6260
| * | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-08-131-0/+1
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/qml/compiler/qv4isel_moth.cpp src/qml/compiler/qv4ssa_p.h tests/benchmarks/qml/qqmlimage/qqmlimage.pro tests/benchmarks/qml/qqmlimage/tst_qqmlimage.cpp Change-Id: Iad11ce7fdf0c6d200fdebc16a94081bd8069a87a
| | * Don't accept left clicks when text format is plain.Eike Hein2016-08-091-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Text elements may contain rich text with embedded links, and need to accept left clicks to open them. However, setting the textFormat to PlainText can disable mouse handling entirely, as it is not required. Accepting left clicks if there can be nothing to interact with is unexpected and surprising, and can cause bugs in code that performs child event filtering and doesn't expect Text elements to produce child events. Change-Id: Ibd5b9cf8d06fd30ea26f78b5393cc43e94646e73 Reviewed-by: Marco Martin <mart@kde.org> Reviewed-by: Kai Uwe Broulik <kde@privat.broulik.de> Reviewed-by: Robin Burchell <robin.burchell@viroteck.net> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* | | Merge remote-tracking branch 'origin/5.7' into devLiang Qi2016-06-211-1/+4
|\| | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/quick/items/qquickflickable_p_p.h src/quick/items/qquickpathview_p_p.h tests/auto/qml/qqmltypeloader/tst_qqmltypeloader.cpp Change-Id: I77664a095d8a203e07a021c9d5953e02b8b99a1e
| * | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-06-201-1/+4
| |\| | | | | | | | | | | | | | | | | | | | | | Conflicts: src/qml/jit/qv4targetplatform_p.h src/quick/accessible/qaccessiblequickitem_p.h Change-Id: Ic95075a5fad81ec997a61561bd65979dfa3b9d4d
| | * Fix positioning of inline images in StyledText.Michael Brasser2016-06-161-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | Fix horizontal positioning generally, and also address RTL specifically. Change-Id: I8b75c11bc38e39da5cda302ee9b475bf0dc464e8 Task-number: QTBUG-54075 Reviewed-by: Andrew den Exter <andrew.den.exter@qinetic.com.au>
* | | categorized logging: trace hover eventsShawn Rutledge2016-06-151-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tracing is a kind of logging designed specifically for use with http://code.qt.io/cgit/qt-labs/umlquick.git, to generate UML Sequence diagrams. Here it is being used to trace the delivery of hover events. Due to use of the QT_MESSAGE_PATTERN backtrace directive, and backtrace splicing, it's not necessary to emit trace messages for every step: it's mainly important to catch the final destinations of hover processing, where state is changed and signals emitted. Change-Id: I5f640732f90990ef9f89767a56f3978b9c28a410 Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
* | | Merge remote-tracking branch 'origin/5.7' into devLiang Qi2016-05-241-0/+5
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/qml/jsruntime/qv4engine_p.h src/qml/jsruntime/qv4runtime_p.h src/qml/qml/qqmldelayedcallqueue.cpp src/qml/qml/qqmlvaluetypewrapper.cpp src/qml/qml/qqmlvmemetaobject.cpp src/qml/qml/v8/qv8engine_p.h tests/auto/quick/qquicktext/tst_qquicktext.cpp Change-Id: I3f0608c7beb88088cbbef4d0db59920f56deaea9
| * | Don't render when width is zero and elide is not NoneKari Hautamäki2016-05-201-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | Works now similarly as with very small text lengths (smaller than elide characted length). Change-Id: I0c4aafbcc50343bb0ec8b5f335045e1048a499fd Task-number: QTBUG-34990 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
* | | Add property for setting hinting preference on fontsEskil Abrahamsen Blomfeldt2016-03-151-0/+33
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As screen density is rapidly increasing and user interfaces are moving more and more towards using unhinted text as default, we have to make it possible to select the hint level from Qt Quick as well. While this is already partially covered by the unhinted QtRendering render type, it is still interesting to be able to tweak the native rendering accordingly, since this is a more precise rasterization. QtRendering also doesn't support medium hinting. [ChangeLog][Text] Added "hintingPreference" property to Text, TextEdit and TextInput. Change-Id: Ib99dbea24aba082481629deddde88c04cdeb8cdb Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-02-191-1/+18
|\| | | | | | | | | | | | | | | | | Conflicts: src/quick/items/qquickitem.cpp tests/auto/quick/qquickgridview/tst_qquickgridview.cpp tests/auto/quick/qquicklistview/tst_qquicklistview.cpp Change-Id: I3cf47faa2fe567d62fffd985aeecbefe5811cc42
| * Rerender natively rendered text items when DPI scaling changes.Andreas Hartmetz2016-02-051-1/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The whole purpose of native rendering is to optimize precisely for a given pixel grid. DPI scaling can change when either settings of the current screen are changed, or when the window is moved to a different screen. Details: - add an ItemDevicePixelRatioHasChanged item change event - detect DPI scaling changes by watching screen (identity) and screen config changes - when DPI scaling changes, recursively send an ItemDevicePixelRatioHasChanged signal to all items with content - when a natively renderet TextItem catches such an event, call updateLayout() which automatically picks up the new logical DPI Task-number: QTBUG-49019 Change-Id: I9f4f8d1a7f2c172ed26c276294ab143161c4a48b Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into devLiang Qi2016-01-291-2/+2
|\| | | | | | | Change-Id: Iec1b2de53c275996364c4bab0123ccb3e6e9895e
| * Preparations for re-rendering native text on DPI scaling changes.Andreas Hartmetz2016-01-261-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This makes only non-functional changes so the next patch can make mostly functional changes. QQuickText: rename q_imageLoaded() to q_updateLayout(). Says what it does, not when it is called. QQuickWindow: split QQuickWindow::forcePolish() into QQuickWindow::handleScreenChanged() and QQuickWindowPrivate::forcePolish(). Change-Id: Ief2ae30cd9f27ee8083b2c75765fb5278bde5ea8 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* | Merge remote-tracking branch 'origin/5.6' into devSimon Hausmann2016-01-221-1/+1
|\| | | | | | | Change-Id: I4af0bf8ec1569097d97f8ce0bb8bf1a0e4a989ec