rockbox/utils/regtools/qeditor/settings.cpp
Amaury Pouly c323381f0b regtools: add graphical register explorer + analyser
This tool allows one to explore any register map. Register dumps
(like produced by hwstub tools) can be loaded and decoded by the
tool. Finally some analysers are provided for specific soc analysis
like clock tree and emi on imx233 for example.

Change-Id: Iaf81bd52d15f3e44ab4fe9bc039153fcf60cf92a
2013-08-21 20:18:37 +02:00

32 lines
No EOL
583 B
C++

#include <QCoreApplication>
#include <QDebug>
#include "settings.h"
Settings::Settings()
{
}
Settings::~Settings()
{
if(m_settings)
delete m_settings;
}
QSettings *Settings::GetSettings()
{
if(!m_settings)
{
QDir dir(QCoreApplication::applicationDirPath());
QString filename = dir.filePath(QCoreApplication::organizationDomain() + ".ini");
m_settings = new QSettings(filename, QSettings::IniFormat);
}
return m_settings;
}
QSettings *Settings::Get()
{
return g_settings.GetSettings();
}
Settings Settings::g_settings;