| 98 | } |
| 99 | |
| 100 | void 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 | |
| 132 | void Manager::setupProxy(const Settings &settings) |
| 133 | { |
nothing calls this directly
no test coverage detected