mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-11 08:34:52 -07:00
Servatrice: group all the use of QSettings in a single file
and add a method to guess the path of servatrice.ini
This commit is contained in:
parent
277aba79dc
commit
a1b6600fe1
7 changed files with 113 additions and 53 deletions
18
servatrice/src/settingscache.h
Normal file
18
servatrice/src/settingscache.h
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
#ifndef SERVATRICE_SETTINGSCACHE_H
|
||||
#define SERVATRICE_SETTINGSCACHE_H
|
||||
|
||||
#include <QSettings>
|
||||
#include <QString>
|
||||
|
||||
class SettingsCache : public QSettings {
|
||||
Q_OBJECT
|
||||
private:
|
||||
QSettings *settings;
|
||||
public:
|
||||
SettingsCache(const QString & fileName="servatrice.ini", QSettings::Format format=QSettings::IniFormat, QObject * parent = 0) { };
|
||||
static QString guessConfigurationPath(QString & specificPath);
|
||||
};
|
||||
|
||||
extern SettingsCache *settingsCache;
|
||||
|
||||
#endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue