mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-18 08:22:15 -07:00
stack allocate DeckLoader for loading tags
This commit is contained in:
parent
659fd2f163
commit
97663c4fde
1 changed files with 3 additions and 3 deletions
|
|
@ -143,10 +143,10 @@ void DeckPreviewDeckTagsDisplayWidget::openTagEditDlg()
|
||||||
auto *deckEditor = qobject_cast<TabDeckEditor *>(currentParent);
|
auto *deckEditor = qobject_cast<TabDeckEditor *>(currentParent);
|
||||||
QStringList knownTags;
|
QStringList knownTags;
|
||||||
QStringList allFiles = getAllFiles(SettingsCache::instance().getDeckPath());
|
QStringList allFiles = getAllFiles(SettingsCache::instance().getDeckPath());
|
||||||
auto *loader = new DeckLoader();
|
DeckLoader loader;
|
||||||
for (const QString &file : allFiles) {
|
for (const QString &file : allFiles) {
|
||||||
loader->loadFromFile(file, DeckLoader::getFormatFromName(file), false);
|
loader.loadFromFile(file, DeckLoader::getFormatFromName(file), false);
|
||||||
QStringList tags = loader->getTags();
|
QStringList tags = loader.getTags();
|
||||||
knownTags.append(tags);
|
knownTags.append(tags);
|
||||||
knownTags.removeDuplicates();
|
knownTags.removeDuplicates();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue