mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-07 16:53:00 -07:00
Dependency Injection for SettingsCache
* Turn SettingsCache into a QSharedPointer. * Implement interfaces for settings that need it Took 2 hours 38 minutes
This commit is contained in:
parent
b773909dfd
commit
35d18b5fa9
127 changed files with 1012 additions and 803 deletions
|
|
@ -7,6 +7,8 @@
|
|||
#ifndef COCKATRICE_CARD_DATABASE_LOADER_H
|
||||
#define COCKATRICE_CARD_DATABASE_LOADER_H
|
||||
|
||||
#include "interface/interface_card_database_path_provider.h"
|
||||
|
||||
#include <QBasicMutex>
|
||||
#include <QList>
|
||||
#include <QLoggingCategory>
|
||||
|
|
@ -32,7 +34,9 @@ class CardDatabaseLoader : public QObject
|
|||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit CardDatabaseLoader(QObject *parent, CardDatabase *db);
|
||||
explicit CardDatabaseLoader(QObject *parent,
|
||||
CardDatabase *db,
|
||||
QSharedPointer<ICardDatabasePathProvider> pathProvider);
|
||||
~CardDatabaseLoader() override;
|
||||
|
||||
public slots:
|
||||
|
|
@ -53,6 +57,8 @@ private:
|
|||
|
||||
CardDatabase *database; // non-owning pointer to the container
|
||||
|
||||
QSharedPointer<ICardDatabasePathProvider> pathProvider; // pointer to the implementation providing the paths
|
||||
|
||||
// parsers
|
||||
QList<ICardDatabaseParser *> availableParsers;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue