Write corrected text to separate property

This commit is contained in:
Gres 2020-03-09 11:41:48 +03:00
parent ab23b6ba6c
commit d945081dab
3 changed files with 3 additions and 3 deletions

View File

@ -14,7 +14,7 @@ void Corrector::correct(const TaskPtr &task)
SOFT_ASSERT(task->isValid(), return );
if (!userSubstitutions_.empty())
task->recognized = substituteUser(task->recognized, task->sourceLanguage);
task->corrected = substituteUser(task->recognized, task->sourceLanguage);
manager_.corrected(task);
}

View File

@ -13,6 +13,7 @@ public:
QPoint capturePoint;
QPixmap captured;
QString recognized;
QString corrected;
QString translated;
LanguageId sourceLanguage;

View File

@ -102,8 +102,7 @@ void WebPage::start(const TaskPtr &task)
isBusy_ = true;
nextIdleTime_ = QDateTime::currentDateTime().addSecs(timeout_.count());
proxy_->translate(task->recognized, task->sourceLanguage,
langCodes->iso639_1);
proxy_->translate(task->corrected, task->sourceLanguage, langCodes->iso639_1);
}
bool WebPage::isBusy() const