From 722faa8daa233bd46e8037daebec1e557c84e454 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Wed, 4 May 2016 09:20:35 +0200 Subject: Add some QChar::unicode() calls to brush over deprecation warning. Change-Id: I381226153cdd7bc002476ebc7a33fcb6cf15535d Reviewed-by: Marc Mutz Reviewed-by: Konstantin Ritt --- src/gui/text/qtextodfwriter.cpp | 4 ++-- tests/auto/gui/text/qtextscriptengine/tst_qtextscriptengine.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/gui/text/qtextodfwriter.cpp b/src/gui/text/qtextodfwriter.cpp index bd2a9d5183..f7741bad2c 100644 --- a/src/gui/text/qtextodfwriter.cpp +++ b/src/gui/text/qtextodfwriter.cpp @@ -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; } diff --git a/tests/auto/gui/text/qtextscriptengine/tst_qtextscriptengine.cpp b/tests/auto/gui/text/qtextscriptengine/tst_qtextscriptengine.cpp index 18012fd347..de29389796 100644 --- a/tests/auto/gui/text/qtextscriptengine/tst_qtextscriptengine.cpp +++ b/tests/auto/gui/text/qtextscriptengine/tst_qtextscriptengine.cpp @@ -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; -- cgit v1.2.3