OSDN Git Service

remove unused QScriptLine::hasTrailingSpaces member
authorIvailo Monev <xakepa10@gmail.com>
Sat, 29 Jan 2022 21:11:09 +0000 (23:11 +0200)
committerIvailo Monev <xakepa10@gmail.com>
Sat, 29 Jan 2022 21:11:09 +0000 (23:11 +0200)
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
src/gui/text/qtextengine_p.h
src/gui/text/qtextlayout.cpp

index 64d0cc2..d757789 100644 (file)
@@ -267,7 +267,7 @@ struct Q_AUTOTEST_EXPORT QScriptLine
     QScriptLine()
         : from(0), trailingSpaces(0), length(0),
         justified(false), gridfitted(false),
-        hasTrailingSpaces(false), leadingIncluded(false) {}
+        leadingIncluded(false) {}
     QFixed descent;
     QFixed ascent;
     QFixed leading;
@@ -281,7 +281,6 @@ struct Q_AUTOTEST_EXPORT QScriptLine
     int length;
     mutable bool justified;
     mutable bool gridfitted;
-    bool hasTrailingSpaces;
     bool leadingIncluded;
     QFixed height() const { return (ascent + descent).ceil() + 1
                             + (leadingIncluded?  qMax(QFixed(),leading) : QFixed()); }
index 614145e..7aa92b5 100644 (file)
@@ -1519,7 +1519,6 @@ void QTextLine::layout_helper(int maxGlyphs)
     line.length = 0;
     line.trailingSpaces = 0;
     line.textWidth = 0;
-    line.hasTrailingSpaces = false;
 
     if (!eng->layoutData->items.size() || line.from >= eng->layoutData->string.length()) {
         line.setDefaultHeight(eng);
@@ -1735,7 +1734,6 @@ found:
         line.textWidth += lbh.spaceData.textWidth;
     if (lbh.spaceData.length) {
         line.trailingSpaces = lbh.spaceData.length;
-        line.hasTrailingSpaces = true;
     }
 
     line.justified = false;