Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-51586

[REG 5.5 -> 5.6.0 RC] QFileSystemModel reports incorrect QFileInfo

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • P1: Critical
    • Resolution: Done
    • 5.6.0 RC
    • 5.6.1
    • None
    • acf43c17b647cdbfc3186bb8bf7e183df67a090b

    Description

      QFileSystemModel::fileInfo() returns incorrect QFileInfo for the root path after first setting the root path to some directory and then setting it to the parent directory:

      QFileSystemModel model;
      model.setRootPath("/usr/bin");
      QModelIndex idx = model.setRootPath("/usr");
      qDebug() << model.fileInfo(idx).absoluteFilePath(); // prints "/usr/bin" but must print "/usr"
      

      Attachments

        Issue Links

          For Gerrit Dashboard: QTBUG-51586
          # Subject Branch Project Status CR V

          Activity

            People

              avolkov Alexander Volkov
              avolkov Alexander Volkov
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes