diff options
author | Shawn Rutledge <shawn.rutledge@qt.io> | 2019-10-02 12:19:11 +0200 |
---|---|---|
committer | Shawn Rutledge <shawn.rutledge@qt.io> | 2019-10-10 21:08:08 +0200 |
commit | f1dd6addda908185f497d299d706b88977dea858 (patch) | |
tree | 1dff6f7093bb22c4c6c62ae5a374934ef634aa9a /examples/widgets/richtext/textedit | |
parent | a6ece9e88a3b227b7359d85d2641e9aab9be1c7b (diff) |
Make QTextBlockFormat::MarkerType an enum class
This came up during API review.
Change-Id: I9198e1eb96db0c21e46a226a032919bb62d3ca66
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Diffstat (limited to 'examples/widgets/richtext/textedit')
-rw-r--r-- | examples/widgets/richtext/textedit/textedit.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/examples/widgets/richtext/textedit/textedit.cpp b/examples/widgets/richtext/textedit/textedit.cpp index 996bb8e0a4..85fb83ab89 100644 --- a/examples/widgets/richtext/textedit/textedit.cpp +++ b/examples/widgets/richtext/textedit/textedit.cpp @@ -640,7 +640,7 @@ void TextEdit::textStyle(int styleIndex) { QTextCursor cursor = textEdit->textCursor(); QTextListFormat::Style style = QTextListFormat::ListStyleUndefined; - QTextBlockFormat::MarkerType marker = QTextBlockFormat::NoMarker; + QTextBlockFormat::MarkerType marker = QTextBlockFormat::MarkerType::NoMarker; switch (styleIndex) { case 1: @@ -657,14 +657,14 @@ void TextEdit::textStyle(int styleIndex) style = cursor.currentList()->format().style(); else style = QTextListFormat::ListDisc; - marker = QTextBlockFormat::Unchecked; + marker = QTextBlockFormat::MarkerType::Unchecked; break; case 5: if (cursor.currentList()) style = cursor.currentList()->format().style(); else style = QTextListFormat::ListDisc; - marker = QTextBlockFormat::Checked; + marker = QTextBlockFormat::MarkerType::Checked; break; case 6: style = QTextListFormat::ListDecimal; @@ -823,14 +823,14 @@ void TextEdit::cursorPositionChanged() break; } switch (textEdit->textCursor().block().blockFormat().marker()) { - case QTextBlockFormat::NoMarker: + case QTextBlockFormat::MarkerType::NoMarker: actionToggleCheckState->setChecked(false); break; - case QTextBlockFormat::Unchecked: + case QTextBlockFormat::MarkerType::Unchecked: comboStyle->setCurrentIndex(4); actionToggleCheckState->setChecked(false); break; - case QTextBlockFormat::Checked: + case QTextBlockFormat::MarkerType::Checked: comboStyle->setCurrentIndex(5); actionToggleCheckState->setChecked(true); break; |