Make parent the first arg in PlayingCard constructor
This commit is contained in:
parent
03e74a6c67
commit
206ff25a1a
|
@ -1,6 +1,6 @@
|
|||
#include "playingcard.h"
|
||||
|
||||
PlayingCard::PlayingCard(const PlayingCard::Suit& suit, const PlayingCard::Value& value, QObject* parent) : QObject{parent}, m_suit{suit}, m_value{value} {}
|
||||
PlayingCard::PlayingCard(QObject* parent, const PlayingCard::Suit& suit, const PlayingCard::Value& value) : QObject{parent}, m_suit{suit}, m_value{value} {}
|
||||
|
||||
PlayingCard::Suit PlayingCard::suit() const {
|
||||
return m_suit;
|
||||
|
|
|
@ -42,7 +42,7 @@ class PlayingCard : public QObject {
|
|||
Spades,
|
||||
};
|
||||
|
||||
explicit PlayingCard(const Suit& suit = Suit::Clubs, const Value& value = Value::Ace, QObject* parent = nullptr);
|
||||
explicit PlayingCard(QObject* parent = nullptr, const Suit& suit = Suit::Clubs, const Value& value = Value::Ace);
|
||||
|
||||
Suit suit() const;
|
||||
QString suitString() const;
|
||||
|
|
Loading…
Reference in a new issue