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:
Fabio Bas 2014-10-02 22:37:50 +02:00
parent 277aba79dc
commit a1b6600fe1
7 changed files with 113 additions and 53 deletions

View 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