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

QFileSystemModel creates node each time for UNC path

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Not Evaluated
    • Resolution: Incomplete
    • Affects Version/s: 4.8.x
    • Fix Version/s: None
    • Component/s: Core: I/O

      Description

       

      path=\\LENOVO-PC\oo-media
      const auto modelNdx = p->dirModel->index(path);
      const auto modelNdx2 = p->dirModel->index(path);
      Q_ASSERT(modelNdx == modelNdx2);
      

      The problem is in QFileSystemModelPrivate::node

      ...

       if (!root.children.contains(host.toLower())) {

      ...

      but p->addNode(rootNode, host,info); without converting to lower.

      So for unc pathes for each index(path) call - new node and index are created - bug

       

        Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

            Assignee:
            kleint Friedemann Kleint
            Reporter:
            Slava Yartsev Yartsev Viacheslav
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes