summaryrefslogtreecommitdiffstats
path: root/src/gui/text
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/text')
-rw-r--r--src/gui/text/qfontsubset.cpp2
-rw-r--r--src/gui/text/qtextcursor.cpp8
-rw-r--r--src/gui/text/qtextdocumentfragment.cpp2
-rw-r--r--src/gui/text/qtextengine.cpp14
-rw-r--r--src/gui/text/qtexthtmlparser.cpp6
5 files changed, 15 insertions, 17 deletions
diff --git a/src/gui/text/qfontsubset.cpp b/src/gui/text/qfontsubset.cpp
index c8f0393084..49638832e0 100644
--- a/src/gui/text/qfontsubset.cpp
+++ b/src/gui/text/qfontsubset.cpp
@@ -740,7 +740,7 @@ static void convertPath(const QPainterPath &path, QVector<TTF_POINT> *points, QV
points->takeLast();
endPoints->append(points->size() - 1);
}
- // fall through
+ Q_FALLTHROUGH();
case QPainterPath::LineToElement:
p.flags = OnCurve;
break;
diff --git a/src/gui/text/qtextcursor.cpp b/src/gui/text/qtextcursor.cpp
index f824d1b369..f32c31d18e 100644
--- a/src/gui/text/qtextcursor.cpp
+++ b/src/gui/text/qtextcursor.cpp
@@ -438,7 +438,7 @@ bool QTextCursorPrivate::movePosition(QTextCursor::MoveOperation op, QTextCursor
if (relativePos < blockIt.length()-1)
++position;
- // FALL THROUGH!
+ Q_FALLTHROUGH();
}
case QTextCursor::PreviousWord:
case QTextCursor::WordLeft:
@@ -590,9 +590,9 @@ bool QTextCursorPrivate::movePosition(QTextCursor::MoveOperation op, QTextCursor
adjustX = false;
break;
}
- case QTextCursor::NextCell: // fall through
- case QTextCursor::PreviousCell: // fall through
- case QTextCursor::NextRow: // fall through
+ case QTextCursor::NextCell:
+ case QTextCursor::PreviousCell:
+ case QTextCursor::NextRow:
case QTextCursor::PreviousRow: {
QTextTable *table = qobject_cast<QTextTable *>(priv->frameAt(position));
if (!table)
diff --git a/src/gui/text/qtextdocumentfragment.cpp b/src/gui/text/qtextdocumentfragment.cpp
index 5727b34e86..079b2e01f7 100644
--- a/src/gui/text/qtextdocumentfragment.cpp
+++ b/src/gui/text/qtextdocumentfragment.cpp
@@ -827,7 +827,7 @@ bool QTextHtmlImporter::closeTag()
case Html_div:
if (closedNode->children.isEmpty())
break;
- // fall through
+ Q_FALLTHROUGH();
default:
if (closedNode->isBlock())
blockTagClosed = true;
diff --git a/src/gui/text/qtextengine.cpp b/src/gui/text/qtextengine.cpp
index d9b648b170..1aaacdd00d 100644
--- a/src/gui/text/qtextengine.cpp
+++ b/src/gui/text/qtextengine.cpp
@@ -508,7 +508,7 @@ static bool bidiItemize(QTextEngine *engine, QScriptAnalysis *analysis, QBidiCon
case QChar::DirAN:
if (eor >= 0)
appendItems(analysis, sor, eor, control, dir);
- // fall through
+ Q_FALLTHROUGH();
case QChar::DirR:
case QChar::DirAL:
dir = QChar::DirR; eor = current; status.eor = QChar::DirR; break;
@@ -564,7 +564,7 @@ static bool bidiItemize(QTextEngine *engine, QScriptAnalysis *analysis, QBidiCon
status.eor = QChar::DirON;
dir = QChar::DirAN;
}
- // fall through
+ Q_FALLTHROUGH();
case QChar::DirEN:
case QChar::DirL:
eor = current;
@@ -744,7 +744,7 @@ static bool bidiItemize(QTextEngine *engine, QScriptAnalysis *analysis, QBidiCon
status.last = QChar::DirL;
break;
}
- // fall through
+ Q_FALLTHROUGH();
default:
status.last = dirCurrent;
}
@@ -1663,7 +1663,7 @@ void QTextEngine::itemize() const
analysis->bidiLevel = control.baseLevel();
break;
}
- // fall through
+ Q_FALLTHROUGH();
default:
analysis->flags = QScriptAnalysis::None;
break;
@@ -2250,7 +2250,6 @@ void QTextEngine::justify(const QScriptLine &line)
case Justification_Prohibited:
break;
case Justification_Space:
- // fall through
case Justification_Arabic_Space:
if (kashida_pos >= 0) {
// qDebug("kashida position at %d in word", kashida_pos);
@@ -2263,7 +2262,7 @@ void QTextEngine::justify(const QScriptLine &line)
}
kashida_pos = -1;
kashida_type = Justification_Arabic_Normal;
- // fall through
+ Q_FALLTHROUGH();
case Justification_Character:
set(&justificationPoints[nPoints++], justification, g.mid(i), fontEngine(si));
maxJustify = qMax(maxJustify, justification);
@@ -2966,9 +2965,8 @@ QFixed QTextEngine::calculateTabWidth(int item, QFixed x) const
switch (tabSpec.type) {
case QTextOption::CenterTab:
length /= 2;
- // fall through
+ Q_FALLTHROUGH();
case QTextOption::DelimiterTab:
- // fall through
case QTextOption::RightTab:
tab = QFixed::fromReal(tabSpec.position) * dpiScale - length;
if (tab < x) // default to tab taking no space
diff --git a/src/gui/text/qtexthtmlparser.cpp b/src/gui/text/qtexthtmlparser.cpp
index 7bca50325c..7fac3331f1 100644
--- a/src/gui/text/qtexthtmlparser.cpp
+++ b/src/gui/text/qtexthtmlparser.cpp
@@ -1871,7 +1871,7 @@ QVector<QCss::Declaration> standardDeclarationForNode(const QTextHtmlParserNode
decls << decl;
if (node.id == Html_b || node.id == Html_strong)
break;
- // Delibrate fall through
+ Q_FALLTHROUGH();
case Html_big:
case Html_small:
if (node.id != Html_th) {
@@ -1892,7 +1892,7 @@ QVector<QCss::Declaration> standardDeclarationForNode(const QTextHtmlParserNode
decls << decl;
break;
}
- // Delibrate fall through
+ Q_FALLTHROUGH();
case Html_center:
case Html_td:
decl = QCss::Declaration();
@@ -1969,7 +1969,7 @@ QVector<QCss::Declaration> standardDeclarationForNode(const QTextHtmlParserNode
}
if (node.id != Html_pre)
break;
- // Delibrate fall through
+ Q_FALLTHROUGH();
case Html_br:
case Html_nobr:
decl = QCss::Declaration();