mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-12 17:14:52 -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(
|
target_link_libraries(
|
||||||
dbconverter
|
dbconverter
|
||||||
PRIVATE libcockatrice_card
|
PRIVATE libcockatrice_card
|
||||||
|
PRIVATE libcockatrice_interfaces
|
||||||
PRIVATE libcockatrice_settings
|
PRIVATE libcockatrice_settings
|
||||||
PRIVATE ${DB_CONVERTER_QT_MODULES}
|
PRIVATE ${DB_CONVERTER_QT_MODULES}
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -54,7 +54,6 @@ int main(int argc, char *argv[])
|
||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
settingsCache = new SettingsCache;
|
|
||||||
CardDatabaseConverter *db = new CardDatabaseConverter;
|
CardDatabaseConverter *db = new CardDatabaseConverter;
|
||||||
|
|
||||||
qInfo() << "---------------------------------------------";
|
qInfo() << "---------------------------------------------";
|
||||||
|
|
|
||||||
|
|
@ -2,8 +2,8 @@
|
||||||
#define MAIN_H
|
#define MAIN_H
|
||||||
|
|
||||||
#include <libcockatrice/card/database/card_database.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/card/database/parser/cockatrice_xml_4.h>
|
||||||
|
#include <libcockatrice/interfaces/noop_card_preference_provider.h>
|
||||||
|
|
||||||
class CardDatabaseConverter : public CardDatabase
|
class CardDatabaseConverter : public CardDatabase
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -46,12 +46,7 @@ QString SettingsCache::getSafeConfigFilePath(QString /* configEntry */, QString
|
||||||
{
|
{
|
||||||
return defaultPath;
|
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 */)
|
void SettingsCache::setUseTearOffMenus(bool /* _useTearOffMenus */)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
@ -451,10 +446,3 @@ void SettingsCache::setRoundCardCorners(bool /* _roundCardCorners */)
|
||||||
void CardPictureLoader::clearPixmapCache(CardInfoPtr /* card */)
|
void CardPictureLoader::clearPixmapCache(CardInfoPtr /* card */)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
SettingsCache *settingsCache;
|
|
||||||
|
|
||||||
SettingsCache &SettingsCache::instance()
|
|
||||||
{
|
|
||||||
return *settingsCache;
|
|
||||||
}
|
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,8 @@
|
||||||
|
|
||||||
#define PICTURELOADER_H
|
#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/card/database/card_database.h>
|
||||||
#include <libcockatrice/utility/macros.h>
|
#include <libcockatrice/utility/macros.h>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,6 @@ namespace
|
||||||
|
|
||||||
TEST(CardDatabaseTest, LoadXml)
|
TEST(CardDatabaseTest, LoadXml)
|
||||||
{
|
{
|
||||||
settingsCache = new SettingsCache;
|
|
||||||
CardDatabase *db = new CardDatabase;
|
CardDatabase *db = new CardDatabase;
|
||||||
|
|
||||||
// ensure the card database is empty at start
|
// ensure the card database is empty at start
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@
|
||||||
|
|
||||||
#include "gtest/gtest.h"
|
#include "gtest/gtest.h"
|
||||||
#include <libcockatrice/card/database/card_database_manager.h>
|
#include <libcockatrice/card/database/card_database_manager.h>
|
||||||
|
#include <libcockatrice/interfaces/noop_card_preference_provider.h>
|
||||||
|
|
||||||
#define QUERY(name, card, query, match) \
|
#define QUERY(name, card, query, match) \
|
||||||
TEST_F(CardQuery, name) \
|
TEST_F(CardQuery, name) \
|
||||||
|
|
@ -72,8 +73,6 @@ QUERY(Color4, cat, "c!gw", false)
|
||||||
|
|
||||||
int main(int argc, char **argv)
|
int main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
settingsCache = new SettingsCache;
|
|
||||||
|
|
||||||
::testing::InitGoogleTest(&argc, argv);
|
::testing::InitGoogleTest(&argc, argv);
|
||||||
return RUN_ALL_TESTS();
|
return RUN_ALL_TESTS();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -455,10 +455,3 @@ void SettingsCache::setRoundCardCorners(bool /* _roundCardCorners */)
|
||||||
void CardPictureLoader::clearPixmapCache(CardInfoPtr /* card */)
|
void CardPictureLoader::clearPixmapCache(CardInfoPtr /* card */)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
SettingsCache *settingsCache;
|
|
||||||
|
|
||||||
SettingsCache &SettingsCache::instance()
|
|
||||||
{
|
|
||||||
return *settingsCache;
|
|
||||||
}
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue