forked from qt-creator/qt-creator
		
	Clang: Avoid duplicate jobs without changes in-between
This could happen, e.g. with this message order:
  >>> updateTranslationUnitsForEditor()
  add job<1>
  run job<1>
  >>> updateVisibleTranslationUnits(Utf8String(), {})
  >>> updateVisibleTranslationUnits(path, {path})
  add job<2>
  finish job<1>
  run job<2> -- Ops, nothing is changed but job<2> is started
This led to an outdated translation unit (e.g. wrong highlighting).
Now JobQueue checks for duplicates in the queue and checks all the
currently running jobs.
Change-Id: I05843fddcbd21ce0489681c283227c0027ded428
Reviewed-by: David Schulz <david.schulz@qt.io>
			
			
This commit is contained in:
		@@ -71,6 +71,8 @@ public:
 | 
			
		||||
 | 
			
		||||
    JobRequest();
 | 
			
		||||
 | 
			
		||||
    bool operator==(const JobRequest &other) const;
 | 
			
		||||
 | 
			
		||||
public:
 | 
			
		||||
    quint64 id = 0;
 | 
			
		||||
    Type type;
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user