diff --git a/colorproxy_p.h b/colorproxy_p.h --- a/colorproxy_p.h +++ b/colorproxy_p.h @@ -52,13 +52,13 @@ ~QPaintDeviceColorProxy(); QPaintDevice* proxiedDevice() const; - QPaintEngine* paintEngine() const Q_DECL_OVERRIDE; + QPaintEngine* paintEngine() const override; QBrush map(const QBrush& brush) const; inline QColor map(const QColor& color) const; QPen map(const QPen& pen) const; protected: - int metric(PaintDeviceMetric metric) const Q_DECL_OVERRIDE; + int metric(PaintDeviceMetric metric) const override; private: QPaintDevice* m_proxiedDevice; QPaintEngine* m_engine; @@ -71,25 +71,25 @@ QPaintEngineColorProxy(); ~QPaintEngineColorProxy(); - bool begin(QPaintDevice* device) Q_DECL_OVERRIDE; - bool end() Q_DECL_OVERRIDE; - void drawEllipse(const QRectF& rect) Q_DECL_OVERRIDE; - void drawEllipse(const QRect& rect) Q_DECL_OVERRIDE; - void drawImage(const QRectF& rectangle, const QImage& image, const QRectF& sr, Qt::ImageConversionFlags flags = Qt::AutoColor) Q_DECL_OVERRIDE; - void drawLines(const QLineF* lines, int lineCount) Q_DECL_OVERRIDE; - void drawLines(const QLine* lines, int lineCount) Q_DECL_OVERRIDE; - void drawPath(const QPainterPath& path) Q_DECL_OVERRIDE; - void drawPixmap(const QRectF& r, const QPixmap& pm, const QRectF& sr) Q_DECL_OVERRIDE; - void drawPoints(const QPointF* points, int pointCount) Q_DECL_OVERRIDE; - void drawPoints(const QPoint* points, int pointCount) Q_DECL_OVERRIDE; - void drawPolygon(const QPointF* points, int pointCount, PolygonDrawMode mode) Q_DECL_OVERRIDE; - void drawPolygon(const QPoint* points, int pointCount, PolygonDrawMode mode) Q_DECL_OVERRIDE; - void drawRects(const QRectF* rects, int rectCount) Q_DECL_OVERRIDE; - void drawRects(const QRect* rects, int rectCount) Q_DECL_OVERRIDE; - void drawTextItem(const QPointF& p, const QTextItem& textItem) Q_DECL_OVERRIDE; - void drawTiledPixmap(const QRectF& rect, const QPixmap& pixmap, const QPointF& p) Q_DECL_OVERRIDE; - Type type() const Q_DECL_OVERRIDE; - void updateState(const QPaintEngineState& state) Q_DECL_OVERRIDE; + bool begin(QPaintDevice* device) override; + bool end() override; + void drawEllipse(const QRectF& rect) override; + void drawEllipse(const QRect& rect) override; + void drawImage(const QRectF& rectangle, const QImage& image, const QRectF& sr, Qt::ImageConversionFlags flags = Qt::AutoColor) override; + void drawLines(const QLineF* lines, int lineCount) override; + void drawLines(const QLine* lines, int lineCount) override; + void drawPath(const QPainterPath& path) override; + void drawPixmap(const QRectF& r, const QPixmap& pm, const QRectF& sr) override; + void drawPoints(const QPointF* points, int pointCount) override; + void drawPoints(const QPoint* points, int pointCount) override; + void drawPolygon(const QPointF* points, int pointCount, PolygonDrawMode mode) override; + void drawPolygon(const QPoint* points, int pointCount, PolygonDrawMode mode) override; + void drawRects(const QRectF* rects, int rectCount) override; + void drawRects(const QRect* rects, int rectCount) override; + void drawTextItem(const QPointF& p, const QTextItem& textItem) override; + void drawTiledPixmap(const QRectF& rect, const QPixmap& pixmap, const QPointF& p) override; + Type type() const override; + void updateState(const QPaintEngineState& state) override; private: QPaintDeviceColorProxy* m_proxy; QPainter* m_painter; diff --git a/declarativeimports/corebindingsplugin.h b/declarativeimports/corebindingsplugin.h --- a/declarativeimports/corebindingsplugin.h +++ b/declarativeimports/corebindingsplugin.h @@ -27,7 +27,7 @@ Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface") public: - void registerTypes(const char *uri) Q_DECL_OVERRIDE; + void registerTypes(const char *uri) override; }; #endif // COREBINDINGSPLUGIN_H diff --git a/highscore/kscoredialog.h b/highscore/kscoredialog.h --- a/highscore/kscoredialog.h +++ b/highscore/kscoredialog.h @@ -267,15 +267,15 @@ ///Display the dialog as non-modal virtual void show(); ///Display the dialog as modal - int exec() Q_DECL_OVERRIDE; + int exec() override; private Q_SLOTS: void slotGotReturn(); void slotGotName(); void slotForgetScore(); private: - void keyPressEvent(QKeyEvent *ev) Q_DECL_OVERRIDE; + void keyPressEvent(QKeyEvent *ev) override; private: class KScoreDialogPrivate; diff --git a/kgamepopupitem.h b/kgamepopupitem.h --- a/kgamepopupitem.h +++ b/kgamepopupitem.h @@ -146,11 +146,11 @@ /** * @return the bounding rect of this item. Reimplemented from QGraphicsItem */ - QRectF boundingRect() const Q_DECL_OVERRIDE; + QRectF boundingRect() const override; /** * Paints item. Reimplemented from QGraphicsItem */ - void paint( QPainter* p, const QStyleOptionGraphicsItem *option, QWidget* widget ) Q_DECL_OVERRIDE; + void paint( QPainter* p, const QStyleOptionGraphicsItem *option, QWidget* widget ) override; /** * Sets the popup angles sharpness */ @@ -181,10 +181,10 @@ void onTextItemClicked(); private: void setupTimeline(); - void mousePressEvent( QGraphicsSceneMouseEvent* ) Q_DECL_OVERRIDE; - void mouseReleaseEvent( QGraphicsSceneMouseEvent* ) Q_DECL_OVERRIDE; - void hoverEnterEvent( QGraphicsSceneHoverEvent* ) Q_DECL_OVERRIDE; - void hoverLeaveEvent( QGraphicsSceneHoverEvent* ) Q_DECL_OVERRIDE; + void mousePressEvent( QGraphicsSceneMouseEvent* ) override; + void mouseReleaseEvent( QGraphicsSceneMouseEvent* ) override; + void hoverEnterEvent( QGraphicsSceneHoverEvent* ) override; + void hoverLeaveEvent( QGraphicsSceneHoverEvent* ) override; KGamePopupItemPrivate * const d; }; diff --git a/kgamepopupitem.cpp b/kgamepopupitem.cpp --- a/kgamepopupitem.cpp +++ b/kgamepopupitem.cpp @@ -44,13 +44,13 @@ :QGraphicsTextItem(parent), m_opacity(1.0) {} void setOpacity(qreal opa) { m_opacity = opa; } void setTextColor(const KStatefulBrush &brush) { m_brush = brush; } - void paint( QPainter* p, const QStyleOptionGraphicsItem *option, QWidget* widget ) Q_DECL_OVERRIDE; + void paint( QPainter* p, const QStyleOptionGraphicsItem *option, QWidget* widget ) override; Q_SIGNALS: void mouseClicked(); private: - void mouseReleaseEvent(QGraphicsSceneMouseEvent*) Q_DECL_OVERRIDE; + void mouseReleaseEvent(QGraphicsSceneMouseEvent*) override; private: qreal m_opacity; diff --git a/kgamerendereditem.h b/kgamerendereditem.h --- a/kgamerendereditem.h +++ b/kgamerendereditem.h @@ -44,7 +44,7 @@ KGameRenderedItem(KGameRenderer* renderer, const QString& spriteKey, QGraphicsItem* parent = nullptr); virtual ~KGameRenderedItem(); protected: - void receivePixmap(const QPixmap& pixmap) Q_DECL_OVERRIDE; + void receivePixmap(const QPixmap& pixmap) override; private: friend class KGameRenderedItemPrivate; KGameRenderedItemPrivate* const d; diff --git a/kgamerenderedobjectitem.h b/kgamerenderedobjectitem.h --- a/kgamerenderedobjectitem.h +++ b/kgamerenderedobjectitem.h @@ -96,14 +96,14 @@ void setPrimaryView(QGraphicsView* view); //QGraphicsItem reimplementations (see comment in source file for why we need all of this) - QRectF boundingRect() const Q_DECL_OVERRIDE; - bool contains(const QPointF& point) const Q_DECL_OVERRIDE; - bool isObscuredBy(const QGraphicsItem* item) const Q_DECL_OVERRIDE; - QPainterPath opaqueArea() const Q_DECL_OVERRIDE; - void paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget = 0) Q_DECL_OVERRIDE; - QPainterPath shape() const Q_DECL_OVERRIDE; + QRectF boundingRect() const override; + bool contains(const QPointF& point) const override; + bool isObscuredBy(const QGraphicsItem* item) const override; + QPainterPath opaqueArea() const override; + void paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget = 0) override; + QPainterPath shape() const override; protected: - void receivePixmap(const QPixmap& pixmap) Q_DECL_OVERRIDE; + void receivePixmap(const QPixmap& pixmap) override; private: friend class KGameRenderedObjectItemPrivate; KGameRenderedObjectItemPrivate* const d; diff --git a/kgamerenderedobjectitem.cpp b/kgamerenderedobjectitem.cpp --- a/kgamerenderedobjectitem.cpp +++ b/kgamerenderedobjectitem.cpp @@ -30,11 +30,11 @@ void adjustTransform(); //QGraphicsItem reimplementations (see comment below for why we need all of this) - bool contains(const QPointF& point) const Q_DECL_OVERRIDE; - bool isObscuredBy(const QGraphicsItem* item) const Q_DECL_OVERRIDE; - QPainterPath opaqueArea() const Q_DECL_OVERRIDE; - void paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget = 0) Q_DECL_OVERRIDE; - QPainterPath shape() const Q_DECL_OVERRIDE; + bool contains(const QPointF& point) const override; + bool isObscuredBy(const QGraphicsItem* item) const override; + QPainterPath opaqueArea() const override; + void paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget = 0) override; + QPainterPath shape() const override; public: KGameRenderedObjectItem* m_parent; QGraphicsView* m_primaryView; diff --git a/kgamerenderer_p.h b/kgamerenderer_p.h --- a/kgamerenderer_p.h +++ b/kgamerenderer_p.h @@ -94,7 +94,7 @@ public: Worker(Job* job, bool isSynchronous, KGameRendererPrivate* parent); - void run() Q_DECL_OVERRIDE; + void run() override; private: Job* m_job; bool m_synchronous; diff --git a/kgimageprovider_p.h b/kgimageprovider_p.h --- a/kgimageprovider_p.h +++ b/kgimageprovider_p.h @@ -48,7 +48,7 @@ KgImageProvider(KgThemeProvider* provider); ///Reimplemented method that is called when a sprite pixmap is requested - QImage requestImage(const QString& source, QSize *size, const QSize &requestedSize) Q_DECL_OVERRIDE; + QImage requestImage(const QString& source, QSize *size, const QSize &requestedSize) override; private: void reloadRenderer(); diff --git a/kgthemeselector.cpp b/kgthemeselector.cpp --- a/kgthemeselector.cpp +++ b/kgthemeselector.cpp @@ -213,7 +213,7 @@ show(); } protected: - void closeEvent(QCloseEvent* event) Q_DECL_OVERRIDE + void closeEvent(QCloseEvent* event) override { event->accept(); //delete myself, but *not* the KgThemeSelector diff --git a/kgthemeselector_p.h b/kgthemeselector_p.h --- a/kgthemeselector_p.h +++ b/kgthemeselector_p.h @@ -35,9 +35,9 @@ }; KgThemeDelegate(QObject* parent = nullptr); - void paint(QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& index) const Q_DECL_OVERRIDE; + void paint(QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& index) const override; ///@note The implementation is independent of @a option and @a index. - QSize sizeHint(const QStyleOptionViewItem& option, const QModelIndex& index) const Q_DECL_OVERRIDE; + QSize sizeHint(const QStyleOptionViewItem& option, const QModelIndex& index) const override; QRect thumbnailRect(const QRect& baseRect) const; }; diff --git a/libkdegamesprivate/kchatbaseitemdelegate.h b/libkdegamesprivate/kchatbaseitemdelegate.h --- a/libkdegamesprivate/kchatbaseitemdelegate.h +++ b/libkdegamesprivate/kchatbaseitemdelegate.h @@ -56,7 +56,7 @@ * Should be reimplemented in inherited delegates */ void paint(QPainter *painter, const QStyleOptionViewItem &option, - const QModelIndex &index) const Q_DECL_OVERRIDE; + const QModelIndex &index) const override; void paint(QPainter *painter, const QStyleOptionViewItem &option, @@ -70,7 +70,7 @@ * Should be reimplemented in inherited delegates */ QSize sizeHint(const QStyleOptionViewItem &option, - const QModelIndex &index ) const Q_DECL_OVERRIDE; + const QModelIndex &index ) const override; virtual QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index, const QString& sender, diff --git a/libkdegamesprivate/kchatbasemodel.h b/libkdegamesprivate/kchatbasemodel.h --- a/libkdegamesprivate/kchatbasemodel.h +++ b/libkdegamesprivate/kchatbasemodel.h @@ -85,20 +85,20 @@ explicit KChatBaseModel(QObject *parent = nullptr); /** Default destructor */ - ~KChatBaseModel() Q_DECL_OVERRIDE; + ~KChatBaseModel() override; /** * Reimplementation of the inherited method. * @return The current number of messages in the list */ - int rowCount(const QModelIndex &parent = QModelIndex()) const Q_DECL_OVERRIDE; + int rowCount(const QModelIndex &parent = QModelIndex()) const override; /** * Reimplementation of the inherited method. * @return The KChatBaseMessage at the given index as a QVariant */ - QVariant data(const QModelIndex &index, int role) const Q_DECL_OVERRIDE; + QVariant data(const QModelIndex &index, int role) const override; /** * Set the font that is used for the name part of a message. See also diff --git a/libkdegamesprivate/kgame/kgame.h b/libkdegamesprivate/kgame/kgame.h --- a/libkdegamesprivate/kgame/kgame.h +++ b/libkdegamesprivate/kgame/kgame.h @@ -107,12 +107,12 @@ /** * Destructs the game */ - ~KGame() Q_DECL_OVERRIDE; + ~KGame() override; /** * Gives debug output of the game status */ - void Debug() Q_DECL_OVERRIDE; + void Debug() override; /** * Game status - Use this to Control the game flow. @@ -460,7 +460,7 @@ * @param sender * @param clientID the client from which we received the transmission - hardly used **/ - void networkTransmission(QDataStream &stream, int msgid, quint32 receiver, quint32 sender, quint32 clientID) Q_DECL_OVERRIDE; + void networkTransmission(QDataStream &stream, int msgid, quint32 receiver, quint32 sender, quint32 clientID) override; /** * Returns a pointer to the KGame property handler diff --git a/libkdegamesprivate/kgame/kgamechat.h b/libkdegamesprivate/kgame/kgamechat.h --- a/libkdegamesprivate/kgame/kgamechat.h +++ b/libkdegamesprivate/kgame/kgamechat.h @@ -114,11 +114,11 @@ * reimplemented from @ref KChatBase * @return @ref KPlayer::name() for the player set by @ref setFromPlayer **/ - QString fromName() const Q_DECL_OVERRIDE; + QString fromName() const override; public Q_SLOTS: - void addMessage(const QString& fromName, const QString& text) Q_DECL_OVERRIDE { KChatBase::addMessage(fromName, text);} + void addMessage(const QString& fromName, const QString& text) override { KChatBase::addMessage(fromName, text);} virtual void addMessage(int fromId, const QString& text); void slotReceiveMessage(int, const QByteArray&, quint32 receiver, quint32 sender); @@ -209,7 +209,7 @@ void slotReceivePrivateMessage(int msgid, const QByteArray& buffer, quint32 sender, KPlayer* me); protected: - void returnPressed(const QString& text) Q_DECL_OVERRIDE; + void returnPressed(const QString& text) override; private: void init(KGame* g, int msgid); diff --git a/libkdegamesprivate/kgame/kgameio.h b/libkdegamesprivate/kgame/kgameio.h --- a/libkdegamesprivate/kgame/kgameio.h +++ b/libkdegamesprivate/kgame/kgameio.h @@ -222,7 +222,7 @@ * * @return KeyIO */ - int rtti() const Q_DECL_OVERRIDE; + int rtti() const override; Q_SIGNALS: /** @@ -252,7 +252,7 @@ /** * Internal method to process the events */ - bool eventFilter( QObject *o, QEvent *e ) Q_DECL_OVERRIDE; + bool eventFilter( QObject *o, QEvent *e ) override; private: friend class KGameKeyIOPrivate; @@ -303,7 +303,7 @@ * * @return MouseIO */ - int rtti() const Q_DECL_OVERRIDE; + int rtti() const override; Q_SIGNALS: /** @@ -331,7 +331,7 @@ /** * Internal event filter */ - bool eventFilter( QObject *o, QEvent *e ) Q_DECL_OVERRIDE; + bool eventFilter( QObject *o, QEvent *e ) override; private: friend class KGameMouseIOPrivate; @@ -382,7 +382,7 @@ * * @return ProcessIO */ - int rtti() const Q_DECL_OVERRIDE; + int rtti() const override; /** * Send a message to the process. This is analogous to the sendMessage @@ -416,7 +416,7 @@ * This function is called automatically when adding the IO to * a player. */ - void initIO(KPlayer *p) Q_DECL_OVERRIDE; + void initIO(KPlayer *p) override; /** * Notifies the IO device that the player's setTurn had been called @@ -427,7 +427,7 @@ * * @param turn is true/false */ - void notifyTurn(bool turn) Q_DECL_OVERRIDE; + void notifyTurn(bool turn) override; protected: /** @@ -523,7 +523,7 @@ KGameComputerIO(KPlayer* player); ~KGameComputerIO(); - int rtti() const Q_DECL_OVERRIDE; + int rtti() const override; /** * The number of advance calls until the player (or rather: the IO) diff --git a/libkdegamesprivate/kgame/kgameproperty.h b/libkdegamesprivate/kgame/kgameproperty.h --- a/libkdegamesprivate/kgame/kgameproperty.h +++ b/libkdegamesprivate/kgame/kgameproperty.h @@ -755,7 +755,7 @@ * Saves the object to a stream. * @param stream The stream to save to **/ - void save(QDataStream &stream) Q_DECL_OVERRIDE + void save(QDataStream &stream) override { stream << mData; } @@ -781,7 +781,7 @@ * Also calls emitSignal if isEmittingSignal is TRUE. * @param s The stream to read from **/ - void load(QDataStream& s) Q_DECL_OVERRIDE + void load(QDataStream& s) override { s >> mData; setDirty(false); @@ -834,7 +834,7 @@ **/ operator type() const { return value(); } - const type_info* typeinfo() Q_DECL_OVERRIDE { return &typeid(type); } + const type_info* typeinfo() override { return &typeid(type); } private: void init() { } diff --git a/libkdegamesprivate/kgame/kmessageio.h b/libkdegamesprivate/kgame/kmessageio.h --- a/libkdegamesprivate/kgame/kmessageio.h +++ b/libkdegamesprivate/kgame/kmessageio.h @@ -233,35 +233,35 @@ /** * The runtime identification */ - int rtti() const Q_DECL_OVERRIDE {return 1;} + int rtti() const override {return 1;} /** @return The port that this object is connected to. See QSocket::peerPort */ - quint16 peerPort () const Q_DECL_OVERRIDE; + quint16 peerPort () const override; /** @return The hostname this object is connected to. See QSocket::peerName. */ - QString peerName () const Q_DECL_OVERRIDE; + QString peerName () const override; /** @return TRUE as this is a network IO. */ - bool isNetwork() const Q_DECL_OVERRIDE { return true; } + bool isNetwork() const override { return true; } /** Returns true if the socket is in state /e connected. */ - bool isConnected () const Q_DECL_OVERRIDE; + bool isConnected () const override; /** Overwritten slot method from KMessageIO. Note: It is not declared as a slot method, since the slot is already defined in KMessageIO as a virtual method. */ - void send (const QByteArray &msg) Q_DECL_OVERRIDE; + void send (const QByteArray &msg) override; protected Q_SLOTS: virtual void processNewData (); @@ -318,13 +318,13 @@ /** * The runtime identification */ - int rtti() const Q_DECL_OVERRIDE {return 2;} + int rtti() const override {return 2;} /** @return FALSE as this is no network IO. */ - bool isNetwork() const Q_DECL_OVERRIDE { return false; } + bool isNetwork() const override { return false; } /** Returns true, if the object is connected to another instance. @@ -334,15 +334,15 @@ The connection can only be closed by deleting one of the objects. */ - bool isConnected () const Q_DECL_OVERRIDE; + bool isConnected () const override; /** Overwritten slot method from KMessageIO. Note: It is not declared as a slot method, since the slot is already defined in KMessageIO as a virtual method. */ - void send (const QByteArray &msg) Q_DECL_OVERRIDE; + void send (const QByteArray &msg) override; protected: KMessageDirect *mPartner; @@ -358,18 +358,18 @@ public: KMessageProcess(QObject *parent, const QString& file); ~KMessageProcess(); - bool isConnected() const Q_DECL_OVERRIDE; - void send (const QByteArray &msg) Q_DECL_OVERRIDE; + bool isConnected() const override; + void send (const QByteArray &msg) override; /** @return FALSE as this is no network IO. */ - bool isNetwork() const Q_DECL_OVERRIDE { return false; } + bool isNetwork() const override { return false; } /** * The runtime identification */ - int rtti() const Q_DECL_OVERRIDE {return 3;} + int rtti() const override {return 3;} diff --git a/libkdegamesprivate/kgamecanvas.h b/libkdegamesprivate/kgamecanvas.h --- a/libkdegamesprivate/kgamecanvas.h +++ b/libkdegamesprivate/kgamecanvas.h @@ -250,10 +250,10 @@ virtual ~KGameCanvasDummy(); /** This function does nothing (of course) */ - void paint(QPainter* p) Q_DECL_OVERRIDE; + void paint(QPainter* p) override; /** This returns an empty rectangle */ - QRect rect() const Q_DECL_OVERRIDE; + QRect rect() const override; }; @@ -273,34 +273,34 @@ mutable QRect m_last_child_rect; void paintInternal(QPainter* p, const QRect& prect, const QRegion& preg, - const QPoint& delta, double cumulative_opacity) Q_DECL_OVERRIDE; + const QPoint& delta, double cumulative_opacity) override; - void ensureAnimating() Q_DECL_OVERRIDE; - void ensurePendingUpdate() Q_DECL_OVERRIDE; - void invalidate(const QRect& r, bool translate = true) Q_DECL_OVERRIDE; - void invalidate(const QRegion& r, bool translate = true) Q_DECL_OVERRIDE; - void updateChanges() Q_DECL_OVERRIDE; - void changed() Q_DECL_OVERRIDE; + void ensureAnimating() override; + void ensurePendingUpdate() override; + void invalidate(const QRect& r, bool translate = true) override; + void invalidate(const QRegion& r, bool translate = true) override; + void updateChanges() override; + void changed() override; public: /** Constructor */ KGameCanvasGroup(KGameCanvasAbstract* canvas = NULL); virtual ~KGameCanvasGroup(); /** This paints all the children */ - void paint(QPainter* p) Q_DECL_OVERRIDE; + void paint(QPainter* p) override; /** This returns the bouding rect of all children */ - QRect rect() const Q_DECL_OVERRIDE; + QRect rect() const override; /** Animations step, updates the animation for the children */ - void advance(int msecs) Q_DECL_OVERRIDE; + void advance(int msecs) override; /** returns the toplevel canvas (or null if it is in an orphan tree) */ - KGameCanvasWidget* topLevelCanvas() Q_DECL_OVERRIDE; + KGameCanvasWidget* topLevelCanvas() override; - QPoint canvasPosition() const Q_DECL_OVERRIDE; + QPoint canvasPosition() const override; }; /** @@ -331,8 +331,8 @@ /** Sets the picture of the sprite */ void setPicture(const QPicture& picture); - void paint(QPainter* p) Q_DECL_OVERRIDE; - QRect rect() const Q_DECL_OVERRIDE; + void paint(QPainter* p) override; + QRect rect() const override; }; /** @@ -363,9 +363,9 @@ /** Sets the pixmap of the sprite */ void setPixmap(const QPixmap& pixmap); - void paint(QPainter* p) Q_DECL_OVERRIDE; - QRect rect() const Q_DECL_OVERRIDE; - bool layered() const Q_DECL_OVERRIDE { return false; } + void paint(QPainter* p) override; + QRect rect() const override; + bool layered() const override { return false; } }; /** @@ -383,7 +383,7 @@ public: KGameCanvasRenderedPixmap(KGameRenderer* renderer, const QString& spriteKey, KGameCanvasAbstract* canvas = 0); protected: - void receivePixmap(const QPixmap& pixmap) Q_DECL_OVERRIDE; + void receivePixmap(const QPixmap& pixmap) override; }; /** @@ -433,9 +433,9 @@ /** Sets if the origin of the brush will be moved with the pixmap */ void setMoveOrigin(bool move_orig); - void paint(QPainter* p) Q_DECL_OVERRIDE; - QRect rect() const Q_DECL_OVERRIDE; - bool layered() const Q_DECL_OVERRIDE { return false; } + void paint(QPainter* p) override; + QRect rect() const override; + bool layered() const override { return false; } }; @@ -471,9 +471,9 @@ /** Sets the size */ void setSize(const QSize &size); - void paint(QPainter* p) Q_DECL_OVERRIDE; - QRect rect() const Q_DECL_OVERRIDE; - bool layered() const Q_DECL_OVERRIDE { return false; } + void paint(QPainter* p) override; + QRect rect() const override; + bool layered() const override { return false; } }; /** @@ -556,9 +556,9 @@ /** Sets the positioning style */ void setPositioning(HPos hp, VPos vp); - void paint(QPainter* p) Q_DECL_OVERRIDE; - QRect rect() const Q_DECL_OVERRIDE; - bool layered() const Q_DECL_OVERRIDE { return false; } + void paint(QPainter* p) override; + QRect rect() const override; + bool layered() const override { return false; } }; /** @@ -579,12 +579,12 @@ class KGameCanvasWidgetPrivate *priv; - void ensureAnimating() Q_DECL_OVERRIDE; - void ensurePendingUpdate() Q_DECL_OVERRIDE; - void invalidate(const QRect& r, bool translate = true) Q_DECL_OVERRIDE; - void invalidate(const QRegion& r, bool translate = true) Q_DECL_OVERRIDE; + void ensureAnimating() override; + void ensurePendingUpdate() override; + void invalidate(const QRect& r, bool translate = true) override; + void invalidate(const QRegion& r, bool translate = true) override; - void paintEvent(QPaintEvent *event) Q_DECL_OVERRIDE; + void paintEvent(QPaintEvent *event) override; private Q_SLOTS: void processAnimations(); @@ -604,10 +604,10 @@ int mSecs(); /** returns 'this' */ - KGameCanvasWidget* topLevelCanvas() Q_DECL_OVERRIDE; + KGameCanvasWidget* topLevelCanvas() override; /** @return 0 */ - QPoint canvasPosition() const Q_DECL_OVERRIDE; + QPoint canvasPosition() const override; }; /** @@ -639,10 +639,10 @@ bool m_child_rect_valid; QRect m_invalidated_rect; - void ensureAnimating() Q_DECL_OVERRIDE { } - void ensurePendingUpdate() Q_DECL_OVERRIDE; - void invalidate(const QRect& r, bool translate = true) Q_DECL_OVERRIDE; - void invalidate(const QRegion& r, bool translate = true) Q_DECL_OVERRIDE; + void ensureAnimating() override { } + void ensurePendingUpdate() override; + void invalidate(const QRect& r, bool translate = true) override; + void invalidate(const QRegion& r, bool translate = true) override; QRect childRect(); public: @@ -653,7 +653,7 @@ * An adapter is not associated to any canvas, so this function * simply returns 0. */ - class KGameCanvasWidget* topLevelCanvas() Q_DECL_OVERRIDE { return 0; } + class KGameCanvasWidget* topLevelCanvas() override { return 0; } /** * The absolute position of the rendered content is not well @@ -664,7 +664,7 @@ * * @return The point (0, 0). */ - QPoint canvasPosition() const Q_DECL_OVERRIDE { return QPoint(0, 0); } + QPoint canvasPosition() const override { return QPoint(0, 0); } /** * Draw the items of the adapter using the specified painter.