From ca58c627272b9b49786bfcc44e3b70ca7712a8f2 Mon Sep 17 00:00:00 2001 From: Andy Shaw Date: Tue, 15 Aug 2017 13:16:16 +0200 Subject: Show nbsps as a degree symbol to differeniate from normal spaces When using QTextOption::ShowTabsAndSpaces then spaces and nbsps would appear the same. So since using the degree symbol to illustrate nbsps is an accepted standard, we use that and spaces are illustrated as before. [ChangeLog][QtGui] Display non-breaking spaces as a degree symbol when QTextOption::ShowTabsAndSpaces is used. Task-number: QTBUG-57479 Change-Id: I20c72c9e1640457c034b87587a8975cb73228803 Reviewed-by: Eskil Abrahamsen Blomfeldt --- src/gui/text/qtextengine.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/gui/text/qtextengine.cpp') diff --git a/src/gui/text/qtextengine.cpp b/src/gui/text/qtextengine.cpp index 9169ed8da1..2d1f0fa823 100644 --- a/src/gui/text/qtextengine.cpp +++ b/src/gui/text/qtextengine.cpp @@ -2064,7 +2064,7 @@ void QTextEngine::itemize() const case QChar::Space: case QChar::Nbsp: if (option.flags() & QTextOption::ShowTabsAndSpaces) { - analysis->flags = QScriptAnalysis::Space; + analysis->flags = (*uc == QChar::Space) ? QScriptAnalysis::Space : QScriptAnalysis::Nbsp; analysis->bidiLevel = bidi.baseLevel; break; } -- cgit v1.2.3