diff options
author | João Abecasis <joao.abecasis@nokia.com> | 2010-08-25 13:25:22 (GMT) |
---|---|---|
committer | João Abecasis <joao.abecasis@nokia.com> | 2010-09-07 12:17:03 (GMT) |
commit | 1885c88c5721f026d3b0c01dbc756857a79cce91 (patch) | |
tree | eb4247669b34a9ed87e83943b911454aaec95975 /src/corelib/io | |
parent | 148eb83d1468fd3d5a14199e2186c0792a58ed9b (diff) | |
download | Qt-1885c88c5721f026d3b0c01dbc756857a79cce91.zip Qt-1885c88c5721f026d3b0c01dbc756857a79cce91.tar.gz Qt-1885c88c5721f026d3b0c01dbc756857a79cce91.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/corelib/io')
-rw-r--r-- | src/corelib/io/qdir.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/corelib/io/qdir.cpp b/src/corelib/io/qdir.cpp index 3ab0e08..7c38ecf 100644 --- a/src/corelib/io/qdir.cpp +++ b/src/corelib/io/qdir.cpp @@ -2268,8 +2268,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); } /*! |