diff options
Diffstat (limited to 'src/gui/text')
-rw-r--r-- | src/gui/text/qtextdocumentlayout.cpp | 12 | ||||
-rw-r--r-- | src/gui/text/qtextengine.cpp | 3 |
2 files changed, 5 insertions, 10 deletions
diff --git a/src/gui/text/qtextdocumentlayout.cpp b/src/gui/text/qtextdocumentlayout.cpp index c95ec4c686..b86b6ca923 100644 --- a/src/gui/text/qtextdocumentlayout.cpp +++ b/src/gui/text/qtextdocumentlayout.cpp @@ -1209,8 +1209,7 @@ static inline QTextFormat::Property borderPropertyForEdge(QCss::Edge edge) case QCss::RightEdge: return QTextFormat::TableCellRightBorder; default: - Q_UNREACHABLE(); - return QTextFormat::UserProperty; + Q_UNREACHABLE_RETURN(QTextFormat::UserProperty); } } @@ -1226,8 +1225,7 @@ static inline QTextFormat::Property borderStylePropertyForEdge(QCss::Edge edge) case QCss::RightEdge: return QTextFormat::TableCellRightBorderStyle; default: - Q_UNREACHABLE(); - return QTextFormat::UserProperty; + Q_UNREACHABLE_RETURN(QTextFormat::UserProperty); } } @@ -1243,8 +1241,7 @@ static inline QCss::Edge adjacentEdge(QCss::Edge edge) case QCss::LeftEdge: return QCss::RightEdge; default: - Q_UNREACHABLE(); - return QCss::NumEdges; + Q_UNREACHABLE_RETURN(QCss::NumEdges); } } @@ -1323,8 +1320,7 @@ static inline bool sharesAxis(const QTextTableCell &cell, QCss::Edge edge, return cell.column() + cell.columnSpan() == competingCell.column() + (competingCellEdge == QCss::LeftEdge ? 0 : competingCell.columnSpan()); default: - Q_UNREACHABLE(); - return false; + Q_UNREACHABLE_RETURN(false); } } diff --git a/src/gui/text/qtextengine.cpp b/src/gui/text/qtextengine.cpp index 1c1da979c8..27284d8d5a 100644 --- a/src/gui/text/qtextengine.cpp +++ b/src/gui/text/qtextengine.cpp @@ -1395,8 +1395,7 @@ void QTextEngine::shapeText(int item) const } if (Q_UNLIKELY(!ensureSpace(itemLength))) { - Q_UNREACHABLE(); // ### report OOM error somehow - return; + Q_UNREACHABLE_RETURN(); // ### report OOM error somehow } QFontEngine *fontEngine = this->fontEngine(si, &si.ascent, &si.descent, &si.leading); |