summaryrefslogtreecommitdiffstats
path: root/src/corelib/io/qdir.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/io/qdir.cpp')
-rw-r--r--src/corelib/io/qdir.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/corelib/io/qdir.cpp b/src/corelib/io/qdir.cpp
index 250e5e5..f5d803e 100644
--- a/src/corelib/io/qdir.cpp
+++ b/src/corelib/io/qdir.cpp
@@ -960,7 +960,7 @@ void QDir::setNameFilters(const QStringList &nameFilters)
{
Q_D(QDir);
- d->detach();
+ d->reset();
d->data->nameFilters = nameFilters;
}
@@ -1146,7 +1146,7 @@ void QDir::setFilter(Filters filters)
{
Q_D(QDir);
- d->detach();
+ d->reset();
d->data->filters = filters;
}
@@ -1204,7 +1204,7 @@ void QDir::setSorting(SortFlags sort)
{
Q_D(QDir);
- d->detach();
+ d->reset();
d->data->sort = sort;
}
@@ -2155,7 +2155,7 @@ void QDir::refresh() const
{
Q_D(const QDir);
- d->data->clear();
+ const_cast<QDirPrivate *>(d)->reset();
}
/*!
@@ -2244,6 +2244,8 @@ bool QDir::matchAllDirs() const
void QDir::setMatchAllDirs(bool on)
{
Q_D(QDir);
+
+ d->reset();
d->matchAllDirs = on;
}