Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QDir::entryInfoList returns wrong results
Forum Updated to NodeBB v4.3 + New Features

QDir::entryInfoList returns wrong results

Scheduled Pinned Locked Moved General and Desktop
2 Posts 2 Posters 1.4k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • napajejenunedk0N Offline
    napajejenunedk0N Offline
    napajejenunedk0
    wrote on last edited by
    #1

    Why does the following Qt 4.8.2's code:

    @
    const QDir dir( ... );
    const QList< QFileInfo > dirs = dir.entryInfoList( QDir::AllDirs );
    @

    ... returns not only the directories inside dir but the dir's path and its parent folder's path?

    1 Reply Last reply
    0
    • L Offline
      L Offline
      lgeyer
      wrote on last edited by
      #2

      Because the directory <code>.</code> and the parent directory <code>..</code> are directory entries as well. If you do not want them to be listed use <code>QDir::NoDotAndDotDot</code>.

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved