mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-04-27 07:48:01 -07:00
More fixes.
Took 7 minutes
This commit is contained in:
parent
e965e3bf82
commit
762441caa5
8 changed files with 7 additions and 27 deletions
|
|
@ -25,6 +25,7 @@ add_executable(dbconverter MACOSX_BUNDLE ${dbconverter_SOURCES})
|
|||
target_link_libraries(
|
||||
dbconverter
|
||||
PRIVATE libcockatrice_card
|
||||
PRIVATE libcockatrice_interfaces
|
||||
PRIVATE libcockatrice_settings
|
||||
PRIVATE ${DB_CONVERTER_QT_MODULES}
|
||||
)
|
||||
|
|
|
|||
|
|
@ -54,7 +54,6 @@ int main(int argc, char *argv[])
|
|||
exit(0);
|
||||
}
|
||||
|
||||
settingsCache = new SettingsCache;
|
||||
CardDatabaseConverter *db = new CardDatabaseConverter;
|
||||
|
||||
qInfo() << "---------------------------------------------";
|
||||
|
|
|
|||
|
|
@ -2,8 +2,8 @@
|
|||
#define MAIN_H
|
||||
|
||||
#include <libcockatrice/card/database/card_database.h>
|
||||
#include <libcockatrice/card/database/interface/noop_card_preference_provider.h">
|
||||
#include <libcockatrice/card/database/parser/cockatrice_xml_4.h>
|
||||
#include <libcockatrice/interfaces/noop_card_preference_provider.h>
|
||||
|
||||
class CardDatabaseConverter : public CardDatabase
|
||||
{
|
||||
|
|
|
|||
|
|
@ -46,12 +46,7 @@ QString SettingsCache::getSafeConfigFilePath(QString /* configEntry */, QString
|
|||
{
|
||||
return defaultPath;
|
||||
}
|
||||
SettingsCache::SettingsCache()
|
||||
: settings{new QSettings("global.ini", QSettings::IniFormat, this)}, shortcutsSettings{nullptr},
|
||||
cardDatabaseSettings{new CardDatabaseSettings("", this)}, serversSettings{nullptr}, messageSettings{nullptr},
|
||||
gameFiltersSettings{nullptr}, layoutsSettings{nullptr}, downloadSettings{nullptr}
|
||||
{
|
||||
}
|
||||
|
||||
void SettingsCache::setUseTearOffMenus(bool /* _useTearOffMenus */)
|
||||
{
|
||||
}
|
||||
|
|
@ -450,11 +445,4 @@ void SettingsCache::setRoundCardCorners(bool /* _roundCardCorners */)
|
|||
|
||||
void CardPictureLoader::clearPixmapCache(CardInfoPtr /* card */)
|
||||
{
|
||||
}
|
||||
|
||||
SettingsCache *settingsCache;
|
||||
|
||||
SettingsCache &SettingsCache::instance()
|
||||
{
|
||||
return *settingsCache;
|
||||
}
|
||||
}
|
||||
|
|
@ -10,7 +10,8 @@
|
|||
|
||||
#define PICTURELOADER_H
|
||||
|
||||
#include <../../cockatrice/src/client/settings/cache_settings.h>
|
||||
#include "../../cockatrice/src/client/settings/cache_settings.h"
|
||||
|
||||
#include <libcockatrice/card/database/card_database.h>
|
||||
#include <libcockatrice/utility/macros.h>
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,6 @@ namespace
|
|||
|
||||
TEST(CardDatabaseTest, LoadXml)
|
||||
{
|
||||
settingsCache = new SettingsCache;
|
||||
CardDatabase *db = new CardDatabase;
|
||||
|
||||
// ensure the card database is empty at start
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
|
||||
#include "gtest/gtest.h"
|
||||
#include <libcockatrice/card/database/card_database_manager.h>
|
||||
#include <libcockatrice/interfaces/noop_card_preference_provider.h>
|
||||
|
||||
#define QUERY(name, card, query, match) \
|
||||
TEST_F(CardQuery, name) \
|
||||
|
|
@ -72,8 +73,6 @@ QUERY(Color4, cat, "c!gw", false)
|
|||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
settingsCache = new SettingsCache;
|
||||
|
||||
::testing::InitGoogleTest(&argc, argv);
|
||||
return RUN_ALL_TESTS();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -455,10 +455,3 @@ void SettingsCache::setRoundCardCorners(bool /* _roundCardCorners */)
|
|||
void CardPictureLoader::clearPixmapCache(CardInfoPtr /* card */)
|
||||
{
|
||||
}
|
||||
|
||||
SettingsCache *settingsCache;
|
||||
|
||||
SettingsCache &SettingsCache::instance()
|
||||
{
|
||||
return *settingsCache;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue