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

QDirIterator does not show "hidden" files

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P4: Low
    • None
    • 4.8.2
    • Core: I/O
    • None
    • Linux debian 3.8.3 #239 SMP PREEMPT Sat Mar 16 14:23:09 EET 2013 x86_64 GNU/Linux

    Description

      QDirIterator does not show hidden files, and the documentation does not mention
      any flags that could be used to enable showing of hidden files.

      I'd expect QDirIterator to show all files by default, and if not
      this should be clearly documented!

      Testcase:

      #include <QtCore>
      #include <cstdio>
      int main(int argc, char *argv[])
      {
        if (argc != 2) {
          fprintf(stderr,"Usage: %s <directory>\n");
          exit(1);
        }
        QDirIterator it(QString(argv[1]), QDirIterator::Subdirectories);
        while (it.hasNext()) {
          it.next();
          qDebug() << it.fileInfo().fileName();
        }
        return 0;
      }
      

      Run it on a directory with a hidden file, and see that it is not printed

      Attachments

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

        Activity

          People

            Unassigned Unassigned
            edwin Török Edwin
            Votes:
            3 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes