Skip to content
  • Joerg Bornemann's avatar
    Utils: make FileInProjectFinder work with same file names · 4e09ec98
    Joerg Bornemann authored
    
    
    Consider having files with the same name in different subdirectories of
    your project. The FileInProjectFinder will now choose the best matching
    file path, which is the one that has the longest right-aligned common
    substring with the path to find.
    
    For the candidates
        ["/home/jim/MyProject/Resources/qml/1/foo.qml",
         "/home/jim/MyProject/Resources/qml/2/foo.qml"]
    and the file path to find being "/SomeWhere/Else/qml/2/foo.qml" the
    ranks are 8 and 10. Therefore, the second path is chosen.
    
    Task-number: QTCREATORBUG-12908
    Change-Id: I6225fd1dce8cc79a90d02ae0a54cdf80f75f45af
    Reviewed-by: default avatarKai Koehne <kai.koehne@theqtcompany.com>
    Reviewed-by: default avatarUlf Hermann <ulf.hermann@theqtcompany.com>
    4e09ec98