Skip to content
  • Andre Hartmann's avatar
    CppFindReferences: Fix file name case sensitivity on class renaming · c78ea5a7
    Andre Hartmann authored
    
    
    Utils::matchCaseReplacement searches for common prefix and suffix
    between old and new file name und leaves them unchanged. This leads
    to unexpected new file names.
    
    E.g. when renaming MainWindow to MyMainWindow, this function computes
    the prefix "m", the suffix "ainwindow.h" and only considers "yM" as
    the middle part that is actually renamed.
    
    Use a better algorithm to determine the new base name, and for
    unclear cases fall back to the "Lower case file names" option
    from Tools -> Options -> C++ -> File Naming.
    
    Task-number: QTCREATORBUG-18592
    Change-Id: I818f7d372102eb6e266123b2b4b6355f6fa28d64
    Reviewed-by: default avatarEike Ziller <eike.ziller@qt.io>
    c78ea5a7