summaryrefslogtreecommitdiffstats
path: root/src/corelib/io/qdiriterator.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/io/qdiriterator.cpp')
-rw-r--r--src/corelib/io/qdiriterator.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/corelib/io/qdiriterator.cpp b/src/corelib/io/qdiriterator.cpp
index 56912e8706..67ea1c9538 100644
--- a/src/corelib/io/qdiriterator.cpp
+++ b/src/corelib/io/qdiriterator.cpp
@@ -55,7 +55,7 @@
argument. After construction, the iterator is located before the first
directory entry. Here's how to iterate over all the entries sequentially:
- \snippet doc/src/snippets/code/src_corelib_io_qdiriterator.cpp 0
+ \snippet code/src_corelib_io_qdiriterator.cpp 0
The next() function returns the path to the next directory entry and
advances the iterator. You can also call filePath() to get the current
@@ -338,7 +338,8 @@ bool QDirIteratorPrivate::matchesFilters(const QString &fileName, const QFileInf
end = nameRegExps.constEnd();
iter != end; ++iter) {
- if (iter->exactMatch(fileName)) {
+ QRegExp copy = *iter;
+ if (copy.exactMatch(fileName)) {
matched = true;
break;
}