From 331ea0aee6d0bb54625b25a6c8d2e59d2378fd50 Mon Sep 17 00:00:00 2001 From: Andrew den Exter Date: Mon, 30 Jan 2012 17:33:27 +1000 Subject: [PATCH] Document the limitations of AutoText's rich text detection. Repeat the explanation given in Qt::mightBeRichText's documentation for how rich text is identified and under what circumstances it may fail to recognize it. Task-number: QTBUG-21917 Change-Id: Ie012ddd2fd5f874da0ea819c354a1ed5b7573670 Reviewed-by: Yann Bodson --- src/quick/items/qquicktext.cpp | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-) diff --git a/src/quick/items/qquicktext.cpp b/src/quick/items/qquicktext.cpp index c556017..0d4db31 100644 --- a/src/quick/items/qquicktext.cpp +++ b/src/quick/items/qquicktext.cpp @@ -1609,7 +1609,11 @@ void QQuickText::resetMaximumLineCount() If the text format is \c Text.AutoText the text element will automatically determine whether the text should be treated as - styled text. This determination is made using Qt::mightBeRichText(). + styled text. This determination is made using Qt::mightBeRichText() + which uses a fast and therefore simple heuristic. It mainly checks + whether there is something that looks like a tag before the first + line break. Although the result may be correct for common cases, + there is no guarantee. Text.StyledText is an optimized format supporting some basic text styling markup, in the style of html 3.2: -- 1.7.2.5