Mark item as translated even on error (to show at least recognized text).
This commit is contained in:
		
							parent
							
								
									e38449b928
								
							
						
					
					
						commit
						56a7469260
					
				@ -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;
 | 
			
		||||
 | 
			
		||||
@ -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_;
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user