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:
Friedemann Kleint 2019-08-21 09:41:57 +02:00
parent ce73b4db62
commit 764f488c96

View File

@ -610,7 +610,7 @@ bool QTextHtmlImporter::appendNodeText()
|| ch == QChar::ParagraphSeparator) {
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);
cursor.insertText(textToInsert, format);
textToInsert.clear();