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

QDirIterator does not show "hidden" files

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Reported
    • Priority: P4: Low
    • Resolution: Unresolved
    • Affects Version/s: 4.8.2
    • Fix Version/s: None
    • Component/s: Core: I/O
    • Labels:
      None
    • Environment:
      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

            • Assignee:
              Unassigned
              Reporter:
              edwin Török Edwin
            • Votes:
              2 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:

                Gerrit Reviews

                There are no open Gerrit changes