diff --git a/rpm/harbour-tide.desktop b/rpm/harbour-tide.desktop index 5db717d..74a78fb 100644 --- a/rpm/harbour-tide.desktop +++ b/rpm/harbour-tide.desktop @@ -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 diff --git a/src/settings.cpp b/src/settings.cpp index cb05417..c8f7569 100644 --- a/src/settings.cpp +++ b/src/settings.cpp @@ -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(); }