| 353 | } |
| 354 | |
| 355 | void SettingsEditor::updateState() |
| 356 | { |
| 357 | Settings settings; |
| 358 | settings.setPortable(ui->portable->isChecked()); |
| 359 | ui->tessdataPath->setText(settings.tessdataPath); |
| 360 | ui->translatorsPath->setText(settings.translatorsPath); |
| 361 | ui->hunspellDir->setText(settings.hunspellPath); |
| 362 | |
| 363 | updateModels(); |
| 364 | updateTranslators(enabledTranslators()); |
| 365 | validateSettings(); |
| 366 | updateCurrentPage(); |
| 367 | |
| 368 | const auto portableChanged = wasPortable_ != settings.isPortable(); |
| 369 | ui->pageUpdate->setEnabled(!portableChanged); |
| 370 | ui->pageUpdate->setToolTip(portableChanged |
| 371 | ? tr("Portable changed. Apply settings first") |
| 372 | : QString()); |
| 373 | } |
| 374 | |
| 375 | void SettingsEditor::updateCurrentPage() |
| 376 | { |
nothing calls this directly
no test coverage detected