summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJoão Abecasis <joao.abecasis@nokia.com>2010-08-25 13:25:22 (GMT)
committerJoão Abecasis <joao.abecasis@nokia.com>2010-08-25 14:38:16 (GMT)
commit1218e1ecfee17aec798d73e469fea292b93f2246 (patch)
treea5180dd836f48ed7d5795d8fb692586d0a7f6e06 /src
parent72b00f0b6285aed47009067be4d92869d128856e (diff)
downloadQt-1218e1ecfee17aec798d73e469fea292b93f2246.zip
Qt-1218e1ecfee17aec798d73e469fea292b93f2246.tar.gz
Qt-1218e1ecfee17aec798d73e469fea292b93f2246.tar.bz2
QDirPrivate refactoring
While refactoring, a bug was introduced where shared data would be updated before detaching in setNameFilter. Further refactoring turned this into a double-detach, instead. Now the issue is fixed by adding the appropriate initFileEngine and nameFilters assignment, instead of calling setNameFilters to finish the job. Reviewed-by: Thomas Zander
Diffstat (limited to 'src')
-rw-r--r--src/corelib/io/qdir.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/corelib/io/qdir.cpp b/src/corelib/io/qdir.cpp
index a88b284..64eea23 100644
--- a/src/corelib/io/qdir.cpp
+++ b/src/corelib/io/qdir.cpp
@@ -2269,8 +2269,10 @@ QString QDir::nameFilter() const
void QDir::setNameFilter(const QString &nameFilter)
{
Q_D(QDir);
+ d->initFileEngine();
+
d->filterSepChar = QDirPrivate::getFilterSepChar(nameFilter);
- setNameFilters(QDirPrivate::splitFilters(nameFilter, d->filterSepChar));
+ d->nameFilters = QDirPrivate::splitFilters(nameFilter, d->filterSepChar);
}
/*!