Persistenza: sync() esplicito dopo ogni scrittura QSettings (fix config cancellata al crash di chiusura) + reflow robusto con stile !important su html/body e contenitori
This commit is contained in:
@@ -19,6 +19,7 @@ void Settings::setServerUrl(const QString &value)
|
||||
if (value == serverUrl())
|
||||
return;
|
||||
m_settings.setValue(QStringLiteral("serverUrl"), value);
|
||||
m_settings.sync(); // scrivi subito su disco: l'app può crashare alla chiusura (WebView)
|
||||
emit serverUrlChanged();
|
||||
emit baseUrlChanged();
|
||||
}
|
||||
@@ -33,6 +34,7 @@ void Settings::setUsername(const QString &value)
|
||||
if (value == username())
|
||||
return;
|
||||
m_settings.setValue(QStringLiteral("username"), value);
|
||||
m_settings.sync();
|
||||
emit usernameChanged();
|
||||
}
|
||||
|
||||
@@ -46,6 +48,7 @@ void Settings::setPassword(const QString &value)
|
||||
if (value == password())
|
||||
return;
|
||||
m_settings.setValue(QStringLiteral("password"), value);
|
||||
m_settings.sync();
|
||||
emit passwordChanged();
|
||||
}
|
||||
|
||||
@@ -59,6 +62,7 @@ void Settings::setIgnoreSslErrors(bool value)
|
||||
if (value == ignoreSslErrors())
|
||||
return;
|
||||
m_settings.setValue(QStringLiteral("ignoreSslErrors"), value);
|
||||
m_settings.sync();
|
||||
emit ignoreSslErrorsChanged();
|
||||
}
|
||||
|
||||
@@ -97,6 +101,7 @@ QString Settings::bookmarkKey(int bookId, const QString &format) const
|
||||
void Settings::setBookmarkKey(int bookId, const QString &format, const QString &key)
|
||||
{
|
||||
m_settings.setValue(QStringLiteral("bookmarks/%1/%2").arg(bookId).arg(format), key);
|
||||
m_settings.sync();
|
||||
}
|
||||
|
||||
QString Settings::bookFilePath(int bookId, const QString &format) const
|
||||
|
||||
Reference in New Issue
Block a user