mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2025-12-05 20:39:59 -08:00
[DeckLoader] Disable copy constructor (#6338)
Took 1 hour 19 minutes Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
This commit is contained in:
@@ -265,7 +265,7 @@ void Player::deleteCard(CardItem *card)
|
||||
|
||||
void Player::setDeck(const DeckLoader &_deck)
|
||||
{
|
||||
deck = new DeckLoader(_deck);
|
||||
deck = new DeckLoader(this, _deck.getDeckList());
|
||||
|
||||
emit deckChanged();
|
||||
}
|
||||
|
||||
@@ -36,12 +36,6 @@ DeckLoader::DeckLoader(QObject *parent, DeckList *_deckList)
|
||||
deckList->setParent(this);
|
||||
}
|
||||
|
||||
DeckLoader::DeckLoader(const DeckLoader &other)
|
||||
: QObject(), deckList(other.deckList), lastFileName(other.lastFileName), lastFileFormat(other.lastFileFormat),
|
||||
lastRemoteDeckId(other.lastRemoteDeckId)
|
||||
{
|
||||
}
|
||||
|
||||
void DeckLoader::setDeckList(DeckList *_deckList)
|
||||
{
|
||||
deckList = _deckList;
|
||||
|
||||
@@ -53,8 +53,11 @@ private:
|
||||
public:
|
||||
DeckLoader(QObject *parent);
|
||||
DeckLoader(QObject *parent, DeckList *_deckList);
|
||||
DeckLoader(const DeckLoader &) = delete;
|
||||
DeckLoader &operator=(const DeckLoader &) = delete;
|
||||
|
||||
void setDeckList(DeckList *_deckList);
|
||||
DeckLoader(const DeckLoader &other);
|
||||
|
||||
const QString &getLastFileName() const
|
||||
{
|
||||
return lastFileName;
|
||||
@@ -106,7 +109,7 @@ public:
|
||||
|
||||
bool convertToCockatriceFormat(QString fileName);
|
||||
|
||||
DeckList *getDeckList()
|
||||
DeckList *getDeckList() const
|
||||
{
|
||||
return deckList;
|
||||
}
|
||||
|
||||
@@ -142,7 +142,7 @@ DlgEditDeckInClipboard::DlgEditDeckInClipboard(const DeckLoader &deckList, bool
|
||||
{
|
||||
setWindowTitle(tr("Edit deck in clipboard"));
|
||||
|
||||
deckLoader = new DeckLoader(deckList);
|
||||
deckLoader = new DeckLoader(this, deckList.getDeckList());
|
||||
deckLoader->setParent(this);
|
||||
|
||||
DlgEditDeckInClipboard::actRefresh();
|
||||
|
||||
Reference in New Issue
Block a user