Commit 4cbac7b5 authored by Nicolas Fella's avatar Nicolas Fella
Browse files

Replace Q_DECL_OVERRIDE with override

parent 5191cbc6
......@@ -155,7 +155,7 @@ public:
: DealerInfo(I18N_NOOP("Grandfather's Clock"), GrandfathersClockId)
{}
DealerScene *createGame() const Q_DECL_OVERRIDE
DealerScene *createGame() const override
{
return new Clock( this );
}
......
......@@ -45,15 +45,15 @@ class Clock : public DealerScene
public:
explicit Clock( const DealerInfo * di );
void initialize() Q_DECL_OVERRIDE;
void initialize() override;
protected:
bool checkAdd(const PatPile * pile, const QList<KCard*> & oldCards, const QList<KCard*> & newCards) const Q_DECL_OVERRIDE;
bool checkRemove(const PatPile* pile, const QList<KCard*> & cards) const Q_DECL_OVERRIDE;
void restart( const QList<KCard*> & cards ) Q_DECL_OVERRIDE;
bool checkAdd(const PatPile * pile, const QList<KCard*> & oldCards, const QList<KCard*> & newCards) const override;
bool checkRemove(const PatPile* pile, const QList<KCard*> & cards) const override;
void restart( const QList<KCard*> & cards ) override;
protected slots:
bool drop() Q_DECL_OVERRIDE;
bool drop() override;
private:
PatPile* store[8];
......
......@@ -153,7 +153,7 @@ public:
{
}
void run() Q_DECL_OVERRIDE
void run() override
{
SolverInterface::ExitStatus result = m_solver->patsolve();
emit finished( result );
......
......@@ -71,7 +71,7 @@ public:
virtual void initialize() = 0;
void relayoutScene() Q_DECL_OVERRIDE;
void relayoutScene() override;
void updateWonItem();
void addPatPile( PatPile * pile );
......@@ -151,18 +151,18 @@ public slots:
virtual bool tryAutomaticMove( KCard * card );
protected:
bool allowedToAdd(const KCardPile * pile, const QList<KCard*> & cards) const Q_DECL_OVERRIDE;
bool allowedToRemove(const KCardPile * pile, const KCard * card) const Q_DECL_OVERRIDE;
bool allowedToAdd(const KCardPile * pile, const QList<KCard*> & cards) const override;
bool allowedToRemove(const KCardPile * pile, const KCard * card) const override;
virtual bool checkAdd( const PatPile * pile, const QList<KCard*> & oldCards, const QList<KCard*> & newCards ) const;
virtual bool checkRemove( const PatPile * pile, const QList<KCard*> & cards ) const;
virtual bool checkPrefering( const PatPile * pile, const QList<KCard*> & oldCards, const QList<KCard*> & newCards ) const;
void cardsMoved( const QList<KCard*> & cards, KCardPile * oldPile, KCardPile * newPile ) Q_DECL_OVERRIDE;
void cardsMoved( const QList<KCard*> & 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<KCard*> & cards ) = 0;
......
......@@ -252,7 +252,7 @@ public:
: DealerInfo(I18N_NOOP("Forty & Eight"), FortyAndEightId)
{}
DealerScene *createGame() const Q_DECL_OVERRIDE
DealerScene *createGame() const override
{
return new Fortyeight( this );
}
......
......@@ -45,18 +45,18 @@ class Fortyeight : public DealerScene
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<KCard*> & oldCards, const QList<KCard*> & newCards) const Q_DECL_OVERRIDE;
bool checkRemove(const PatPile* pile, const QList<KCard*> & cards) const Q_DECL_OVERRIDE;
void cardsDroppedOnPile( const QList<KCard*> & cards, KCardPile * pile ) Q_DECL_OVERRIDE;
void restart( const QList<KCard*> & cards ) Q_DECL_OVERRIDE;
void setGameState( const QString & state ) override;
QString getGameState() const override;
bool checkAdd(const PatPile * pile, const QList<KCard*> & oldCards, const QList<KCard*> & newCards) const override;
bool checkRemove(const PatPile* pile, const QList<KCard*> & cards) const override;
void cardsDroppedOnPile( const QList<KCard*> & cards, KCardPile * pile ) override;
void restart( const QList<KCard*> & cards ) override;
protected slots:
bool newCards() Q_DECL_OVERRIDE;
bool newCards() override;
private:
bool canPutStore( const KCardPile * pile, const QList<KCard*> &cards ) const;
......
......@@ -297,7 +297,7 @@ public:
: DealerInfo(I18N_NOOP("Freecell"), FreecellId)
{}
DealerScene *createGame() const Q_DECL_OVERRIDE
DealerScene *createGame() const override
{
return new Freecell( this );
}
......
......@@ -47,17 +47,17 @@ class Freecell : public DealerScene
public:
explicit Freecell( const DealerInfo * di );
void initialize() Q_DECL_OVERRIDE;
void initialize() override;
protected:
bool checkAdd(const PatPile * pile, const QList<KCard*> & oldCards, const QList<KCard*> & newCards) const Q_DECL_OVERRIDE;
bool checkRemove(const PatPile * pile, const QList<KCard*> & cards) const Q_DECL_OVERRIDE;
void cardsDroppedOnPile( const QList<KCard*> & cards, KCardPile * pile ) Q_DECL_OVERRIDE;
void restart( const QList<KCard*> & cards ) Q_DECL_OVERRIDE;
QList<MoveHint> getHints() Q_DECL_OVERRIDE;
bool checkAdd(const PatPile * pile, const QList<KCard*> & oldCards, const QList<KCard*> & newCards) const override;
bool checkRemove(const PatPile * pile, const QList<KCard*> & cards) const override;
void cardsDroppedOnPile( const QList<KCard*> & cards, KCardPile * pile ) override;
void restart( const QList<KCard*> & cards ) override;
QList<MoveHint> getHints() override;
protected slots:
bool tryAutomaticMove( KCard * c ) Q_DECL_OVERRIDE;
bool tryAutomaticMove( KCard * c ) override;
private:
bool canPutStore( const KCardPile * pile, const QList<KCard*> & cards ) const;
......
......@@ -74,7 +74,7 @@ public:
}
}
QRectF boundingRect() const Q_DECL_OVERRIDE
QRectF boundingRect() const override
{
return QRectF( QPointF(), m_size );
}
......@@ -115,19 +115,19 @@ signals:
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 @@ protected:
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 )
......
......@@ -38,7 +38,7 @@ signals:
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 );
......
......@@ -195,7 +195,7 @@ public:
: DealerInfo(I18N_NOOP("Golf"), GolfId)
{}
DealerScene *createGame() const Q_DECL_OVERRIDE
DealerScene *createGame() const override
{
return new Golf( this );
}
......
......@@ -45,18 +45,18 @@ class Golf : public DealerScene
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<KCard*> & oldCards, const QList<KCard*> & newCards) const Q_DECL_OVERRIDE;
bool checkRemove(const PatPile * pile, const QList<KCard*> & cards) const Q_DECL_OVERRIDE;
void restart( const QList<KCard*> & cards ) Q_DECL_OVERRIDE;
bool drop() Q_DECL_OVERRIDE;
void setGameState( const QString & state ) override;
bool checkAdd(const PatPile * pile, const QList<KCard*> & oldCards, const QList<KCard*> & newCards) const override;
bool checkRemove(const PatPile * pile, const QList<KCard*> & cards) const override;
void restart( const QList<KCard*> & cards ) override;
bool drop() override;
protected slots:
bool newCards() Q_DECL_OVERRIDE;
bool newCards() override;
private:
PatPile* talon;
......
......@@ -200,7 +200,7 @@ public:
: DealerInfo(I18N_NOOP("Grandfather"), GrandfatherId)
{}
DealerScene *createGame() const Q_DECL_OVERRIDE
DealerScene *createGame() const override
{
return new Grandf( this );
}
......
......@@ -47,17 +47,17 @@ class Grandf : public DealerScene
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<KCard*> & oldCards, const QList<KCard*> & newCards) const Q_DECL_OVERRIDE;
bool checkRemove(const PatPile * pile, const QList<KCard*> & cards) const Q_DECL_OVERRIDE;
void restart( const QList<KCard*> & cards ) Q_DECL_OVERRIDE;
void setGameState( const QString & state ) override;
QString getGameState() const override;
bool checkAdd(const PatPile * pile, const QList<KCard*> & oldCards, const QList<KCard*> & newCards) const override;
bool checkRemove(const PatPile * pile, const QList<KCard*> & cards) const override;
void restart( const QList<KCard*> & cards ) override;
protected slots:
bool newCards() Q_DECL_OVERRIDE;
bool newCards() override;
private:
void deal( const QList<KCard*> & cardsToDeal );
......
......@@ -177,7 +177,7 @@ public:
: DealerInfo(I18N_NOOP("Gypsy"), GypsyId)
{}
DealerScene *createGame() const Q_DECL_OVERRIDE
DealerScene *createGame() const override
{
return new Gypsy( this );
}
......
......@@ -45,16 +45,16 @@ class Gypsy : public DealerScene
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<KCard*> & oldCards, const QList<KCard*> & newCards) const Q_DECL_OVERRIDE;
bool checkRemove(const PatPile * pile, const QList<KCard*> & cards) const Q_DECL_OVERRIDE;
void restart( const QList<KCard*> & cards ) Q_DECL_OVERRIDE;
void setGameState( const QString & state ) override;
bool checkAdd(const PatPile * pile, const QList<KCard*> & oldCards, const QList<KCard*> & newCards) const override;
bool checkRemove(const PatPile * pile, const QList<KCard*> & cards) const override;
void restart( const QList<KCard*> & cards ) override;
protected slots:
bool newCards() Q_DECL_OVERRIDE;
bool newCards() override;
private:
PatPile* talon;
......
......@@ -259,7 +259,7 @@ public:
: DealerInfo(I18N_NOOP("Aces Up"), AcesUpId)
{}
DealerScene *createGame() const Q_DECL_OVERRIDE
DealerScene *createGame() const override
{
return new Idiot( this );
}
......
......@@ -46,19 +46,19 @@ class Idiot: public DealerScene
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<KCard*> & oldCards, const QList<KCard*> & newCards) const Q_DECL_OVERRIDE;
bool checkRemove(const PatPile * pile, const QList<KCard*> & cards) const Q_DECL_OVERRIDE;
void restart( const QList<KCard*> & cards ) Q_DECL_OVERRIDE;
bool drop() Q_DECL_OVERRIDE;
void setGameState( const QString & state ) override;
bool checkAdd(const PatPile * pile, const QList<KCard*> & oldCards, const QList<KCard*> & newCards) const override;
bool checkRemove(const PatPile * pile, const QList<KCard*> & cards) const override;
void restart( const QList<KCard*> & 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();
......
......@@ -348,7 +348,7 @@ public:
addSubtype( KlondikeDrawThreeId, I18N_NOOP( "Klondike (Draw 3)" ) );
}
DealerScene *createGame() const Q_DECL_OVERRIDE
DealerScene *createGame() const override
{
return new Klondike( this );
}
......
......@@ -49,23 +49,23 @@ class Klondike : public DealerScene
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<QAction*> configActions() const Q_DECL_OVERRIDE;
void initialize() override;
void mapOldId(int id) override;
int oldId() const override;
QList<QAction*> 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<KCard*> & oldCards, const QList<KCard*> & newCards) const Q_DECL_OVERRIDE;
bool checkRemove(const PatPile * pile, const QList<KCard*> & cards) const Q_DECL_OVERRIDE;
void cardsMoved( const QList<KCard*> & cards, KCardPile * oldPile, KCardPile * newPile ) Q_DECL_OVERRIDE;
void restart( const QList<KCard*> & 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<KCard*> & oldCards, const QList<KCard*> & newCards) const override;
bool checkRemove(const PatPile * pile, const QList<KCard*> & cards) const override;
void cardsMoved( const QList<KCard*> & cards, KCardPile * oldPile, KCardPile * newPile ) override;
void restart( const QList<KCard*> & 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 @@ public:
KlondikePile( DealerScene * scene, int index, const QString & objectName = QString() );
void setCardsToShow( int numCards );
int cardsToShow() const;
QList<QPointF> cardPositions() const Q_DECL_OVERRIDE;
QList<QPointF> cardPositions() const override;
private:
int m_cardsToShow;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment