diff --git a/WebTranslator.cpp b/WebTranslator.cpp index a5b3cf9..02820fd 100644 --- a/WebTranslator.cpp +++ b/WebTranslator.cpp @@ -71,7 +71,7 @@ void WebTranslator::proxyTranslated (const QString &text) { item.translated = text; emit translated (item); } - finishTranslation (); + finishTranslation (false); } void WebTranslator::abortTranslation () { @@ -87,9 +87,13 @@ void WebTranslator::loadFinished (bool ok) { } } -void WebTranslator::finishTranslation () { +void WebTranslator::finishTranslation (bool markAsTranslated) { translationTimeout_.stop (); + view_->stop (); if (!queue_.isEmpty ()) { + if (markAsTranslated) { + emit translated (queue_.first ()); + } queue_.pop_front (); } isReady_ = true; diff --git a/WebTranslator.h b/WebTranslator.h index 7f79114..dd77204 100644 --- a/WebTranslator.h +++ b/WebTranslator.h @@ -39,7 +39,7 @@ class WebTranslator : public QObject { private: void translateQueued (); void runScriptForItem (const ProcessingItem &item); - void finishTranslation (); + void finishTranslation (bool markAsTranslated = true); private: WebTranslatorProxy *proxy_;