summaryrefslogtreecommitdiffstats
path: root/src/platformsupport/fontdatabases/freetype/qfontengine_ft.cpp
diff options
context:
space:
mode:
authorKevin Funk <kevin.funk@kdab.com>2017-09-18 11:49:52 +0200
committerKevin Funk <kevin.funk@kdab.com>2017-09-19 11:53:55 +0000
commit58c14c4a7edcecdd9d58b682a9360c83e2274ec5 (patch)
tree7f600686e4dd92681bec09ac745a9dcd4425844b /src/platformsupport/fontdatabases/freetype/qfontengine_ft.cpp
parent47c92fbb0b588b443cead18a5aad5a2b5ad9e4d7 (diff)
Replace Q_NULLPTR with nullptr where possible
Remaining uses of Q_NULLPTR are in: src/corelib/global/qcompilerdetection.h (definition and documentation of Q_NULLPTR) tests/manual/qcursor/qcursorhighdpi/main.cpp (a test executable compilable both under Qt4 and Qt5) Change-Id: If6b074d91486e9b784138f4514f5c6d072acda9a Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Diffstat (limited to 'src/platformsupport/fontdatabases/freetype/qfontengine_ft.cpp')
-rw-r--r--src/platformsupport/fontdatabases/freetype/qfontengine_ft.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/platformsupport/fontdatabases/freetype/qfontengine_ft.cpp b/src/platformsupport/fontdatabases/freetype/qfontengine_ft.cpp
index 64a0ef6fe8..cf0314fa47 100644
--- a/src/platformsupport/fontdatabases/freetype/qfontengine_ft.cpp
+++ b/src/platformsupport/fontdatabases/freetype/qfontengine_ft.cpp
@@ -1542,7 +1542,7 @@ QFontEngineFT::QGlyphSet *QFontEngineFT::loadGlyphSet(const QTransform &matrix)
// FT_Set_Transform only supports scalable fonts
if (!FT_IS_SCALABLE(freetype->face))
- return matrix.type() <= QTransform::TxTranslate ? &defaultGlyphSet : Q_NULLPTR;
+ return matrix.type() <= QTransform::TxTranslate ? &defaultGlyphSet : nullptr;
FT_Matrix m = QTransformToFTMatrix(matrix);
@@ -1961,7 +1961,7 @@ glyph_metrics_t QFontEngineFT::alphaMapBoundingBox(glyph_t glyph, QFixed subPixe
static inline QImage alphaMapFromGlyphData(QFontEngineFT::Glyph *glyph, QFontEngine::GlyphFormat glyphFormat)
{
- if (glyph == Q_NULLPTR || glyph->height == 0 || glyph->width == 0)
+ if (glyph == nullptr || glyph->height == 0 || glyph->width == 0)
return QImage();
QImage::Format format = QImage::Format_Invalid;
@@ -2009,14 +2009,14 @@ QImage *QFontEngineFT::lockedAlphaMapForGlyph(glyph_t glyphIndex, QFixed subPixe
currentlyLockedAlphaMap = alphaMapFromGlyphData(glyph, neededFormat);
- const bool glyphHasGeometry = glyph != Q_NULLPTR && glyph->height != 0 && glyph->width != 0;
+ const bool glyphHasGeometry = glyph != nullptr && glyph->height != 0 && glyph->width != 0;
if (!cacheEnabled && glyph != &emptyGlyph) {
currentlyLockedAlphaMap = currentlyLockedAlphaMap.copy();
delete glyph;
}
if (!glyphHasGeometry)
- return Q_NULLPTR;
+ return nullptr;
if (currentlyLockedAlphaMap.isNull())
return QFontEngine::lockedAlphaMapForGlyph(glyphIndex, subPixelPosition, neededFormat, t, offset);
@@ -2114,7 +2114,7 @@ QImage QFontEngineFT::alphaRGBMapForGlyph(glyph_t g, QFixed subPixelPosition, co
QImage QFontEngineFT::bitmapForGlyph(glyph_t g, QFixed subPixelPosition, const QTransform &t)
{
Glyph *glyph = loadGlyphFor(g, subPixelPosition, defaultFormat, t);
- if (glyph == Q_NULLPTR)
+ if (glyph == nullptr)
return QImage();
QImage img;