Results 1 to 4 of 4

Thread: qt 4.8.1 and qdir entryInfoList problem

  1. #1
    Join Date
    Jul 2009
    Posts
    10
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default qt 4.8.1 and qdir entryInfoList problem

    Hello all

    I,m working with the QTSDK 1.2.1 and use the QT 4.8.1 on visual studio 2010
    my OS is Win7
    the problem is if i try the following code:

    Qt Code:
    1. QDir pathInfo("C:\");
    2. QFileInfoList childrenInfo = pathInfo.entryInfoList(QDir::AllDirs | QDir::NoDotAndDotDot | QDir::NoSymLinks );
    To copy to clipboard, switch view to plain text mode 

    i get an empty list. if instead i call to pathInfo.entryInfoList() i get all the folders but i must have the filers.


    before i upgrade to 4.8.1 i worked with QTSDK 1.1 ( i think) using the QT 4.7.4 and its work fine

    is any one know if its a known bugs? how can i pass it?
    or is any one has a solution for that?

    thanks a lot
    Moti

  2. #2
    Join Date
    Sep 2011
    Location
    Manchester
    Posts
    538
    Thanks
    3
    Thanked 106 Times in 103 Posts
    Qt products
    Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: qt 4.8.1 and qdir entryInfoList problem

    W7 64bit & Qt 4.8.1 (mingw) works fine for me.

    Qt Code:
    1. int main(int argc, char *argv[])
    2. {
    3. QDir d( "C:/" );
    4.  
    5. QFileInfoList fl = d.entryInfoList( QDir::AllDirs | QDir::NoDotAndDotDot | QDir::NoSymLinks );
    6.  
    7. for( int i = 0; i < fl.size(); ++i )
    8. {
    9. qDebug() << fl.at( i ).absoluteFilePath();
    10. }
    11. }
    To copy to clipboard, switch view to plain text mode 

    Output:
    "C:/PerfLogs"
    "C:/Program Files"
    "C:/Program Files (x86)"
    "C:/QtSDK"
    "C:/Users"
    "C:/Windows"

  3. #3
    Join Date
    Jul 2009
    Posts
    10
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: qt 4.8.1 and qdir entryInfoList problem

    Thanks for your time
    this works for me too when i run it in QtCreator (mingw)
    but when i test it with vs2010 it doesnt work for me
    although the same code works with vs2008 and qt 4.7.4

    Do you know if there is a different between those two versions?
    or if the problem is with my vs envarioment?
    Last edited by moti.lahiani; 18th April 2012 at 08:58.

  4. #4
    Join Date
    Sep 2011
    Location
    Manchester
    Posts
    538
    Thanks
    3
    Thanked 106 Times in 103 Posts
    Qt products
    Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: qt 4.8.1 and qdir entryInfoList problem

    It may be that new vs is using different compiler and that causes some wieird binary incompatibility issue, but I don't know much more, I haven't used msvs in a long time now.

    Maybe someone with msvs could shine some light on this?

Similar Threads

  1. Problem with QDir::cdUp()
    By nuntawat in forum Qt Programming
    Replies: 1
    Last Post: 29th March 2010, 01:15
  2. QDir entryInfoList and NoDotAndDotDot filter
    By invictus in forum Qt Programming
    Replies: 1
    Last Post: 26th February 2009, 06:27
  3. QDir Path problem
    By ToddAtWSU in forum Qt Programming
    Replies: 3
    Last Post: 21st August 2008, 12:15
  4. QDir Subclassing
    By Oleg in forum Qt Programming
    Replies: 9
    Last Post: 31st October 2007, 12:03
  5. Is it me or QDir?
    By Morea in forum Qt Programming
    Replies: 1
    Last Post: 29th June 2007, 23:06

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.