ProcessingItem finishes its way to Manager even if there are errors on the way.
This commit is contained in:
parent
b6461fa3a9
commit
811b232c81
@ -63,6 +63,7 @@ void Recognizer::recognize (ProcessingItem item) {
|
||||
QString language = (isCustomLanguage) ? item.ocrLanguage : ocrLanguage_;
|
||||
if (engine == NULL) {
|
||||
if (!initEngine (engine, language)) {
|
||||
emit recognized (item);
|
||||
return;
|
||||
}
|
||||
}
|
||||
@ -82,9 +83,9 @@ void Recognizer::recognize (ProcessingItem item) {
|
||||
|
||||
if (!result.isEmpty ()) {
|
||||
item.recognized = recognizerHelper_->substitute (result, language);
|
||||
emit recognized (item);
|
||||
}
|
||||
else {
|
||||
emit error (tr ("Текст не распознан."));
|
||||
}
|
||||
emit recognized (item);
|
||||
}
|
||||
|
@ -46,7 +46,7 @@ void WebTranslator::addProxyToView () {
|
||||
}
|
||||
|
||||
void WebTranslator::translate (ProcessingItem item) {
|
||||
if (item.translateLanguage.isEmpty ()) {
|
||||
if (!item.isValid () || item.translateLanguage.isEmpty ()) {
|
||||
emit translated (item);
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user