More fixes.

Took 7 minutes
This commit is contained in:
Lukas Brübach 2025-11-06 21:07:29 +01:00
parent e965e3bf82
commit 762441caa5
8 changed files with 7 additions and 27 deletions

View file

@ -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}
)

View file

@ -54,7 +54,6 @@ int main(int argc, char *argv[])
exit(0);
}
settingsCache = new SettingsCache;
CardDatabaseConverter *db = new CardDatabaseConverter;
qInfo() << "---------------------------------------------";

View file

@ -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
{

View file

@ -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;
}
}

View file

@ -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>

View file

@ -7,7 +7,6 @@ namespace
TEST(CardDatabaseTest, LoadXml)
{
settingsCache = new SettingsCache;
CardDatabase *db = new CardDatabase;
// ensure the card database is empty at start

View file

@ -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();
}

View file

@ -455,10 +455,3 @@ void SettingsCache::setRoundCardCorners(bool /* _roundCardCorners */)
void CardPictureLoader::clearPixmapCache(CardInfoPtr /* card */)
{
}
SettingsCache *settingsCache;
SettingsCache &SettingsCache::instance()
{
return *settingsCache;
}