diff --git a/clock.h b/clock.h --- a/clock.h +++ b/clock.h @@ -45,15 +45,15 @@ public: explicit Clock( const DealerInfo * di ); - void initialize() Q_DECL_OVERRIDE; + void initialize() override; protected: - bool checkAdd(const PatPile * pile, const QList & oldCards, const QList & newCards) const Q_DECL_OVERRIDE; - bool checkRemove(const PatPile* pile, const QList & cards) const Q_DECL_OVERRIDE; - void restart( const QList & cards ) Q_DECL_OVERRIDE; + bool checkAdd(const PatPile * pile, const QList & oldCards, const QList & newCards) const override; + bool checkRemove(const PatPile* pile, const QList & cards) const override; + void restart( const QList & cards ) override; protected slots: - bool drop() Q_DECL_OVERRIDE; + bool drop() override; private: PatPile* store[8]; diff --git a/clock.cpp b/clock.cpp --- a/clock.cpp +++ b/clock.cpp @@ -155,7 +155,7 @@ : DealerInfo(I18N_NOOP("Grandfather's Clock"), GrandfathersClockId) {} - DealerScene *createGame() const Q_DECL_OVERRIDE + DealerScene *createGame() const override { return new Clock( this ); } diff --git a/dealer.h b/dealer.h --- a/dealer.h +++ b/dealer.h @@ -71,7 +71,7 @@ virtual void initialize() = 0; - void relayoutScene() Q_DECL_OVERRIDE; + void relayoutScene() override; void updateWonItem(); void addPatPile( PatPile * pile ); @@ -151,18 +151,18 @@ virtual bool tryAutomaticMove( KCard * card ); protected: - bool allowedToAdd(const KCardPile * pile, const QList & cards) const Q_DECL_OVERRIDE; - bool allowedToRemove(const KCardPile * pile, const KCard * card) const Q_DECL_OVERRIDE; + bool allowedToAdd(const KCardPile * pile, const QList & cards) const override; + bool allowedToRemove(const KCardPile * pile, const KCard * card) const override; virtual bool checkAdd( const PatPile * pile, const QList & oldCards, const QList & newCards ) const; virtual bool checkRemove( const PatPile * pile, const QList & cards ) const; virtual bool checkPrefering( const PatPile * pile, const QList & oldCards, const QList & newCards ) const; - void cardsMoved( const QList & cards, KCardPile * oldPile, KCardPile * newPile ) Q_DECL_OVERRIDE; + void cardsMoved( const QList & cards, KCardPile * oldPile, KCardPile * newPile ) override; - void mouseDoubleClickEvent( QGraphicsSceneMouseEvent * mouseEvent ) Q_DECL_OVERRIDE; - void mousePressEvent( QGraphicsSceneMouseEvent * mouseEvent ) Q_DECL_OVERRIDE; - void mouseReleaseEvent( QGraphicsSceneMouseEvent * mouseEvent ) Q_DECL_OVERRIDE; + void mouseDoubleClickEvent( QGraphicsSceneMouseEvent * mouseEvent ) override; + void mousePressEvent( QGraphicsSceneMouseEvent * mouseEvent ) override; + void mouseReleaseEvent( QGraphicsSceneMouseEvent * mouseEvent ) override; virtual void restart( const QList & cards ) = 0; diff --git a/dealer.cpp b/dealer.cpp --- a/dealer.cpp +++ b/dealer.cpp @@ -153,7 +153,7 @@ { } - void run() Q_DECL_OVERRIDE + void run() override { SolverInterface::ExitStatus result = m_solver->patsolve(); emit finished( result ); diff --git a/fortyeight.h b/fortyeight.h --- a/fortyeight.h +++ b/fortyeight.h @@ -45,18 +45,18 @@ public: explicit Fortyeight( const DealerInfo * di ); - void initialize() Q_DECL_OVERRIDE; + void initialize() override; protected: - void setGameState( const QString & state ) Q_DECL_OVERRIDE; - QString getGameState() const Q_DECL_OVERRIDE; - bool checkAdd(const PatPile * pile, const QList & oldCards, const QList & newCards) const Q_DECL_OVERRIDE; - bool checkRemove(const PatPile* pile, const QList & cards) const Q_DECL_OVERRIDE; - void cardsDroppedOnPile( const QList & cards, KCardPile * pile ) Q_DECL_OVERRIDE; - void restart( const QList & cards ) Q_DECL_OVERRIDE; + void setGameState( const QString & state ) override; + QString getGameState() const override; + bool checkAdd(const PatPile * pile, const QList & oldCards, const QList & newCards) const override; + bool checkRemove(const PatPile* pile, const QList & cards) const override; + void cardsDroppedOnPile( const QList & cards, KCardPile * pile ) override; + void restart( const QList & cards ) override; protected slots: - bool newCards() Q_DECL_OVERRIDE; + bool newCards() override; private: bool canPutStore( const KCardPile * pile, const QList &cards ) const; diff --git a/fortyeight.cpp b/fortyeight.cpp --- a/fortyeight.cpp +++ b/fortyeight.cpp @@ -252,7 +252,7 @@ : DealerInfo(I18N_NOOP("Forty & Eight"), FortyAndEightId) {} - DealerScene *createGame() const Q_DECL_OVERRIDE + DealerScene *createGame() const override { return new Fortyeight( this ); } diff --git a/freecell.h b/freecell.h --- a/freecell.h +++ b/freecell.h @@ -47,17 +47,17 @@ public: explicit Freecell( const DealerInfo * di ); - void initialize() Q_DECL_OVERRIDE; + void initialize() override; protected: - bool checkAdd(const PatPile * pile, const QList & oldCards, const QList & newCards) const Q_DECL_OVERRIDE; - bool checkRemove(const PatPile * pile, const QList & cards) const Q_DECL_OVERRIDE; - void cardsDroppedOnPile( const QList & cards, KCardPile * pile ) Q_DECL_OVERRIDE; - void restart( const QList & cards ) Q_DECL_OVERRIDE; - QList getHints() Q_DECL_OVERRIDE; + bool checkAdd(const PatPile * pile, const QList & oldCards, const QList & newCards) const override; + bool checkRemove(const PatPile * pile, const QList & cards) const override; + void cardsDroppedOnPile( const QList & cards, KCardPile * pile ) override; + void restart( const QList & cards ) override; + QList getHints() override; protected slots: - bool tryAutomaticMove( KCard * c ) Q_DECL_OVERRIDE; + bool tryAutomaticMove( KCard * c ) override; private: bool canPutStore( const KCardPile * pile, const QList & cards ) const; diff --git a/freecell.cpp b/freecell.cpp --- a/freecell.cpp +++ b/freecell.cpp @@ -297,7 +297,7 @@ : DealerInfo(I18N_NOOP("Freecell"), FreecellId) {} - DealerScene *createGame() const Q_DECL_OVERRIDE + DealerScene *createGame() const override { return new Freecell( this ); } diff --git a/gameselectionscene.h b/gameselectionscene.h --- a/gameselectionscene.h +++ b/gameselectionscene.h @@ -38,7 +38,7 @@ void gameSelected( int i ); protected: - void keyReleaseEvent( QKeyEvent * event ) Q_DECL_OVERRIDE; + void keyReleaseEvent( QKeyEvent * event ) override; private slots: void boxHoverChanged( GameSelectionBox * box, bool hovered ); diff --git a/gameselectionscene.cpp b/gameselectionscene.cpp --- a/gameselectionscene.cpp +++ b/gameselectionscene.cpp @@ -74,7 +74,7 @@ } } - QRectF boundingRect() const Q_DECL_OVERRIDE + QRectF boundingRect() const override { return QRectF( QPointF(), m_size ); } @@ -115,19 +115,19 @@ void hoverChanged( GameSelectionBox * box, bool hovered ); protected: - void mousePressEvent( QGraphicsSceneMouseEvent * event ) Q_DECL_OVERRIDE + void mousePressEvent( QGraphicsSceneMouseEvent * event ) override { Q_UNUSED( event ) emit selected( m_gameId ); } - void hoverEnterEvent( QGraphicsSceneHoverEvent * event ) Q_DECL_OVERRIDE + void hoverEnterEvent( QGraphicsSceneHoverEvent * event ) override { Q_UNUSED( event ) emit hoverChanged( this, true ); } - void hoverLeaveEvent( QGraphicsSceneHoverEvent * event ) Q_DECL_OVERRIDE + void hoverLeaveEvent( QGraphicsSceneHoverEvent * event ) override { Q_UNUSED( event ) emit hoverChanged( this, false ); @@ -144,7 +144,7 @@ update(); } - void paint( QPainter * painter, const QStyleOptionGraphicsItem * option, QWidget * widget = nullptr ) Q_DECL_OVERRIDE + void paint( QPainter * painter, const QStyleOptionGraphicsItem * option, QWidget * widget = nullptr ) override { Q_UNUSED( option ) Q_UNUSED( widget ) diff --git a/golf.h b/golf.h --- a/golf.h +++ b/golf.h @@ -45,18 +45,18 @@ public: explicit Golf( const DealerInfo * di ); - void initialize() Q_DECL_OVERRIDE; + void initialize() override; QString solverFormat() const; protected: - void setGameState( const QString & state ) Q_DECL_OVERRIDE; - bool checkAdd(const PatPile * pile, const QList & oldCards, const QList & newCards) const Q_DECL_OVERRIDE; - bool checkRemove(const PatPile * pile, const QList & cards) const Q_DECL_OVERRIDE; - void restart( const QList & cards ) Q_DECL_OVERRIDE; - bool drop() Q_DECL_OVERRIDE; + void setGameState( const QString & state ) override; + bool checkAdd(const PatPile * pile, const QList & oldCards, const QList & newCards) const override; + bool checkRemove(const PatPile * pile, const QList & cards) const override; + void restart( const QList & cards ) override; + bool drop() override; protected slots: - bool newCards() Q_DECL_OVERRIDE; + bool newCards() override; private: PatPile* talon; diff --git a/golf.cpp b/golf.cpp --- a/golf.cpp +++ b/golf.cpp @@ -195,7 +195,7 @@ : DealerInfo(I18N_NOOP("Golf"), GolfId) {} - DealerScene *createGame() const Q_DECL_OVERRIDE + DealerScene *createGame() const override { return new Golf( this ); } diff --git a/grandf.h b/grandf.h --- a/grandf.h +++ b/grandf.h @@ -47,17 +47,17 @@ public: explicit Grandf( const DealerInfo * di ); - void initialize() Q_DECL_OVERRIDE; + void initialize() override; protected: - void setGameState( const QString & state ) Q_DECL_OVERRIDE; - QString getGameState() const Q_DECL_OVERRIDE; - bool checkAdd(const PatPile * pile, const QList & oldCards, const QList & newCards) const Q_DECL_OVERRIDE; - bool checkRemove(const PatPile * pile, const QList & cards) const Q_DECL_OVERRIDE; - void restart( const QList & cards ) Q_DECL_OVERRIDE; + void setGameState( const QString & state ) override; + QString getGameState() const override; + bool checkAdd(const PatPile * pile, const QList & oldCards, const QList & newCards) const override; + bool checkRemove(const PatPile * pile, const QList & cards) const override; + void restart( const QList & cards ) override; protected slots: - bool newCards() Q_DECL_OVERRIDE; + bool newCards() override; private: void deal( const QList & cardsToDeal ); diff --git a/grandf.cpp b/grandf.cpp --- a/grandf.cpp +++ b/grandf.cpp @@ -200,7 +200,7 @@ : DealerInfo(I18N_NOOP("Grandfather"), GrandfatherId) {} - DealerScene *createGame() const Q_DECL_OVERRIDE + DealerScene *createGame() const override { return new Grandf( this ); } diff --git a/gypsy.h b/gypsy.h --- a/gypsy.h +++ b/gypsy.h @@ -45,16 +45,16 @@ public: explicit Gypsy( const DealerInfo * di ); - void initialize() Q_DECL_OVERRIDE; + void initialize() override; protected: - void setGameState( const QString & state ) Q_DECL_OVERRIDE; - bool checkAdd(const PatPile * pile, const QList & oldCards, const QList & newCards) const Q_DECL_OVERRIDE; - bool checkRemove(const PatPile * pile, const QList & cards) const Q_DECL_OVERRIDE; - void restart( const QList & cards ) Q_DECL_OVERRIDE; + void setGameState( const QString & state ) override; + bool checkAdd(const PatPile * pile, const QList & oldCards, const QList & newCards) const override; + bool checkRemove(const PatPile * pile, const QList & cards) const override; + void restart( const QList & cards ) override; protected slots: - bool newCards() Q_DECL_OVERRIDE; + bool newCards() override; private: PatPile* talon; diff --git a/gypsy.cpp b/gypsy.cpp --- a/gypsy.cpp +++ b/gypsy.cpp @@ -177,7 +177,7 @@ : DealerInfo(I18N_NOOP("Gypsy"), GypsyId) {} - DealerScene *createGame() const Q_DECL_OVERRIDE + DealerScene *createGame() const override { return new Gypsy( this ); } diff --git a/idiot.h b/idiot.h --- a/idiot.h +++ b/idiot.h @@ -46,19 +46,19 @@ public: explicit Idiot( const DealerInfo * di ); - void initialize() Q_DECL_OVERRIDE; - bool isGameWon() const Q_DECL_OVERRIDE; + void initialize() override; + bool isGameWon() const override; protected: - void setGameState( const QString & state ) Q_DECL_OVERRIDE; - bool checkAdd(const PatPile * pile, const QList & oldCards, const QList & newCards) const Q_DECL_OVERRIDE; - bool checkRemove(const PatPile * pile, const QList & cards) const Q_DECL_OVERRIDE; - void restart( const QList & cards ) Q_DECL_OVERRIDE; - bool drop() Q_DECL_OVERRIDE; + void setGameState( const QString & state ) override; + bool checkAdd(const PatPile * pile, const QList & oldCards, const QList & newCards) const override; + bool checkRemove(const PatPile * pile, const QList & cards) const override; + void restart( const QList & cards ) override; + bool drop() override; protected slots: - bool newCards() Q_DECL_OVERRIDE; - bool tryAutomaticMove( KCard * card ) Q_DECL_OVERRIDE; + bool newCards() override; + bool tryAutomaticMove( KCard * card ) override; private: void dealRow(); diff --git a/idiot.cpp b/idiot.cpp --- a/idiot.cpp +++ b/idiot.cpp @@ -259,7 +259,7 @@ : DealerInfo(I18N_NOOP("Aces Up"), AcesUpId) {} - DealerScene *createGame() const Q_DECL_OVERRIDE + DealerScene *createGame() const override { return new Idiot( this ); } diff --git a/klondike.h b/klondike.h --- a/klondike.h +++ b/klondike.h @@ -49,23 +49,23 @@ public: explicit Klondike( const DealerInfo * di ); - void initialize() Q_DECL_OVERRIDE; - void mapOldId(int id) Q_DECL_OVERRIDE; - int oldId() const Q_DECL_OVERRIDE; - QList configActions() const Q_DECL_OVERRIDE; + void initialize() override; + void mapOldId(int id) override; + int oldId() const override; + QList configActions() const override; protected: - void setGameState( const QString & state ) Q_DECL_OVERRIDE; - QString getGameOptions() const Q_DECL_OVERRIDE; - void setGameOptions( const QString & options ) Q_DECL_OVERRIDE; - bool checkAdd(const PatPile * pile, const QList & oldCards, const QList & newCards) const Q_DECL_OVERRIDE; - bool checkRemove(const PatPile * pile, const QList & cards) const Q_DECL_OVERRIDE; - void cardsMoved( const QList & cards, KCardPile * oldPile, KCardPile * newPile ) Q_DECL_OVERRIDE; - void restart( const QList & cards ) Q_DECL_OVERRIDE; + void setGameState( const QString & state ) override; + QString getGameOptions() const override; + void setGameOptions( const QString & options ) override; + bool checkAdd(const PatPile * pile, const QList & oldCards, const QList & newCards) const override; + bool checkRemove(const PatPile * pile, const QList & cards) const override; + void cardsMoved( const QList & cards, KCardPile * oldPile, KCardPile * newPile ) override; + void restart( const QList & cards ) override; protected slots: - bool drop() Q_DECL_OVERRIDE; - bool newCards() Q_DECL_OVERRIDE; + bool drop() override; + bool newCards() override; private slots: void gameTypeChanged(); @@ -92,7 +92,7 @@ KlondikePile( DealerScene * scene, int index, const QString & objectName = QString() ); void setCardsToShow( int numCards ); int cardsToShow() const; - QList cardPositions() const Q_DECL_OVERRIDE; + QList cardPositions() const override; private: int m_cardsToShow; diff --git a/klondike.cpp b/klondike.cpp --- a/klondike.cpp +++ b/klondike.cpp @@ -348,7 +348,7 @@ addSubtype( KlondikeDrawThreeId, I18N_NOOP( "Klondike (Draw 3)" ) ); } - DealerScene *createGame() const Q_DECL_OVERRIDE + DealerScene *createGame() const override { return new Klondike( this ); } diff --git a/libkcardgame/kabstractcarddeck_p.h b/libkcardgame/kabstractcarddeck_p.h --- a/libkcardgame/kabstractcarddeck_p.h +++ b/libkcardgame/kabstractcarddeck_p.h @@ -41,7 +41,7 @@ public: RenderingThread( KAbstractCardDeckPrivate * d, QSize size, const QStringList & elements ); - void run() Q_DECL_OVERRIDE; + void run() override; void halt(); Q_SIGNALS: diff --git a/libkcardgame/kcard.h b/libkcardgame/kcard.h --- a/libkcardgame/kcard.h +++ b/libkcardgame/kcard.h @@ -37,9 +37,9 @@ public: enum { Type = QGraphicsItem::UserType + 1 }; - int type() const Q_DECL_OVERRIDE; + int type() const override; - void paint( QPainter * painter, const QStyleOptionGraphicsItem * option, QWidget * widget = nullptr ) Q_DECL_OVERRIDE; + void paint( QPainter * painter, const QStyleOptionGraphicsItem * option, QWidget * widget = nullptr ) override; quint32 id() const; int rank() const; diff --git a/libkcardgame/kcard_p.h b/libkcardgame/kcard_p.h --- a/libkcardgame/kcard_p.h +++ b/libkcardgame/kcard_p.h @@ -32,8 +32,8 @@ { public: KCardAnimation( KCardPrivate * d, int duration, QPointF pos, qreal rotation, bool faceUp ); - int duration() const Q_DECL_OVERRIDE; - void updateCurrentTime( int msec ) Q_DECL_OVERRIDE; + int duration() const override; + void updateCurrentTime( int msec ) override; private: KCardPrivate * d; diff --git a/libkcardgame/kcarddeck.h b/libkcardgame/kcarddeck.h --- a/libkcardgame/kcarddeck.h +++ b/libkcardgame/kcarddeck.h @@ -67,12 +67,12 @@ explicit KCardDeck( const KCardTheme & theme = KCardTheme(), QObject * parent = nullptr ); virtual ~KCardDeck(); - int rankFromId( quint32 id ) const Q_DECL_OVERRIDE; - int suitFromId( quint32 id ) const Q_DECL_OVERRIDE; - int colorFromId( quint32 id ) const Q_DECL_OVERRIDE; + int rankFromId( quint32 id ) const override; + int suitFromId( quint32 id ) const override; + int colorFromId( quint32 id ) const override; protected: - QString elementName( quint32 id, bool faceUp = true ) const Q_DECL_OVERRIDE; + QString elementName( quint32 id, bool faceUp = true ) const override; private: class KStandardCardDeckPrivate * const d; diff --git a/libkcardgame/kcardpile.h b/libkcardgame/kcardpile.h --- a/libkcardgame/kcardpile.h +++ b/libkcardgame/kcardpile.h @@ -54,10 +54,10 @@ virtual ~KCardPile(); enum { Type = QGraphicsItem::UserType + 2 }; - int type() const Q_DECL_OVERRIDE; + int type() const override; - QRectF boundingRect() const Q_DECL_OVERRIDE; - void paint( QPainter * painter, const QStyleOptionGraphicsItem * option, QWidget * widget = nullptr ) Q_DECL_OVERRIDE; + QRectF boundingRect() const override; + void paint( QPainter * painter, const QStyleOptionGraphicsItem * option, QWidget * widget = nullptr ) override; QList cards() const; int count() const; diff --git a/libkcardgame/kcardscene.h b/libkcardgame/kcardscene.h --- a/libkcardgame/kcardscene.h +++ b/libkcardgame/kcardscene.h @@ -135,13 +135,13 @@ virtual void cardsDroppedOnPile( const QList & cards, KCardPile * pile ); virtual void cardsMoved( const QList & cards, KCardPile * oldPile, KCardPile * newPile ); - void mouseDoubleClickEvent( QGraphicsSceneMouseEvent * e ) Q_DECL_OVERRIDE; - void mouseMoveEvent( QGraphicsSceneMouseEvent * e ) Q_DECL_OVERRIDE; - void mousePressEvent( QGraphicsSceneMouseEvent * e ) Q_DECL_OVERRIDE; - void mouseReleaseEvent( QGraphicsSceneMouseEvent * e ) Q_DECL_OVERRIDE; - void wheelEvent( QGraphicsSceneWheelEvent * e ) Q_DECL_OVERRIDE; + void mouseDoubleClickEvent( QGraphicsSceneMouseEvent * e ) override; + void mouseMoveEvent( QGraphicsSceneMouseEvent * e ) override; + void mousePressEvent( QGraphicsSceneMouseEvent * e ) override; + void mouseReleaseEvent( QGraphicsSceneMouseEvent * e ) override; + void wheelEvent( QGraphicsSceneWheelEvent * e ) override; - void drawForeground( QPainter * painter, const QRectF & rect ) Q_DECL_OVERRIDE; + void drawForeground( QPainter * painter, const QRectF & rect ) override; private: friend class KCardScenePrivate; diff --git a/libkcardgame/kcardthemewidget_p.h b/libkcardgame/kcardthemewidget_p.h --- a/libkcardgame/kcardthemewidget_p.h +++ b/libkcardgame/kcardthemewidget_p.h @@ -40,7 +40,7 @@ public: PreviewThread( const KCardThemeWidgetPrivate * d, const QList & themes ); - void run() Q_DECL_OVERRIDE; + void run() override; void halt(); Q_SIGNALS: @@ -65,8 +65,8 @@ void reload(); QModelIndex indexOf( const QString & dirName ) const; - int rowCount( const QModelIndex & parent = QModelIndex() ) const Q_DECL_OVERRIDE; - QVariant data( const QModelIndex & index, int role = Qt::DisplayRole ) const Q_DECL_OVERRIDE; + int rowCount( const QModelIndex & parent = QModelIndex() ) const override; + QVariant data( const QModelIndex & index, int role = Qt::DisplayRole ) const override; private Q_SLOTS: void deleteThread(); @@ -85,8 +85,8 @@ public: explicit CardThemeDelegate( KCardThemeWidgetPrivate * d, QObject * parent = nullptr ); - void paint( QPainter * painter, const QStyleOptionViewItem & option, const QModelIndex & index ) const Q_DECL_OVERRIDE; - QSize sizeHint( const QStyleOptionViewItem & option, const QModelIndex & index ) const Q_DECL_OVERRIDE; + void paint( QPainter * painter, const QStyleOptionViewItem & option, const QModelIndex & index ) const override; + QSize sizeHint( const QStyleOptionViewItem & option, const QModelIndex & index ) const override; private: const KCardThemeWidgetPrivate * const d; diff --git a/mainwindow.h b/mainwindow.h --- a/mainwindow.h +++ b/mainwindow.h @@ -106,8 +106,8 @@ void slotUpdateMoves(int moves); protected: - void closeEvent(QCloseEvent * e) Q_DECL_OVERRIDE; - void saveNewToolbarConfig() Q_DECL_OVERRIDE; + void closeEvent(QCloseEvent * e) override; + void saveNewToolbarConfig() override; private slots: void slotSnapshot(); diff --git a/messagebox.h b/messagebox.h --- a/messagebox.h +++ b/messagebox.h @@ -34,7 +34,7 @@ void setSize( const QSize & size ); QSize size() const; - void paint( QPainter * painter, const QStyleOptionGraphicsItem * option, QWidget * widget ) Q_DECL_OVERRIDE; + void paint( QPainter * painter, const QStyleOptionGraphicsItem * option, QWidget * widget ) override; private: QString m_message; diff --git a/mod3.h b/mod3.h --- a/mod3.h +++ b/mod3.h @@ -46,17 +46,17 @@ public: explicit Mod3( const DealerInfo * di ); - void initialize() Q_DECL_OVERRIDE; + void initialize() override; protected: - void setGameState( const QString & state ) Q_DECL_OVERRIDE; - bool checkAdd(const PatPile * pile, const QList & oldCards, const QList & newCards) const Q_DECL_OVERRIDE; - bool checkRemove(const PatPile * pile, const QList & cards) const Q_DECL_OVERRIDE; - void cardsMoved( const QList & cards, KCardPile * oldPile, KCardPile * newPile ) Q_DECL_OVERRIDE; - void restart( const QList & cards ) Q_DECL_OVERRIDE; + void setGameState( const QString & state ) override; + bool checkAdd(const PatPile * pile, const QList & oldCards, const QList & newCards) const override; + bool checkRemove(const PatPile * pile, const QList & cards) const override; + void cardsMoved( const QList & cards, KCardPile * oldPile, KCardPile * newPile ) override; + void restart( const QList & cards ) override; protected slots: - bool newCards() Q_DECL_OVERRIDE; + bool newCards() override; private: PatPile *talon; diff --git a/mod3.cpp b/mod3.cpp --- a/mod3.cpp +++ b/mod3.cpp @@ -238,7 +238,7 @@ : DealerInfo(I18N_NOOP("Mod3"), Mod3Id) {} - DealerScene *createGame() const Q_DECL_OVERRIDE + DealerScene *createGame() const override { return new Mod3( this ); } diff --git a/numbereddealdialog.h b/numbereddealdialog.h --- a/numbereddealdialog.h +++ b/numbereddealdialog.h @@ -35,7 +35,7 @@ void setDealNumber( int dealNumber ); public slots: - void setVisible( bool visible ) Q_DECL_OVERRIDE; + void setVisible( bool visible ) override; signals: void dealChosen( int gameId, int dealNumber ); diff --git a/patpile.h b/patpile.h --- a/patpile.h +++ b/patpile.h @@ -54,10 +54,10 @@ PileRole pileRole() const; bool isFoundation() const; - QList cardPositions() const Q_DECL_OVERRIDE; + QList cardPositions() const override; protected: - void paintGraphic( QPainter * painter, qreal highlightedness ) Q_DECL_OVERRIDE; + void paintGraphic( QPainter * painter, qreal highlightedness ) override; private: int m_index; diff --git a/patsolve/clocksolver.h b/patsolve/clocksolver.h --- a/patsolve/clocksolver.h +++ b/patsolve/clocksolver.h @@ -26,15 +26,15 @@ { public: explicit ClockSolver(const Clock *dealer); - int get_possible_moves(int *a, int *numout) Q_DECL_OVERRIDE; - bool isWon() Q_DECL_OVERRIDE; - void make_move(MOVE *m) Q_DECL_OVERRIDE; - void undo_move(MOVE *m) Q_DECL_OVERRIDE; - int getOuts() Q_DECL_OVERRIDE; - void translate_layout() Q_DECL_OVERRIDE; - MoveHint translateMove(const MOVE &m) Q_DECL_OVERRIDE; + int get_possible_moves(int *a, int *numout) override; + bool isWon() override; + void make_move(MOVE *m) override; + void undo_move(MOVE *m) override; + int getOuts() override; + void translate_layout() override; + MoveHint translateMove(const MOVE &m) override; - void print_layout() Q_DECL_OVERRIDE; + void print_layout() override; const Clock *deal; }; diff --git a/patsolve/fortyeightsolver.h b/patsolve/fortyeightsolver.h --- a/patsolve/fortyeightsolver.h +++ b/patsolve/fortyeightsolver.h @@ -27,20 +27,20 @@ { public: explicit FortyeightSolver(const Fortyeight *dealer); - int get_possible_moves(int *a, int *numout) Q_DECL_OVERRIDE; - bool isWon() Q_DECL_OVERRIDE; - void make_move(MOVE *m) Q_DECL_OVERRIDE; - void undo_move(MOVE *m) Q_DECL_OVERRIDE; - int getOuts() Q_DECL_OVERRIDE; - unsigned int getClusterNumber() Q_DECL_OVERRIDE; - void translate_layout() Q_DECL_OVERRIDE; - void unpack_cluster( unsigned int k ) Q_DECL_OVERRIDE; - MoveHint translateMove(const MOVE &m) Q_DECL_OVERRIDE; + int get_possible_moves(int *a, int *numout) override; + bool isWon() override; + void make_move(MOVE *m) override; + void undo_move(MOVE *m) override; + int getOuts() override; + unsigned int getClusterNumber() override; + void translate_layout() override; + void unpack_cluster( unsigned int k ) override; + MoveHint translateMove(const MOVE &m) override; bool checkMove( int from, int to, MOVE *mp ); bool checkMoveOut( int from, MOVE *mp, int *dropped ); void checkState(FortyeightSolverState &d); - void print_layout() Q_DECL_OVERRIDE; + void print_layout() override; const Fortyeight *deal; bool lastdeal; diff --git a/patsolve/freecellsolver.h b/patsolve/freecellsolver.h --- a/patsolve/freecellsolver.h +++ b/patsolve/freecellsolver.h @@ -32,15 +32,15 @@ int good_automove(int o, int r); int get_possible_moves(int *a, int *numout) override; #if 0 - bool isWon() Q_DECL_OVERRIDE; - void make_move(MOVE *m) Q_DECL_OVERRIDE; - void undo_move(MOVE *m) Q_DECL_OVERRIDE; - void prioritize(MOVE *mp0, int n) Q_DECL_OVERRIDE; - int getOuts() Q_DECL_OVERRIDE; - unsigned int getClusterNumber() Q_DECL_OVERRIDE; - void translate_layout() Q_DECL_OVERRIDE; - void unpack_cluster( unsigned int k ) Q_DECL_OVERRIDE; - MoveHint translateMove(const MOVE &m) Q_DECL_OVERRIDE; + bool isWon() override; + void make_move(MOVE *m) override; + void undo_move(MOVE *m) override; + void prioritize(MOVE *mp0, int n) override; + int getOuts() override; + unsigned int getClusterNumber() override; + void translate_layout() override; + void unpack_cluster( unsigned int k ) override; + MoveHint translateMove(const MOVE &m) override; #endif void translate_layout() override; #if 0 diff --git a/patsolve/golfsolver.h b/patsolve/golfsolver.h --- a/patsolve/golfsolver.h +++ b/patsolve/golfsolver.h @@ -34,20 +34,20 @@ #ifdef WITH_BH_SOLVER black_hole_solver_instance_t *solver_instance; int solver_ret; - SolverInterface::ExitStatus patsolve( int _max_positions ) Q_DECL_OVERRIDE; + SolverInterface::ExitStatus patsolve( int _max_positions ) override; // More than enough space for two decks. char board_as_string[4 * 13 * 2 * 4 * 3]; void free_solver_instance(); #endif - int get_possible_moves(int *a, int *numout) Q_DECL_OVERRIDE; - bool isWon() Q_DECL_OVERRIDE; - void make_move(MOVE *m) Q_DECL_OVERRIDE; - void undo_move(MOVE *m) Q_DECL_OVERRIDE; - int getOuts() Q_DECL_OVERRIDE; - void translate_layout() Q_DECL_OVERRIDE; - MoveHint translateMove(const MOVE &m) Q_DECL_OVERRIDE; - - void print_layout() Q_DECL_OVERRIDE; + int get_possible_moves(int *a, int *numout) override; + bool isWon() override; + void make_move(MOVE *m) override; + void undo_move(MOVE *m) override; + int getOuts() override; + void translate_layout() override; + MoveHint translateMove(const MOVE &m) override; + + void print_layout() override; const Golf *deal; }; diff --git a/patsolve/grandfsolver.h b/patsolve/grandfsolver.h --- a/patsolve/grandfsolver.h +++ b/patsolve/grandfsolver.h @@ -27,17 +27,17 @@ public: explicit GrandfSolver(const Grandf *dealer); - int get_possible_moves(int *a, int *numout) Q_DECL_OVERRIDE; - bool isWon() Q_DECL_OVERRIDE; - void make_move(MOVE *m) Q_DECL_OVERRIDE; - void undo_move(MOVE *m) Q_DECL_OVERRIDE; - int getOuts() Q_DECL_OVERRIDE; - unsigned int getClusterNumber() Q_DECL_OVERRIDE; - void translate_layout() Q_DECL_OVERRIDE; - void unpack_cluster( unsigned int k ) Q_DECL_OVERRIDE; - MoveHint translateMove(const MOVE &m) Q_DECL_OVERRIDE; - - void print_layout() Q_DECL_OVERRIDE; + int get_possible_moves(int *a, int *numout) override; + bool isWon() override; + void make_move(MOVE *m) override; + void undo_move(MOVE *m) override; + int getOuts() override; + unsigned int getClusterNumber() override; + void translate_layout() override; + void unpack_cluster( unsigned int k ) override; + MoveHint translateMove(const MOVE &m) override; + + void print_layout() override; card_t Osuit[4]; diff --git a/patsolve/gypsysolver.h b/patsolve/gypsysolver.h --- a/patsolve/gypsysolver.h +++ b/patsolve/gypsysolver.h @@ -27,15 +27,15 @@ public: explicit GypsySolver(const Gypsy *dealer); int good_automove(int o, int r); - int get_possible_moves(int *a, int *numout) Q_DECL_OVERRIDE; - bool isWon() Q_DECL_OVERRIDE; - void make_move(MOVE *m) Q_DECL_OVERRIDE; - void undo_move(MOVE *m) Q_DECL_OVERRIDE; - int getOuts() Q_DECL_OVERRIDE; - void translate_layout() Q_DECL_OVERRIDE; - MoveHint translateMove(const MOVE &m) Q_DECL_OVERRIDE; - - void print_layout() Q_DECL_OVERRIDE; + int get_possible_moves(int *a, int *numout) override; + bool isWon() override; + void make_move(MOVE *m) override; + void undo_move(MOVE *m) override; + int getOuts() override; + void translate_layout() override; + MoveHint translateMove(const MOVE &m) override; + + void print_layout() override; /* Names of the cards. The ordering is defined in pat.h. */ diff --git a/patsolve/idiotsolver.h b/patsolve/idiotsolver.h --- a/patsolve/idiotsolver.h +++ b/patsolve/idiotsolver.h @@ -26,15 +26,15 @@ { public: explicit IdiotSolver(const Idiot *dealer); - int get_possible_moves(int *a, int *numout) Q_DECL_OVERRIDE; - bool isWon() Q_DECL_OVERRIDE; - void make_move(MOVE *m) Q_DECL_OVERRIDE; - void undo_move(MOVE *m) Q_DECL_OVERRIDE; - int getOuts() Q_DECL_OVERRIDE; - void translate_layout() Q_DECL_OVERRIDE; - MoveHint translateMove(const MOVE &m) Q_DECL_OVERRIDE; - - void print_layout() Q_DECL_OVERRIDE; + int get_possible_moves(int *a, int *numout) override; + bool isWon() override; + void make_move(MOVE *m) override; + void undo_move(MOVE *m) override; + int getOuts() override; + void translate_layout() override; + MoveHint translateMove(const MOVE &m) override; + + void print_layout() override; bool canMoveAway( int pile ) const; diff --git a/patsolve/klondikesolver.h b/patsolve/klondikesolver.h --- a/patsolve/klondikesolver.h +++ b/patsolve/klondikesolver.h @@ -27,17 +27,17 @@ public: KlondikeSolver(const Klondike *dealer, int draw); int good_automove(int o, int r); - int get_possible_moves(int *a, int *numout) Q_DECL_OVERRIDE; - bool isWon() Q_DECL_OVERRIDE; - void make_move(MOVE *m) Q_DECL_OVERRIDE; - void undo_move(MOVE *m) Q_DECL_OVERRIDE; - int getOuts() Q_DECL_OVERRIDE; - unsigned int getClusterNumber() Q_DECL_OVERRIDE; - void translate_layout() Q_DECL_OVERRIDE; - void unpack_cluster( unsigned int k ) Q_DECL_OVERRIDE; - MoveHint translateMove(const MOVE &m) Q_DECL_OVERRIDE; - - void print_layout() Q_DECL_OVERRIDE; + int get_possible_moves(int *a, int *numout) override; + bool isWon() override; + void make_move(MOVE *m) override; + void undo_move(MOVE *m) override; + int getOuts() override; + unsigned int getClusterNumber() override; + void translate_layout() override; + void unpack_cluster( unsigned int k ) override; + MoveHint translateMove(const MOVE &m) override; + + void print_layout() override; /* Names of the cards. The ordering is defined in pat.h. */ diff --git a/patsolve/mod3solver.h b/patsolve/mod3solver.h --- a/patsolve/mod3solver.h +++ b/patsolve/mod3solver.h @@ -26,15 +26,15 @@ { public: explicit Mod3Solver(const Mod3 *dealer); - int get_possible_moves(int *a, int *numout) Q_DECL_OVERRIDE; - bool isWon() Q_DECL_OVERRIDE; - void make_move(MOVE *m) Q_DECL_OVERRIDE; - void undo_move(MOVE *m) Q_DECL_OVERRIDE; - int getOuts() Q_DECL_OVERRIDE; - void translate_layout() Q_DECL_OVERRIDE; - MoveHint translateMove(const MOVE &m) Q_DECL_OVERRIDE; + int get_possible_moves(int *a, int *numout) override; + bool isWon() override; + void make_move(MOVE *m) override; + void undo_move(MOVE *m) override; + int getOuts() override; + void translate_layout() override; + MoveHint translateMove(const MOVE &m) override; - void print_layout() Q_DECL_OVERRIDE; + void print_layout() override; const Mod3 *deal; int aces; diff --git a/patsolve/patsolve.h b/patsolve/patsolve.h --- a/patsolve/patsolve.h +++ b/patsolve/patsolve.h @@ -61,9 +61,9 @@ bool recursive(POSITION *pos = nullptr); void translate_layout() override = 0; MoveHint translateMove(const MOVE &m ) override = 0; - void stopExecution() final Q_DECL_OVERRIDE; - QList firstMoves() const final Q_DECL_OVERRIDE; - QList winMoves() const final Q_DECL_OVERRIDE; + void stopExecution() final override; + QList firstMoves() const final override; + QList winMoves() const final override; protected: MOVE *get_moves(int *nmoves); diff --git a/patsolve/simonsolver.h b/patsolve/simonsolver.h --- a/patsolve/simonsolver.h +++ b/patsolve/simonsolver.h @@ -27,19 +27,19 @@ { public: explicit SimonSolver(const Simon *dealer); - int get_possible_moves(int *a, int *numout) Q_DECL_OVERRIDE; + int get_possible_moves(int *a, int *numout) override; #if 0 - bool isWon() Q_DECL_OVERRIDE; - void make_move(MOVE *m) Q_DECL_OVERRIDE; - void undo_move(MOVE *m) Q_DECL_OVERRIDE; - int getOuts() Q_DECL_OVERRIDE; - unsigned int getClusterNumber() Q_DECL_OVERRIDE; + bool isWon() override; + void make_move(MOVE *m) override; + void undo_move(MOVE *m) override; + int getOuts() override; + unsigned int getClusterNumber() override; #endif void translate_layout() override; MoveHint translateMove(const MOVE &m) override; #if 0 - void unpack_cluster( unsigned int k ) Q_DECL_OVERRIDE; - void print_layout() Q_DECL_OVERRIDE; + void unpack_cluster( unsigned int k ) override; + void print_layout() override; #endif void setFcSolverGameParams() override; diff --git a/patsolve/spidersolver.h b/patsolve/spidersolver.h --- a/patsolve/spidersolver.h +++ b/patsolve/spidersolver.h @@ -26,17 +26,17 @@ { public: explicit SpiderSolver(const Spider *dealer); - int get_possible_moves(int *a, int *numout) Q_DECL_OVERRIDE; - bool isWon() Q_DECL_OVERRIDE; - void make_move(MOVE *m) Q_DECL_OVERRIDE; - void undo_move(MOVE *m) Q_DECL_OVERRIDE; - int getOuts() Q_DECL_OVERRIDE; - unsigned int getClusterNumber() Q_DECL_OVERRIDE; - void translate_layout() Q_DECL_OVERRIDE; - void unpack_cluster( unsigned int k ) Q_DECL_OVERRIDE; - MoveHint translateMove(const MOVE &m) Q_DECL_OVERRIDE; - - void print_layout() Q_DECL_OVERRIDE; + int get_possible_moves(int *a, int *numout) override; + bool isWon() override; + void make_move(MOVE *m) override; + void undo_move(MOVE *m) override; + int getOuts() override; + unsigned int getClusterNumber() override; + void translate_layout() override; + void unpack_cluster( unsigned int k ) override; + MoveHint translateMove(const MOVE &m) override; + + void print_layout() override; /* Names of the cards. The ordering is defined in pat.h. */ diff --git a/patsolve/yukonsolver.h b/patsolve/yukonsolver.h --- a/patsolve/yukonsolver.h +++ b/patsolve/yukonsolver.h @@ -27,17 +27,17 @@ public: explicit YukonSolver(const Yukon *dealer); int good_automove(int o, int r); - int get_possible_moves(int *a, int *numout) Q_DECL_OVERRIDE; - bool isWon() Q_DECL_OVERRIDE; - void make_move(MOVE *m) Q_DECL_OVERRIDE; - void undo_move(MOVE *m) Q_DECL_OVERRIDE; - int getOuts() Q_DECL_OVERRIDE; - unsigned int getClusterNumber() Q_DECL_OVERRIDE; - void translate_layout() Q_DECL_OVERRIDE; - void unpack_cluster( unsigned int k ) Q_DECL_OVERRIDE; - MoveHint translateMove(const MOVE &m) Q_DECL_OVERRIDE; - - void print_layout() Q_DECL_OVERRIDE; + int get_possible_moves(int *a, int *numout) override; + bool isWon() override; + void make_move(MOVE *m) override; + void undo_move(MOVE *m) override; + int getOuts() override; + unsigned int getClusterNumber() override; + void translate_layout() override; + void unpack_cluster( unsigned int k ) override; + MoveHint translateMove(const MOVE &m) override; + + void print_layout() override; /* Names of the cards. The ordering is defined in pat.h. */ diff --git a/simon.h b/simon.h --- a/simon.h +++ b/simon.h @@ -45,13 +45,13 @@ public: explicit Simon( const DealerInfo * di ); - void initialize() Q_DECL_OVERRIDE; + void initialize() override; protected: - bool checkAdd(const PatPile * pile, const QList & oldCards, const QList & newCards) const Q_DECL_OVERRIDE; - bool checkPrefering(const PatPile * pile, const QList & oldCards, const QList & newCards) const Q_DECL_OVERRIDE; - bool checkRemove(const PatPile * pile, const QList & cards) const Q_DECL_OVERRIDE; - void restart( const QList & cards ) Q_DECL_OVERRIDE; + bool checkAdd(const PatPile * pile, const QList & oldCards, const QList & newCards) const override; + bool checkPrefering(const PatPile * pile, const QList & oldCards, const QList & newCards) const override; + bool checkRemove(const PatPile * pile, const QList & cards) const override; + void restart( const QList & cards ) override; private: PatPile* store[10]; diff --git a/simon.cpp b/simon.cpp --- a/simon.cpp +++ b/simon.cpp @@ -183,7 +183,7 @@ : DealerInfo(I18N_NOOP("Simple Simon"), SimpleSimonId) {} - DealerScene *createGame() const Q_DECL_OVERRIDE + DealerScene *createGame() const override { return new Simon( this ); } diff --git a/spider.h b/spider.h --- a/spider.h +++ b/spider.h @@ -48,24 +48,24 @@ public: explicit Spider( const DealerInfo * di ); - void initialize() Q_DECL_OVERRIDE; - void mapOldId(int id) Q_DECL_OVERRIDE; - int oldId() const Q_DECL_OVERRIDE; - QList configActions() const Q_DECL_OVERRIDE; + void initialize() override; + void mapOldId(int id) override; + int oldId() const override; + QList configActions() const override; protected: - QString getGameState() const Q_DECL_OVERRIDE; - void setGameState( const QString & state ) Q_DECL_OVERRIDE; - QString getGameOptions() const Q_DECL_OVERRIDE; - void setGameOptions( const QString & options ) Q_DECL_OVERRIDE; - bool checkAdd(const PatPile * pile, const QList & oldCards, const QList & newCards) const Q_DECL_OVERRIDE; - bool checkRemove(const PatPile * pile, const QList & cards) const Q_DECL_OVERRIDE; - void cardsMoved( const QList & cards, KCardPile * oldPile, KCardPile * newPile ) Q_DECL_OVERRIDE; - void restart( const QList & cards ) Q_DECL_OVERRIDE; + QString getGameState() const override; + void setGameState( const QString & state ) override; + QString getGameOptions() const override; + void setGameOptions( const QString & options ) override; + bool checkAdd(const PatPile * pile, const QList & oldCards, const QList & newCards) const override; + bool checkRemove(const PatPile * pile, const QList & cards) const override; + void cardsMoved( const QList & cards, KCardPile * oldPile, KCardPile * newPile ) override; + void restart( const QList & cards ) override; protected slots: - bool newCards() Q_DECL_OVERRIDE; - void animationDone() Q_DECL_OVERRIDE; + bool newCards() override; + void animationDone() override; private slots: void gameTypeChanged(); diff --git a/spider.cpp b/spider.cpp --- a/spider.cpp +++ b/spider.cpp @@ -57,7 +57,7 @@ }; protected: - void paintGraphic( QPainter * painter, qreal highlightedness ) Q_DECL_OVERRIDE + void paintGraphic( QPainter * painter, qreal highlightedness ) override { Q_UNUSED( painter ); Q_UNUSED( highlightedness ); @@ -501,7 +501,7 @@ addSubtype( SpiderFourSuitId, I18N_NOOP( "Spider (4 Suit)" ) ); } - DealerScene *createGame() const Q_DECL_OVERRIDE + DealerScene *createGame() const override { return new Spider( this ); } diff --git a/view.h b/view.h --- a/view.h +++ b/view.h @@ -52,9 +52,9 @@ void setScene( QGraphicsScene * scene ); protected: - void resizeEvent( QResizeEvent * e ) Q_DECL_OVERRIDE; - void drawBackground( QPainter * painter, const QRectF & rect ) Q_DECL_OVERRIDE; - void receivePixmap( const QPixmap & pixmap ) Q_DECL_OVERRIDE; + void resizeEvent( QResizeEvent * e ) override; + void drawBackground( QPainter * painter, const QRectF & rect ) override; + void receivePixmap( const QPixmap & pixmap ) override; private: void updateSceneSize(); diff --git a/yukon.h b/yukon.h --- a/yukon.h +++ b/yukon.h @@ -47,14 +47,14 @@ public: explicit Yukon( const DealerInfo * di ); - void initialize() Q_DECL_OVERRIDE; + void initialize() override; public slots: - void restart( const QList & cards ) Q_DECL_OVERRIDE; + void restart( const QList & cards ) override; protected: - bool checkAdd(const PatPile * pile, const QList & oldCards, const QList & newCards) const Q_DECL_OVERRIDE; - bool checkRemove(const PatPile * pile, const QList & cards) const Q_DECL_OVERRIDE; + bool checkAdd(const PatPile * pile, const QList & oldCards, const QList & newCards) const override; + bool checkRemove(const PatPile * pile, const QList & cards) const override; private: PatPile* store[7]; diff --git a/yukon.cpp b/yukon.cpp --- a/yukon.cpp +++ b/yukon.cpp @@ -132,7 +132,7 @@ : DealerInfo(I18N_NOOP("Yukon"), YukonId ) {} - DealerScene *createGame() const Q_DECL_OVERRIDE + DealerScene *createGame() const override { return new Yukon( this ); }