diff options
author | David Faure <faure@kde.org> | 2012-02-18 16:00:09 +0100 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-02-18 22:19:43 +0100 |
commit | b164911b7f0efd81ec33325405b88bff8b2334d0 (patch) | |
tree | ea4c2eb39f3ae8edb90b8255ffe3ee1b14806ab7 /tests/auto/corelib/io/qdiriterator | |
parent | 87fcbd82fc679715853e5261f8f0194a80c10b76 (diff) |
Import QMimeType / QMimeDatabase into QtCore.
History of the development before the import:
ssh://codereview.qt-project.org/playground/mimetypes.git
Mimetype definitions come from shared-mime-info where available (UNIX systems),
loaded using a mmap'ed binary cache generated by update-mime-database.
As a fallback if no cache is found, we parse the raw XML files otherwise.
This makes the MIME type support fast and with very low memory usage on UNIX,
and it makes it easy to use on Windows (no dependency on shared-mime-info,
Qt even includes a freedesktop.xml file to use if none are found on the system).
Change-Id: I27b05008216ff936dc463bd80d3893422bfb940e
Reviewed-by: Richard J. Moore <rich@kde.org>
Diffstat (limited to 'tests/auto/corelib/io/qdiriterator')
-rw-r--r-- | tests/auto/corelib/io/qdiriterator/tst_qdiriterator.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/tests/auto/corelib/io/qdiriterator/tst_qdiriterator.cpp b/tests/auto/corelib/io/qdiriterator/tst_qdiriterator.cpp index ad61db51d6..d5d490dc29 100644 --- a/tests/auto/corelib/io/qdiriterator/tst_qdiriterator.cpp +++ b/tests/auto/corelib/io/qdiriterator/tst_qdiriterator.cpp @@ -403,8 +403,11 @@ void tst_QDirIterator::iterateResource() QDirIterator it(dirName, nameFilters, filters, flags); QStringList list; - while (it.hasNext()) - list << it.next(); + while (it.hasNext()) { + const QString dir = it.next(); + if (!dir.startsWith(":/qt-project.org")) + list << dir; + } list.sort(); QStringList sortedEntries = entries; |