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

QDir::entryInfoList(sort=name)

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Not Evaluated Not Evaluated
    • None
    • 6.0.0 Beta2
    • Core: I/O
    • None
    • Windows
    • sorry,This is not an underscore problem.I can't reproduce the problem

      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

       

       

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

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

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes