Don't recreate QSettings
This commit is contained in:
parent
178dfb9a68
commit
1ae74460cf
1 changed files with 4 additions and 2 deletions
|
@ -19,8 +19,10 @@
|
||||||
|
|
||||||
Settings::Settings(QObject *parent) : QObject(parent)
|
Settings::Settings(QObject *parent) : QObject(parent)
|
||||||
{
|
{
|
||||||
mySettings = new QSettings("harbour-batterybuddy", "harbour-batterybuddy");
|
// Use the same file location as GUI for data exchange
|
||||||
qDebug() << "Using" << mySettings->fileName();
|
if(!mySettings) {
|
||||||
|
mySettings = new QSettings("harbour-batterybuddy", "harbour-batterybuddy");
|
||||||
|
}
|
||||||
|
|
||||||
// Read in the values
|
// Read in the values
|
||||||
loadInteger(sLowAlert, &lowAlert, 5, 99);
|
loadInteger(sLowAlert, &lowAlert, 5, 99);
|
||||||
|
|
Loading…
Reference in a new issue