mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-09-28 00:42:19 -07:00
Use designated initializer
Took 24 seconds
This commit is contained in:
parent
15ceb0e607
commit
94b43852c7
1 changed files with 6 additions and 6 deletions
|
|
@ -73,14 +73,14 @@ static QString toRelativeFilepath(const QString &filePath)
|
|||
|
||||
void VisualDeckStorageSearchWidget::filterWidgets(QList<DeckPreviewWidget *> widgets, const QString &searchText)
|
||||
{
|
||||
auto filterString = DeckFilterString(searchText);
|
||||
const auto filterString = DeckFilterString(searchText);
|
||||
|
||||
for (auto widget : widgets) {
|
||||
DeckSearchData searchData;
|
||||
searchData.deck = &widget->deckLoader->getDeck();
|
||||
searchData.filePath = widget->filePath;
|
||||
searchData.displayName = widget->getDisplayName();
|
||||
searchData.relativeFilePath = toRelativeFilepath(widget->filePath);
|
||||
const DeckSearchData searchData{.deck = &widget->deckLoader->getDeck(),
|
||||
.filePath = widget->filePath,
|
||||
.displayName = widget->getDisplayName(),
|
||||
.relativeFilePath = toRelativeFilepath(widget->filePath)};
|
||||
|
||||
widget->filteredBySearch = !filterString.check(searchData);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue