Skip to content
  • Nikolai Kosjar's avatar
    Clang: Avoid duplicate jobs without changes in-between · bf5c1cc4
    Nikolai Kosjar authored
    
    
    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: default avatarDavid Schulz <david.schulz@qt.io>
    bf5c1cc4