mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-04-27 07:48:01 -07:00
Extract the xml parser from carddatabase (#3223)
This commit is contained in:
parent
9727699e26
commit
a7f4aace9c
10 changed files with 510 additions and 384 deletions
|
|
@ -1,4 +1,5 @@
|
|||
#include "oracleimporter.h"
|
||||
#include "carddbparser/cockatricexml3.h"
|
||||
|
||||
#include <QDebug>
|
||||
#include <QtWidgets>
|
||||
|
|
@ -174,6 +175,7 @@ int OracleImporter::importTextSpoiler(CardSetPtr set, const QVariant &data)
|
|||
|
||||
QString layout = map.value("layout").toString();
|
||||
|
||||
// don't import tokens from the json file
|
||||
if (layout == "token")
|
||||
continue;
|
||||
|
||||
|
|
@ -362,3 +364,9 @@ int OracleImporter::startImport()
|
|||
// total number of sets
|
||||
return setIndex;
|
||||
}
|
||||
|
||||
bool OracleImporter::saveToFile(const QString &fileName)
|
||||
{
|
||||
CockatriceXml3Parser parser;
|
||||
return parser.saveToFile(sets, cards, fileName);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue