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

QDir::entryInfoList(sort=name)

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Not Evaluated
    • Resolution: Done
    • Affects Version/s: 6.0.0 Beta2
    • Fix Version/s: None
    • Component/s: Core: I/O
    • Labels:
      None
    • Platform/s:
      Windows
    • Commits:
      sorry,This is not an underscore problem.I can't reproduce the problem

      Description

      The sort by name function does not work when there is an number in the folder address.

      The filenames structure under this folder looks like this:

      1.png
      2.png
      3.png
      ...
      4000.png

       

      imagePath = QFileDialog::getExistingDirectory();
      QDir *dir=new QDir(imagePath);
      QList<QFileInfo> *fileInfo=
      new QList<QFileInfo>(dir>entryInfoList(filter,QDir::Files,QDir::Name));
      
      fileInfo->at(index).filePath()
      index++;

      not working "imagePath":

      1. D:\data\image_4000
      2. D:\data\image-4000

       

      1.png   //index=1
      10.png //index=2
      100.png //index=3
      1000.png //index=4
      1001.png //index=5
      1002.png //index=6
      ...
      1009.png  //index=13
      101.png  //index=14
      1010.png  //index=15

      **

       

      working "imagePath":

      1. D:\data\image4000

       

      1.png
      2.png
      3.png
      4.png
      ...
      4000.png

       

       

        Attachments

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

          Activity

            People

            Assignee:
            thiago Thiago Macieira
            Reporter:
            xehxx yu 3dcontent
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes