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

QDir::entryInfoList() reports system files regardless of System filter flag

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 4.6.0, 6.7
    • Core: I/O, Documentation
    • None
    • Windows

    Description

      Whether or not you set the System filter flag, QDir::entryInfoList() returns all system files on Windows.

      Example code:

      #include <QtCore>
      #include <QDebug>
      
      int main( int argc, char * argv[] )
      {
          QCoreApplication app( argc, argv );
          QDir dir("c:\\");
          dir.setFilter( QDir::Files | QDir::System );
          QFileInfoList entryInfoList = dir.entryInfoList(dir.filter());
      
          qDebug() << entryInfoList.size();
      
          foreach(const QFileInfo& info, entryInfoList)
          qDebug() << info.fileName();
          return 0;
      }
      
      

      Attachments

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

        Activity

          People

            docteam Qt Documentation Team
            xcm Martin Petersson (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes