mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-04-28 11:53:11 -07:00
fix qt 6.10 debug build (#6271)
* fix qt 6.10 build * fix games model parameter order and correct parameter names * add missing include for qt5
This commit is contained in:
@@ -36,8 +36,7 @@ CardDatabaseLoader::~CardDatabaseLoader()
|
||||
LoadStatus CardDatabaseLoader::loadFromFile(const QString &fileName)
|
||||
{
|
||||
QFile file(fileName);
|
||||
file.open(QIODevice::ReadOnly);
|
||||
if (!file.isOpen()) {
|
||||
if (!file.open(QIODevice::ReadOnly)) {
|
||||
return FileError;
|
||||
}
|
||||
|
||||
@@ -150,4 +149,4 @@ bool CardDatabaseLoader::saveCustomTokensToFile()
|
||||
|
||||
availableParsers.first()->saveToFile(tmpSets, tmpCards, fileName);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -184,13 +184,20 @@ bool CardDatabaseDisplayModel::rowMatchesCardName(CardInfoPtr info) const
|
||||
|
||||
void CardDatabaseDisplayModel::clearFilterAll()
|
||||
{
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(6, 9, 0))
|
||||
beginFilterChange();
|
||||
#endif
|
||||
cardName.clear();
|
||||
cardText.clear();
|
||||
cardTypes.clear();
|
||||
cardColors.clear();
|
||||
if (filterTree != nullptr)
|
||||
filterTree->clear();
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(6, 10, 0))
|
||||
endFilterChange(QSortFilterProxyModel::Direction::Rows);
|
||||
#else
|
||||
invalidateFilter();
|
||||
#endif
|
||||
}
|
||||
|
||||
void CardDatabaseDisplayModel::setFilterTree(FilterTree *_filterTree)
|
||||
@@ -217,4 +224,4 @@ const QString CardDatabaseDisplayModel::sanitizeCardName(const QString &dirtyNam
|
||||
}
|
||||
}
|
||||
return QString::fromStdWString(toReturn);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user