diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2016-05-04 09:20:35 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2016-05-06 08:11:19 +0000 |
commit | 722faa8daa233bd46e8037daebec1e557c84e454 (patch) | |
tree | f2727a32156652e1f9fb211059bd23ab3c06df93 | |
parent | 7c7d8f870e028bd288dee6b2cab9869e17794ce9 (diff) |
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>
-rw-r--r-- | src/gui/text/qtextodfwriter.cpp | 4 | ||||
-rw-r--r-- | 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; |