From 47c92fbb0b588b443cead18a5aad5a2b5ad9e4d7 Mon Sep 17 00:00:00 2001 From: Kevin Funk Date: Mon, 18 Sep 2017 10:36:49 +0200 Subject: Replace Q_DECL_OVERRIDE with override where possible Remaining uses of Q_DECL_OVERRIDE are in: src/corelib/global/qcompilerdetection.h src/corelib/global/qglobal.cpp doc/global/qt-cpp-defines.qdocconf (definition and documentation of Q_DECL_OVERRIDE) tests/manual/qcursor/qcursorhighdpi/main.cpp (a test executable compilable both under Qt4 and Qt5) Change-Id: Ib9b05d829add69e98a86238274b6a1fcb19b49ba Reviewed-by: Lars Knoll Reviewed-by: Ville Voutilainen Reviewed-by: Olivier Goffart (Woboq GmbH) --- .../fontdatabases/freetype/qfontengine_ft_p.h | 86 +++++++++++----------- .../freetype/qfreetypefontdatabase_p.h | 10 +-- 2 files changed, 48 insertions(+), 48 deletions(-) (limited to 'src/platformsupport/fontdatabases/freetype') diff --git a/src/platformsupport/fontdatabases/freetype/qfontengine_ft_p.h b/src/platformsupport/fontdatabases/freetype/qfontengine_ft_p.h index 2993e3b616..7efd175402 100644 --- a/src/platformsupport/fontdatabases/freetype/qfontengine_ft_p.h +++ b/src/platformsupport/fontdatabases/freetype/qfontengine_ft_p.h @@ -190,68 +190,68 @@ private: mutable int fast_glyph_count; }; - QFontEngine::FaceId faceId() const Q_DECL_OVERRIDE; - QFontEngine::Properties properties() const Q_DECL_OVERRIDE; - QFixed emSquareSize() const Q_DECL_OVERRIDE; - bool supportsSubPixelPositions() const Q_DECL_OVERRIDE + QFontEngine::FaceId faceId() const override; + QFontEngine::Properties properties() const override; + QFixed emSquareSize() const override; + bool supportsSubPixelPositions() const override { return default_hint_style == HintLight || default_hint_style == HintNone; } - bool getSfntTableData(uint tag, uchar *buffer, uint *length) const Q_DECL_OVERRIDE; - int synthesized() const Q_DECL_OVERRIDE; + bool getSfntTableData(uint tag, uchar *buffer, uint *length) const override; + int synthesized() const override; - QFixed ascent() const Q_DECL_OVERRIDE; - QFixed capHeight() const Q_DECL_OVERRIDE; - QFixed descent() const Q_DECL_OVERRIDE; - QFixed leading() const Q_DECL_OVERRIDE; - QFixed xHeight() const Q_DECL_OVERRIDE; - QFixed averageCharWidth() const Q_DECL_OVERRIDE; + QFixed ascent() const override; + QFixed capHeight() const override; + QFixed descent() const override; + QFixed leading() const override; + QFixed xHeight() const override; + QFixed averageCharWidth() const override; - qreal maxCharWidth() const Q_DECL_OVERRIDE; - QFixed lineThickness() const Q_DECL_OVERRIDE; - QFixed underlinePosition() const Q_DECL_OVERRIDE; + qreal maxCharWidth() const override; + QFixed lineThickness() const override; + QFixed underlinePosition() const override; - glyph_t glyphIndex(uint ucs4) const Q_DECL_OVERRIDE; - void doKerning(QGlyphLayout *, ShaperFlags) const Q_DECL_OVERRIDE; + glyph_t glyphIndex(uint ucs4) const override; + void doKerning(QGlyphLayout *, ShaperFlags) const override; - void getUnscaledGlyph(glyph_t glyph, QPainterPath *path, glyph_metrics_t *metrics) Q_DECL_OVERRIDE; + void getUnscaledGlyph(glyph_t glyph, QPainterPath *path, glyph_metrics_t *metrics) override; - bool supportsTransformation(const QTransform &transform) const Q_DECL_OVERRIDE; + bool supportsTransformation(const QTransform &transform) const override; void addGlyphsToPath(glyph_t *glyphs, QFixedPoint *positions, int nglyphs, - QPainterPath *path, QTextItem::RenderFlags flags) Q_DECL_OVERRIDE; + QPainterPath *path, QTextItem::RenderFlags flags) override; void addOutlineToPath(qreal x, qreal y, const QGlyphLayout &glyphs, - QPainterPath *path, QTextItem::RenderFlags flags) Q_DECL_OVERRIDE; + QPainterPath *path, QTextItem::RenderFlags flags) override; - bool stringToCMap(const QChar *str, int len, QGlyphLayout *glyphs, int *nglyphs, ShaperFlags flags) const Q_DECL_OVERRIDE; + bool stringToCMap(const QChar *str, int len, QGlyphLayout *glyphs, int *nglyphs, ShaperFlags flags) const override; - glyph_metrics_t boundingBox(const QGlyphLayout &glyphs) Q_DECL_OVERRIDE; - glyph_metrics_t boundingBox(glyph_t glyph) Q_DECL_OVERRIDE; - glyph_metrics_t boundingBox(glyph_t glyph, const QTransform &matrix) Q_DECL_OVERRIDE; + glyph_metrics_t boundingBox(const QGlyphLayout &glyphs) override; + glyph_metrics_t boundingBox(glyph_t glyph) override; + glyph_metrics_t boundingBox(glyph_t glyph, const QTransform &matrix) override; - void recalcAdvances(QGlyphLayout *glyphs, ShaperFlags flags) const Q_DECL_OVERRIDE; - QImage alphaMapForGlyph(glyph_t g) Q_DECL_OVERRIDE { return alphaMapForGlyph(g, 0); } - QImage alphaMapForGlyph(glyph_t, QFixed) Q_DECL_OVERRIDE; - QImage alphaMapForGlyph(glyph_t glyph, QFixed subPixelPosition, const QTransform &t) Q_DECL_OVERRIDE; - QImage alphaRGBMapForGlyph(glyph_t, QFixed subPixelPosition, const QTransform &t) Q_DECL_OVERRIDE; - QImage bitmapForGlyph(glyph_t, QFixed subPixelPosition, const QTransform &t) Q_DECL_OVERRIDE; + void recalcAdvances(QGlyphLayout *glyphs, ShaperFlags flags) const override; + QImage alphaMapForGlyph(glyph_t g) override { return alphaMapForGlyph(g, 0); } + QImage alphaMapForGlyph(glyph_t, QFixed) override; + QImage alphaMapForGlyph(glyph_t glyph, QFixed subPixelPosition, const QTransform &t) override; + QImage alphaRGBMapForGlyph(glyph_t, QFixed subPixelPosition, const QTransform &t) override; + QImage bitmapForGlyph(glyph_t, QFixed subPixelPosition, const QTransform &t) override; glyph_metrics_t alphaMapBoundingBox(glyph_t glyph, QFixed subPixelPosition, const QTransform &matrix, - QFontEngine::GlyphFormat format) Q_DECL_OVERRIDE; + QFontEngine::GlyphFormat format) override; QImage *lockedAlphaMapForGlyph(glyph_t glyph, QFixed subPixelPosition, GlyphFormat neededFormat, const QTransform &t, - QPoint *offset) Q_DECL_OVERRIDE; - bool hasInternalCaching() const Q_DECL_OVERRIDE { return cacheEnabled; } - void unlockAlphaMapForGlyph() Q_DECL_OVERRIDE; - bool expectsGammaCorrectedBlending() const Q_DECL_OVERRIDE; + QPoint *offset) override; + bool hasInternalCaching() const override { return cacheEnabled; } + void unlockAlphaMapForGlyph() override; + bool expectsGammaCorrectedBlending() const override; - void removeGlyphFromCache(glyph_t glyph) Q_DECL_OVERRIDE; - int glyphMargin(QFontEngine::GlyphFormat /* format */) Q_DECL_OVERRIDE { return 0; } + void removeGlyphFromCache(glyph_t glyph) override; + int glyphMargin(QFontEngine::GlyphFormat /* format */) override { return 0; } - int glyphCount() const Q_DECL_OVERRIDE; + int glyphCount() const override; enum Scaling { Scaled, @@ -282,13 +282,13 @@ private: bool init(FaceId faceId, bool antialias, GlyphFormat format, QFreetypeFace *freetypeFace); - int getPointInOutline(glyph_t glyph, int flags, quint32 point, QFixed *xpos, QFixed *ypos, quint32 *nPoints) Q_DECL_OVERRIDE; + int getPointInOutline(glyph_t glyph, int flags, quint32 point, QFixed *xpos, QFixed *ypos, quint32 *nPoints) override; void setQtDefaultHintStyle(QFont::HintingPreference hintingPreference); - void setDefaultHintStyle(HintStyle style) Q_DECL_OVERRIDE; + void setDefaultHintStyle(HintStyle style) override; - QFontEngine *cloneWithSize(qreal pixelSize) const Q_DECL_OVERRIDE; - Qt::HANDLE handle() const Q_DECL_OVERRIDE; + QFontEngine *cloneWithSize(qreal pixelSize) const override; + Qt::HANDLE handle() const override; bool initFromFontEngine(const QFontEngineFT *fontEngine); HintStyle defaultHintStyle() const { return default_hint_style; } diff --git a/src/platformsupport/fontdatabases/freetype/qfreetypefontdatabase_p.h b/src/platformsupport/fontdatabases/freetype/qfreetypefontdatabase_p.h index 6d51361400..0b2956b16e 100644 --- a/src/platformsupport/fontdatabases/freetype/qfreetypefontdatabase_p.h +++ b/src/platformsupport/fontdatabases/freetype/qfreetypefontdatabase_p.h @@ -66,11 +66,11 @@ struct FontFile class QFreeTypeFontDatabase : public QPlatformFontDatabase { public: - void populateFontDatabase() Q_DECL_OVERRIDE; - QFontEngine *fontEngine(const QFontDef &fontDef, void *handle) Q_DECL_OVERRIDE; - QFontEngine *fontEngine(const QByteArray &fontData, qreal pixelSize, QFont::HintingPreference hintingPreference) Q_DECL_OVERRIDE; - QStringList addApplicationFont(const QByteArray &fontData, const QString &fileName) Q_DECL_OVERRIDE; - void releaseHandle(void *handle) Q_DECL_OVERRIDE; + void populateFontDatabase() override; + QFontEngine *fontEngine(const QFontDef &fontDef, void *handle) override; + QFontEngine *fontEngine(const QByteArray &fontData, qreal pixelSize, QFont::HintingPreference hintingPreference) override; + QStringList addApplicationFont(const QByteArray &fontData, const QString &fileName) override; + void releaseHandle(void *handle) override; static QStringList addTTFile(const QByteArray &fontData, const QByteArray &file); }; -- cgit v1.2.3