diff options
author | João Abecasis <joao@abecasis.name> | 2009-07-22 10:59:00 (GMT) |
---|---|---|
committer | João Abecasis <joao@abecasis.name> | 2009-07-22 12:36:18 (GMT) |
commit | 8e743bc5e4d697d3204a8d7d861afe81927af3ab (patch) | |
tree | bd19c08ab6ab39818dbf250e6c828753d7438528 | |
parent | 023f285c3ac8ea71aa8d4662242b41fb82fb7896 (diff) | |
download | Qt-8e743bc5e4d697d3204a8d7d861afe81927af3ab.zip Qt-8e743bc5e4d697d3204a8d7d861afe81927af3ab.tar.gz Qt-8e743bc5e4d697d3204a8d7d861afe81927af3ab.tar.bz2 |
Don't hide errors in QDirIterator
Empty filenames should only show up from bugs in file engine iterators's
hasNext() function. We shouldn't try to hide those here.
Reviewed-by: Olivier Goffart
-rw-r--r-- | src/corelib/io/qdiriterator.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/corelib/io/qdiriterator.cpp b/src/corelib/io/qdiriterator.cpp index 9dda4f6..3bfea65 100644 --- a/src/corelib/io/qdiriterator.cpp +++ b/src/corelib/io/qdiriterator.cpp @@ -269,10 +269,7 @@ void QDirIteratorPrivate::checkAndPushDirectory(const QFileInfo &fileInfo) */ bool QDirIteratorPrivate::matchesFilters(const QString &fileName, const QFileInfo &fi) const { - if (fileName.isEmpty()) { - // invalid entry - return false; - } + Q_ASSERT(!fileName.isEmpty()); // filter . and ..? const int fileNameSize = fileName.size(); |