persistenza preferenze: sync() immediato nei setter + OrganizationName/ApplicationName nel desktop (letti dalla sandbox SailJail)
This commit is contained in:
@@ -11,8 +11,10 @@ Categories=Utility;
|
|||||||
|
|
||||||
# Profilo SailJail esplicito: senza X-Sailjail la sandbox di Sailfish 5.1 usa il
|
# Profilo SailJail esplicito: senza X-Sailjail la sandbox di Sailfish 5.1 usa il
|
||||||
# profilo default, che nasconde ~/.config/harbour (config non persistente).
|
# profilo default, che nasconde ~/.config/harbour (config non persistente).
|
||||||
# Org/App sono impostati a runtime dal main.cpp (setOrganizationName/
|
# Org/App dichiarati QUI (letti dalla sandbox) e nel main.cpp (letti da
|
||||||
# setApplicationName): AppConfigLocation = ~/.config/harbour/tide (persistente).
|
# QStandardPaths): AppConfigLocation = ~/.config/harbour/tide (persistente).
|
||||||
# Internet = geocoding OpenStreetMap/Photon e stato del mare Open-Meteo.
|
# Internet = geocoding OpenStreetMap/Photon e stato del mare Open-Meteo.
|
||||||
[X-Sailjail]
|
[X-Sailjail]
|
||||||
Permissions=Internet
|
Permissions=Internet
|
||||||
|
OrganizationName=harbour
|
||||||
|
ApplicationName=tide
|
||||||
|
|||||||
@@ -39,6 +39,7 @@ void Settings::setLanguage(const QString &value)
|
|||||||
if (value == language())
|
if (value == language())
|
||||||
return;
|
return;
|
||||||
m_settings.setValue(QStringLiteral("language"), value);
|
m_settings.setValue(QStringLiteral("language"), value);
|
||||||
|
m_settings.sync();
|
||||||
emit languageChanged();
|
emit languageChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -52,6 +53,7 @@ void Settings::setPreferredPort(const QString &value)
|
|||||||
if (value == preferredPort())
|
if (value == preferredPort())
|
||||||
return;
|
return;
|
||||||
m_settings.setValue(QStringLiteral("preferredPort"), value);
|
m_settings.setValue(QStringLiteral("preferredPort"), value);
|
||||||
|
m_settings.sync();
|
||||||
emit preferredPortChanged();
|
emit preferredPortChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -65,6 +67,7 @@ void Settings::setPreferredLat(double value)
|
|||||||
if (qFuzzyCompare(value, preferredLat()))
|
if (qFuzzyCompare(value, preferredLat()))
|
||||||
return;
|
return;
|
||||||
m_settings.setValue(QStringLiteral("preferredLat"), value);
|
m_settings.setValue(QStringLiteral("preferredLat"), value);
|
||||||
|
m_settings.sync();
|
||||||
emit preferredLatChanged();
|
emit preferredLatChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -78,6 +81,7 @@ void Settings::setPreferredLon(double value)
|
|||||||
if (qFuzzyCompare(value, preferredLon()))
|
if (qFuzzyCompare(value, preferredLon()))
|
||||||
return;
|
return;
|
||||||
m_settings.setValue(QStringLiteral("preferredLon"), value);
|
m_settings.setValue(QStringLiteral("preferredLon"), value);
|
||||||
|
m_settings.sync();
|
||||||
emit preferredLonChanged();
|
emit preferredLonChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -91,6 +95,7 @@ void Settings::setUnit(const QString &value)
|
|||||||
if (value == unit())
|
if (value == unit())
|
||||||
return;
|
return;
|
||||||
m_settings.setValue(QStringLiteral("unit"), value);
|
m_settings.setValue(QStringLiteral("unit"), value);
|
||||||
|
m_settings.sync();
|
||||||
emit unitChanged();
|
emit unitChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -104,5 +109,6 @@ void Settings::setDays(int value)
|
|||||||
if (value == days())
|
if (value == days())
|
||||||
return;
|
return;
|
||||||
m_settings.setValue(QStringLiteral("days"), value);
|
m_settings.setValue(QStringLiteral("days"), value);
|
||||||
|
m_settings.sync();
|
||||||
emit daysChanged();
|
emit daysChanged();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user