Results 1 to 3 of 3

Thread: Qt4: QDir::entryList bug in windows when listing network files?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Apr 2006
    Posts
    2
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Qt4: QDir::entryList bug in windows when listing network files?

    Hi,

    No that's not it because I don't specify the path myself, I only use the currentPath.

    Here is a little example of the problem. It tries to find all the xml files from the directory where it is started from. It works fine on hard disk drive like C: , but not from networked drives.

    int main(int argc, char** argv)
    {
    QApplication a(argc, argv);

    QDir dir;
    QStringList xml_filters;
    xml_filters << "*.xml";

    QStringList xml_files = dir.entryList(xml_filters, QDir::Files | QDir::Readable);

    if (xml_files.count() == 0) {
    QMessageBox::critical(0, "Error", "Cannot find any xml file",
    QMessageBox::Ok, QMessageBox::NoButton);
    return 1;
    }
    else {
    QMessageBox::information(0, "Ok", QString("Found %1 xml files.").arg(xml_files.count()),
    QMessageBox::Ok, QMessageBox::NoButton);
    }
    return 0;
    }

    Is this a bug? Am I missing something?

    Yvon
    Attached Files Attached Files

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
  •  
Qt is a trademark of The Qt Company.