New JSON config cleanup and testing

This commit is contained in:
GriffinR
2026-02-22 03:04:02 -05:00
parent 29fe37f79e
commit 463803292f
15 changed files with 84 additions and 98 deletions

View File

@@ -48,13 +48,7 @@ public:
{ };
virtual ~KeyValueConfigBase() {};
// Writes the contents of the config to disk.
// Returns true if saving was successful, false otherwise.
virtual bool save();
// Loads the contents of the config from disk.
// Returns true if saving was successful, false otherwise.
// A successful load includes initializing an empty or non-existing file.
virtual bool load();
virtual QJsonObject toJson();

View File

@@ -37,5 +37,5 @@ public:
bool eventFilter(QObject *obj, QEvent *event) override;
private:
bool m_loggingEnabled = true;
QSet<QObject*> m_wasShown;
QSet<QObject*> m_shown;
};

View File

@@ -71,6 +71,7 @@ private:
void addNewGlobalConstant();
void addGlobalConstant(const QString &name, const QString &expression);
QMap<QString,QString> getGlobalConstants();
BaseGame::Version getBaseGameVersion() const;
private slots:
void dialogButtonClicked(QAbstractButton *button);