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

QFileSystemModel.isDir() returns wrong value

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P2: Important
    • 5.6.3
    • 4.6.2, 4.8.3, 5.4.1
    • None
    • Reproduced on Qt 4.6.2 on Ubuntu Lucid & Qt 4.8.3 on Windows 7.
    • acf43c17b647cdbfc3186bb8bf7e183df67a090b

    Description

      When using QFileSystemModel the isDir function returns false even if the file is a directory. This happens when the QModelIndex object is returned programmatically using the model.index(QString &path) function on a path that was not accessed via the GUI viewer object.

      Example (see attached file):
      index = model.index("C:\\Qt\\4.8.3\\include
      QtGui");
      model.isDir(index); // Should be True, returns False

      Attachments

        1. app.zip
          0.7 kB
        2. main.cpp
          0.7 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            avolkov Alexander Volkov
            tomerf Tomer Froumin
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes