mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-16 15:32:15 -07:00
fix: build on both qt < and >= 6.10.0
This commit is contained in:
parent
3ae4a7d8a7
commit
1a62ee2e57
8 changed files with 57 additions and 27 deletions
|
|
@ -36,8 +36,8 @@ CardDatabaseLoader::~CardDatabaseLoader()
|
|||
LoadStatus CardDatabaseLoader::loadFromFile(const QString &fileName)
|
||||
{
|
||||
QFile file(fileName);
|
||||
file.open(QIODevice::ReadOnly);
|
||||
if (!file.isOpen()) {
|
||||
const auto isOpen = file.open(QIODevice::ReadOnly);
|
||||
if (!isOpen) {
|
||||
return FileError;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -188,9 +188,16 @@ void CardDatabaseDisplayModel::clearFilterAll()
|
|||
cardText.clear();
|
||||
cardTypes.clear();
|
||||
cardColors.clear();
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(6, 10, 0)
|
||||
beginFilterChange();
|
||||
#endif
|
||||
if (filterTree != nullptr)
|
||||
filterTree->clear();
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(6, 10, 0)
|
||||
endFilterChange();
|
||||
#else
|
||||
invalidateFilter();
|
||||
#endif
|
||||
}
|
||||
|
||||
void CardDatabaseDisplayModel::setFilterTree(FilterTree *_filterTree)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue