mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-11 00:24:47 -07:00
update deprecated methods in qt5.14 and protobuf 3.4 (#3906)
This commit is contained in:
parent
361833e023
commit
a80c756dcb
11 changed files with 74 additions and 37 deletions
|
|
@ -103,7 +103,11 @@ DlgCreateToken::DlgCreateToken(const QStringList &_predefinedTokens, QWidget *pa
|
|||
chooseTokenFromDeckRadioButton->setDisabled(true); // No tokens in deck = no need for option
|
||||
} else {
|
||||
chooseTokenFromDeckRadioButton->setChecked(true);
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(5, 14, 0))
|
||||
cardDatabaseDisplayModel->setCardNameSet(QSet<QString>(predefinedTokens.begin(), predefinedTokens.end()));
|
||||
#else
|
||||
cardDatabaseDisplayModel->setCardNameSet(QSet<QString>::fromList(predefinedTokens));
|
||||
#endif
|
||||
}
|
||||
|
||||
QVBoxLayout *tokenChooseLayout = new QVBoxLayout;
|
||||
|
|
@ -182,14 +186,20 @@ void DlgCreateToken::updateSearch(const QString &search)
|
|||
|
||||
void DlgCreateToken::actChooseTokenFromAll(bool checked)
|
||||
{
|
||||
if (checked)
|
||||
if (checked) {
|
||||
cardDatabaseDisplayModel->setCardNameSet(QSet<QString>());
|
||||
}
|
||||
}
|
||||
|
||||
void DlgCreateToken::actChooseTokenFromDeck(bool checked)
|
||||
{
|
||||
if (checked)
|
||||
if (checked) {
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(5, 14, 0))
|
||||
cardDatabaseDisplayModel->setCardNameSet(QSet<QString>(predefinedTokens.begin(), predefinedTokens.end()));
|
||||
#else
|
||||
cardDatabaseDisplayModel->setCardNameSet(QSet<QString>::fromList(predefinedTokens));
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
void DlgCreateToken::actOk()
|
||||
|
|
@ -227,4 +237,4 @@ QString DlgCreateToken::getAnnotation() const
|
|||
bool DlgCreateToken::getDestroy() const
|
||||
{
|
||||
return destroyCheckBox->isChecked();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue