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 default, che nasconde ~/.config/harbour (config non persistente).
|
||||
# Org/App sono impostati a runtime dal main.cpp (setOrganizationName/
|
||||
# setApplicationName): AppConfigLocation = ~/.config/harbour/tide (persistente).
|
||||
# Org/App dichiarati QUI (letti dalla sandbox) e nel main.cpp (letti da
|
||||
# QStandardPaths): AppConfigLocation = ~/.config/harbour/tide (persistente).
|
||||
# Internet = geocoding OpenStreetMap/Photon e stato del mare Open-Meteo.
|
||||
[X-Sailjail]
|
||||
Permissions=Internet
|
||||
OrganizationName=harbour
|
||||
ApplicationName=tide
|
||||
|
||||
@@ -39,6 +39,7 @@ void Settings::setLanguage(const QString &value)
|
||||
if (value == language())
|
||||
return;
|
||||
m_settings.setValue(QStringLiteral("language"), value);
|
||||
m_settings.sync();
|
||||
emit languageChanged();
|
||||
}
|
||||
|
||||
@@ -52,6 +53,7 @@ void Settings::setPreferredPort(const QString &value)
|
||||
if (value == preferredPort())
|
||||
return;
|
||||
m_settings.setValue(QStringLiteral("preferredPort"), value);
|
||||
m_settings.sync();
|
||||
emit preferredPortChanged();
|
||||
}
|
||||
|
||||
@@ -65,6 +67,7 @@ void Settings::setPreferredLat(double value)
|
||||
if (qFuzzyCompare(value, preferredLat()))
|
||||
return;
|
||||
m_settings.setValue(QStringLiteral("preferredLat"), value);
|
||||
m_settings.sync();
|
||||
emit preferredLatChanged();
|
||||
}
|
||||
|
||||
@@ -78,6 +81,7 @@ void Settings::setPreferredLon(double value)
|
||||
if (qFuzzyCompare(value, preferredLon()))
|
||||
return;
|
||||
m_settings.setValue(QStringLiteral("preferredLon"), value);
|
||||
m_settings.sync();
|
||||
emit preferredLonChanged();
|
||||
}
|
||||
|
||||
@@ -91,6 +95,7 @@ void Settings::setUnit(const QString &value)
|
||||
if (value == unit())
|
||||
return;
|
||||
m_settings.setValue(QStringLiteral("unit"), value);
|
||||
m_settings.sync();
|
||||
emit unitChanged();
|
||||
}
|
||||
|
||||
@@ -104,5 +109,6 @@ void Settings::setDays(int value)
|
||||
if (value == days())
|
||||
return;
|
||||
m_settings.setValue(QStringLiteral("days"), value);
|
||||
m_settings.sync();
|
||||
emit daysChanged();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user