diff options
Diffstat (limited to 'src/gui/text')
-rw-r--r-- | src/gui/text/freetype/qfontengine_ft.cpp | 4 | ||||
-rw-r--r-- | src/gui/text/qfont.cpp | 2 | ||||
-rw-r--r-- | src/gui/text/qfontengine.cpp | 2 | ||||
-rw-r--r-- | src/gui/text/qfontengine_qpf2.cpp | 4 | ||||
-rw-r--r-- | src/gui/text/qtextdocument_p.cpp | 2 | ||||
-rw-r--r-- | src/gui/text/qtextdocumentlayout.cpp | 2 | ||||
-rw-r--r-- | src/gui/text/qtextodfwriter.cpp | 2 |
7 files changed, 9 insertions, 9 deletions
diff --git a/src/gui/text/freetype/qfontengine_ft.cpp b/src/gui/text/freetype/qfontengine_ft.cpp index e916d7242f..42cf147901 100644 --- a/src/gui/text/freetype/qfontengine_ft.cpp +++ b/src/gui/text/freetype/qfontengine_ft.cpp @@ -220,7 +220,7 @@ QFreetypeFace *QFreetypeFace::getFace(const QFontEngine::FaceId &face_id, QtFreetypeData *freetypeData = qt_getFreetypeData(); - QFreetypeFace *freetype = freetypeData->faces.value(face_id, 0); + QFreetypeFace *freetype = freetypeData->faces.value(face_id, nullptr); if (freetype) { freetype->ref.ref(); } else { @@ -1396,7 +1396,7 @@ void QFontEngineFT::TransformedGlyphSets::moveToFront(int i) QFontEngineFT::QGlyphSet *QFontEngineFT::loadGlyphSet(const QTransform &matrix) { if (matrix.type() > QTransform::TxShear || !cacheEnabled) - return 0; + return nullptr; // FT_Set_Transform only supports scalable fonts if (!FT_IS_SCALABLE(freetype->face)) diff --git a/src/gui/text/qfont.cpp b/src/gui/text/qfont.cpp index 9005c11792..dab787bbde 100644 --- a/src/gui/text/qfont.cpp +++ b/src/gui/text/qfont.cpp @@ -2667,7 +2667,7 @@ void QFontCache::cleanup() // no cache - just ignore } if (cache && cache->hasLocalData()) - cache->setLocalData(0); + cache->setLocalData(nullptr); } static QBasicAtomicInt font_cache_id = Q_BASIC_ATOMIC_INITIALIZER(0); diff --git a/src/gui/text/qfontengine.cpp b/src/gui/text/qfontengine.cpp index d3c8c1a840..819b2d14f8 100644 --- a/src/gui/text/qfontengine.cpp +++ b/src/gui/text/qfontengine.cpp @@ -230,7 +230,7 @@ bool QFontEngine::supportsScript(QChar::Script script) const if (qt_useHarfbuzzNG()) { // in AAT fonts, 'gsub' table is effectively replaced by 'mort'/'morx' table uint len; - if (getSfntTableData(MAKE_TAG('m','o','r','t'), 0, &len) || getSfntTableData(MAKE_TAG('m','o','r','x'), 0, &len)) + if (getSfntTableData(MAKE_TAG('m','o','r','t'), nullptr, &len) || getSfntTableData(MAKE_TAG('m','o','r','x'), nullptr, &len)) return true; if (hb_face_t *face = hb_qt_face_get_for_engine(const_cast<QFontEngine *>(this))) { diff --git a/src/gui/text/qfontengine_qpf2.cpp b/src/gui/text/qfontengine_qpf2.cpp index 7178ef2928..3b904e122a 100644 --- a/src/gui/text/qfontengine_qpf2.cpp +++ b/src/gui/text/qfontengine_qpf2.cpp @@ -90,7 +90,7 @@ static const QFontEngineQPF2::TagType tagTypes[QFontEngineQPF2::NumTags] = { #define READ_VERIFY(type, variable) \ if (tagPtr + sizeof(type) > endPtr) { \ DEBUG_VERIFY() << "read verify failed in line" << __LINE__; \ - return 0; \ + return nullptr; \ } \ variable = qFromBigEndian<type>(tagPtr); \ DEBUG_VERIFY() << "read value" << variable << "of type " #type; \ @@ -113,7 +113,7 @@ T readValue(const uchar *&data) #define VERIFY_TAG(condition) \ if (!(condition)) { \ DEBUG_VERIFY() << "verifying tag condition " #condition " failed in line" << __LINE__ << "with tag" << tag; \ - return 0; \ + return nullptr; \ } static inline const uchar *verifyTag(const uchar *tagPtr, const uchar *endPtr) diff --git a/src/gui/text/qtextdocument_p.cpp b/src/gui/text/qtextdocument_p.cpp index 94efb4a94d..d6da0f38d2 100644 --- a/src/gui/text/qtextdocument_p.cpp +++ b/src/gui/text/qtextdocument_p.cpp @@ -1601,7 +1601,7 @@ QTextObject *QTextDocumentPrivate::objectForIndex(int objectIndex) const if (objectIndex < 0) return nullptr; - QTextObject *object = objects.value(objectIndex, 0); + QTextObject *object = objects.value(objectIndex, nullptr); if (!object) { QTextDocumentPrivate *that = const_cast<QTextDocumentPrivate *>(this); QTextFormat fmt = formats.objectFormat(objectIndex); diff --git a/src/gui/text/qtextdocumentlayout.cpp b/src/gui/text/qtextdocumentlayout.cpp index d6e2441862..8ea3a655b7 100644 --- a/src/gui/text/qtextdocumentlayout.cpp +++ b/src/gui/text/qtextdocumentlayout.cpp @@ -2909,7 +2909,7 @@ void QTextDocumentLayoutPrivate::positionFloat(QTextFrame *frame, QTextLine *cur // If the frame is a table, then positioning it will affect the size if it covers more than // one page, because of page breaks and repeating the header. - if (qobject_cast<QTextTable *>(frame) != 0) + if (qobject_cast<QTextTable *>(frame) != nullptr) fd->sizeDirty = frameSpansIntoNextPage; } diff --git a/src/gui/text/qtextodfwriter.cpp b/src/gui/text/qtextodfwriter.cpp index 62a655b43c..ef51c967b0 100644 --- a/src/gui/text/qtextodfwriter.cpp +++ b/src/gui/text/qtextodfwriter.cpp @@ -312,7 +312,7 @@ void QTextOdfWriter::writeBlock(QXmlStreamWriter &writer, const QTextBlock &bloc .arg(block.textList()->formatIndex())); } else { - m_listStack.push(0); + m_listStack.push(nullptr); } } } |