mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-10 04:16:43 -07:00
More adjustments.
Took 13 minutes
This commit is contained in:
parent
bd04289552
commit
239adf20cd
4 changed files with 12 additions and 8 deletions
|
|
@ -1,6 +1,8 @@
|
|||
#ifndef MAIN_H
|
||||
#define MAIN_H
|
||||
|
||||
#include "libcockatrice/interfaces/noop_card_set_priority_controller.h"
|
||||
|
||||
#include <libcockatrice/card/database/card_database.h>
|
||||
#include <libcockatrice/card/database/parser/cockatrice_xml_4.h>
|
||||
#include <libcockatrice/interfaces/noop_card_preference_provider.h>
|
||||
|
|
@ -26,7 +28,7 @@ public:
|
|||
|
||||
bool saveCardDatabase(const QString &fileName)
|
||||
{
|
||||
CockatriceXml4Parser parser(new NoopCardPreferenceProvider());
|
||||
CockatriceXml4Parser parser(new NoopCardPreferenceProvider(), new NoopCardSetPriorityController());
|
||||
|
||||
return parser.saveToFile(createDefaultMagicFormats(), sets, cards, fileName);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
#ifndef COCKATRICE_INTERFACE_CARD_SET_PRIORITY_CONTROLLER_H
|
||||
#define COCKATRICE_INTERFACE_CARD_SET_PRIORITY_CONTROLLER_H
|
||||
|
||||
#include <QString>
|
||||
|
||||
class ICardSetPriorityController
|
||||
{
|
||||
public:
|
||||
|
|
|
|||
|
|
@ -6,25 +6,25 @@
|
|||
class NoopCardSetPriorityController : public ICardSetPriorityController
|
||||
{
|
||||
public:
|
||||
void setSortKey(QString /* shortName */, unsigned int /* sortKey */)
|
||||
void setSortKey(QString /* shortName */, unsigned int /* sortKey */) override
|
||||
{
|
||||
}
|
||||
void setEnabled(QString /* shortName */, bool /* enabled */)
|
||||
void setEnabled(QString /* shortName */, bool /* enabled */) override
|
||||
{
|
||||
}
|
||||
void setIsKnown(QString /* shortName */, bool /* isknown */)
|
||||
void setIsKnown(QString /* shortName */, bool /* isknown */) override
|
||||
{
|
||||
}
|
||||
|
||||
unsigned int getSortKey(QString /* shortName */)
|
||||
unsigned int getSortKey(QString /* shortName */) override
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
bool isEnabled(QString /* shortName */)
|
||||
bool isEnabled(QString /* shortName */) override
|
||||
{
|
||||
return true;
|
||||
}
|
||||
bool isKnown(QString /* shortName */)
|
||||
bool isKnown(QString /* shortName */) override
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -565,7 +565,7 @@ int OracleImporter::startImport()
|
|||
|
||||
bool OracleImporter::saveToFile(const QString &fileName, const QString &sourceUrl, const QString &sourceVersion)
|
||||
{
|
||||
CockatriceXml4Parser parser(new NoopCardPreferenceProvider());
|
||||
CockatriceXml4Parser parser(new NoopCardPreferenceProvider(), new NoopCardSetPriorityController());
|
||||
|
||||
return parser.saveToFile(createDefaultMagicFormats(), sets, cards, fileName, sourceUrl, sourceVersion);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue