Fix corrector work with empty corrections
This commit is contained in:
		
							parent
							
								
									43597f05f2
								
							
						
					
					
						commit
						aac286df9d
					
				@ -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
 | 
			
		||||
{
 | 
			
		||||
 | 
			
		||||
@ -8,7 +8,6 @@ public:
 | 
			
		||||
  Corrector(Manager &manager, const Settings &settings);
 | 
			
		||||
 | 
			
		||||
  void correct(const TaskPtr &task);
 | 
			
		||||
  void updateSettings();
 | 
			
		||||
 | 
			
		||||
private:
 | 
			
		||||
  QString substituteUser(const QString &source,
 | 
			
		||||
 | 
			
		||||
@ -82,7 +82,6 @@ void Manager::updateSettings()
 | 
			
		||||
  capturer_->updateSettings();
 | 
			
		||||
  recognizer_->updateSettings();
 | 
			
		||||
  translator_->updateSettings();
 | 
			
		||||
  corrector_->updateSettings();
 | 
			
		||||
  representer_->updateSettings();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user