Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-25005

QHash<FilePath, T> may potentially crash when changing system case sensitivity

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: P3: Somewhat important P3: Somewhat important
    • Qt Creator 6.0.1
    • Qt Creator 4.14.0-beta1
    • All Other Issues
    • None
    • macOS
    • f03f712791 (qt-creator/qt-creator/6.0) f03f712791 (qt-creator/qt-creator/master) f03f712791 (qt-creator/qt-creator/qmlprojectstorage)

      FilePath::hash() method is implemented using static method: fileNameCaseSensitivity(). Looks like it's possible, that the returned value of fileNameCaseSensitivity() may change, after e.g. user changed settings (mac only: systemsettings.cpp, line 130). That means, that it may break instances of QHash where the key is FilePath (e.g. DependencyTable::fileIndex). Provided, that we have a hash filled with FilePath items (in case sensitive mode, e.g. items like "foo.txt" and "Foo.txt"), if we change the static settings to case insensitive and then rehash that hash, we may potentially crash.

        For Gerrit Dashboard: QTCREATORBUG-25005
        # Subject Branch Project Status CR V

            con Eike Ziller
            jkobus Jarek Kobus
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes