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);
|
||||
QStringList knownTags;
|
||||
QStringList allFiles = getAllFiles(SettingsCache::instance().getDeckPath());
|
||||
auto *loader = new DeckLoader();
|
||||
DeckLoader loader;
|
||||
for (const QString &file : allFiles) {
|
||||
loader->loadFromFile(file, DeckLoader::getFormatFromName(file), false);
|
||||
QStringList tags = loader->getTags();
|
||||
loader.loadFromFile(file, DeckLoader::getFormatFromName(file), false);
|
||||
QStringList tags = loader.getTags();
|
||||
knownTags.append(tags);
|
||||
knownTags.removeDuplicates();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue