Migrate old setting keys
This commit is contained in:
parent
65627705ff
commit
4cd2dba0d7
1 changed files with 12 additions and 0 deletions
|
@ -19,6 +19,18 @@
|
||||||
|
|
||||||
Settings::Settings(QObject *parent) : QObject(parent)
|
Settings::Settings(QObject *parent) : QObject(parent)
|
||||||
{
|
{
|
||||||
|
// Migrate old settings
|
||||||
|
if(mySettings.contains("lowerLimit")) {
|
||||||
|
mySettings.setValue(sLowAlert, mySettings.value("lowerLimit"));
|
||||||
|
mySettings.remove("lowerLimit");
|
||||||
|
}
|
||||||
|
|
||||||
|
if(mySettings.contains("upperLimit")) {
|
||||||
|
mySettings.setValue(sHighAlert, mySettings.value("upperLimit"));
|
||||||
|
mySettings.remove("upperLimit");
|
||||||
|
}
|
||||||
|
|
||||||
|
// Read in the values
|
||||||
int tempValue;
|
int tempValue;
|
||||||
tempValue = mySettings.value(sLowAlert, lowAlert).toInt();
|
tempValue = mySettings.value(sLowAlert, lowAlert).toInt();
|
||||||
if(tempValue >= 10 && tempValue <= 99) {
|
if(tempValue >= 10 && tempValue <= 99) {
|
||||||
|
|
Loading…
Reference in a new issue