[SettingsManager] Properly handle multithreaded access again (#6844)

* [SettingsManager] Properly handle multithreaded access again

* Add comment

* Add batch write function

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
This commit is contained in:
RickyRister 2026-05-05 12:03:01 -07:00 committed by GitHub
parent 7c9fbe2be0
commit 19dbb17fb9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 88 additions and 12 deletions

View file

@ -6,6 +6,12 @@
class ICardSetPriorityController
{
public:
struct SetSaveData {
QString shortName;
unsigned int sortKey;
bool enabled;
};
virtual ~ICardSetPriorityController() = default;
virtual void setSortKey(QString shortName, unsigned int sortKey) = 0;
@ -15,6 +21,8 @@ public:
virtual unsigned int getSortKey(QString shortName) const = 0;
virtual bool isEnabled(QString shortName) const = 0;
virtual bool isKnown(QString shortName) const = 0;
virtual void saveSets(const QVector<SetSaveData> &data) = 0;
};
#endif // COCKATRICE_INTERFACE_CARD_SET_PRIORITY_CONTROLLER_H

View file

@ -28,6 +28,9 @@ public:
{
return true;
}
void saveSets(const QVector<SetSaveData> & /* data */) override {
};
};
#endif // COCKATRICE_NOOP_CARD_SET_PRIORITY_CONTROLLER_H