MCPcopy Create free account
hub / github.com/OneMoreGres/ScreenTranslator / updateSettings

Method updateSettings

src/manager.cpp:100–130  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

98}
99
100void Manager::updateSettings()
101{
102 LTRACE() << "updateSettings";
103 SOFT_ASSERT(settings_, return );
104
105 tray_->resetFatalError();
106 tray_->setTaskActionsEnabled(false);
107
108 settings_->writeTrace = setupTrace(settings_->writeTrace);
109 setupProxy(*settings_);
110 setupUpdates(*settings_);
111
112 models_->update(settings_->tessdataPath, settings_->translatorsPath);
113
114 tray_->updateSettings();
115 capturer_->updateSettings();
116 recognizer_->updateSettings();
117 corrector_->updateSettings();
118 translator_->updateSettings();
119 representer_->updateSettings();
120
121 tray_->setCaptureLockedEnabled(capturer_->canCaptureLocked());
122
123 SettingsValidator validator;
124 validator.correct(*settings_, *models_);
125 const auto errors = validator.check(*settings_, *models_);
126 if (errors.isEmpty())
127 return;
128
129 fatalError(QObject::tr("Incorrect settings found. Go to Settings"));
130}
131
132void Manager::setupProxy(const Settings &settings)
133{

Callers

nothing calls this directly

Calls 7

resetFatalErrorMethod · 0.80
setTaskActionsEnabledMethod · 0.80
canCaptureLockedMethod · 0.80
checkMethod · 0.80
updateMethod · 0.45
correctMethod · 0.45

Tested by

no test coverage detected