From aac286df9d202349f8b52a77d14d9319838e8518 Mon Sep 17 00:00:00 2001 From: Gres Date: Mon, 30 Mar 2020 18:59:19 +0300 Subject: [PATCH] Fix corrector work with empty corrections --- src/correct/corrector.cpp | 6 ++---- src/correct/corrector.h | 1 - src/manager.cpp | 1 - 3 files changed, 2 insertions(+), 6 deletions(-) diff --git a/src/correct/corrector.cpp b/src/correct/corrector.cpp index 197db88..a8e853c 100644 --- a/src/correct/corrector.cpp +++ b/src/correct/corrector.cpp @@ -22,14 +22,12 @@ void Corrector::correct(const TaskPtr &task) if (!settings_.userSubstitutions.empty()) task->corrected = substituteUser(task->recognized, task->sourceLanguage); + else + task->corrected = task->recognized; manager_.corrected(task); } -void Corrector::updateSettings() -{ -} - QString Corrector::substituteUser(const QString &source, const LanguageId &language) const { diff --git a/src/correct/corrector.h b/src/correct/corrector.h index a0d819e..9f0c029 100644 --- a/src/correct/corrector.h +++ b/src/correct/corrector.h @@ -8,7 +8,6 @@ public: Corrector(Manager &manager, const Settings &settings); void correct(const TaskPtr &task); - void updateSettings(); private: QString substituteUser(const QString &source, diff --git a/src/manager.cpp b/src/manager.cpp index c74d185..22cc59f 100644 --- a/src/manager.cpp +++ b/src/manager.cpp @@ -82,7 +82,6 @@ void Manager::updateSettings() capturer_->updateSettings(); recognizer_->updateSettings(); translator_->updateSettings(); - corrector_->updateSettings(); representer_->updateSettings(); }