QTextDocumentFragment: Fix deprecation warning
Fix text/qtextdocumentfragment.cpp: In member function 'bool QTextHtmlImporter::appendNodeText()': text/qtextdocumentfragment.cpp:613:125: warning: 'constexpr QChar::QChar(char)' is deprecated: Use fromUtf8, QStringLiteral, or QLatin1String [-Wdeprecated-declarations] Change-Id: I90b23fa949e5cd979f2955b523060c8b1752f893 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
This commit is contained in:
parent
ce73b4db62
commit
764f488c96
@ -610,7 +610,7 @@ bool QTextHtmlImporter::appendNodeText()
|
|||||||
|| ch == QChar::ParagraphSeparator) {
|
|| ch == QChar::ParagraphSeparator) {
|
||||||
|
|
||||||
if (!textToInsert.isEmpty()) {
|
if (!textToInsert.isEmpty()) {
|
||||||
if (wsm == QTextHtmlParserNode::WhiteSpacePreLine && textToInsert.at(textToInsert.length() - 1) == QChar(' '))
|
if (wsm == QTextHtmlParserNode::WhiteSpacePreLine && textToInsert.at(textToInsert.length() - 1) == QLatin1Char(' '))
|
||||||
textToInsert = textToInsert.chopped(1);
|
textToInsert = textToInsert.chopped(1);
|
||||||
cursor.insertText(textToInsert, format);
|
cursor.insertText(textToInsert, format);
|
||||||
textToInsert.clear();
|
textToInsert.clear();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user