Add some QChar::unicode() calls to brush over deprecation warning.

Change-Id: I381226153cdd7bc002476ebc7a33fcb6cf15535d
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
This commit is contained in:
Friedemann Kleint 2016-05-04 09:20:35 +02:00
parent 7c7d8f870e
commit 722faa8daa
2 changed files with 3 additions and 3 deletions

View File

@ -295,7 +295,7 @@ void QTextOdfWriter::writeBlock(QXmlStreamWriter &writer, const QTextBlock &bloc
writer.writeStartElement(textNS, QString::fromLatin1("span"));
QString fragmentText = frag.fragment().text();
if (fragmentText.length() == 1 && fragmentText[0] == 0xFFFC) { // its an inline character.
if (fragmentText.length() == 1 && fragmentText[0] == QChar(0xFFFC)) { // its an inline character.
writeInlineCharacter(writer, frag.fragment());
writer.writeEndElement(); // span
continue;
@ -510,7 +510,7 @@ void QTextOdfWriter::writeBlockFormat(QXmlStreamWriter &writer, QTextBlockFormat
case QTextOption::CenterTab: type = QString::fromLatin1("center"); break;
}
writer.writeAttribute(styleNS, QString::fromLatin1("type"), type);
if (iterator->delimiter != 0)
if (!iterator->delimiter.isNull())
writer.writeAttribute(styleNS, QString::fromLatin1("char"), iterator->delimiter);
++iterator;
}

View File

@ -150,7 +150,7 @@ static void doShapingTests()
}
} else {
// decomposed shaping
if (string.at(0) == 0x1fc1 || string.at(0) == 0x1fed)
if (string.at(0) == QChar(0x1fc1) || string.at(0) == QChar(0x1fed))
return;
if (string.normalized(QString::NormalizationForm_D).normalized(QString::NormalizationForm_C) != string)
return;