MCPcopy Create free account
hub / github.com/Martchus/syncthingtray / applySettings

Method applySettings

syncthingwidgets/quick/app.cpp:752–773  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

750}
751
752bool App::applySettings()
753{
754 auto mod = false;
755 auto tweaksSettings = m_settings.value(QLatin1String("tweaks")).toObject();
756 ensureDefault(mod, tweaksSettings, QLatin1String("closePreference"), QString());
757 ensureDefault(mod, tweaksSettings, QLatin1String("exportDir"), QString());
758 ensureDefault(mod, tweaksSettings, QLatin1String("useUnixDomainSocket"), false);
759 ensureDefault(mod, tweaksSettings, QLatin1String("connectionLogging"), false);
760#ifdef Q_OS_ANDROID
761 ensureDefault(mod, tweaksSettings, QLatin1String("importExportAsArchive"), true);
762 ensureDefault(mod, tweaksSettings, QLatin1String("importExportEncryptionPassword"), QString());
763#endif
764 if (mod) {
765 m_settings.insert(QLatin1String("tweaks"), tweaksSettings);
766 }
767 applySyncthingSettings();
768 applyLauncherSettings();
769 applyConnectionSettings(m_syncthingGuiUrl);
770 invalidateStatus();
771 emit info(tr("App settings saved"));
772 return true;
773}
774
775bool App::reloadSettings()
776{

Callers 7

appbase.cppFile · 0.45
handleGuiUrlChangedMethod · 0.45
AppServiceMethod · 0.45
connectionForLauncherMethod · 0.45
initConnectionMethod · 0.45

Calls 1

ensureDefaultFunction · 0.85

Tested by 1