summaryrefslogtreecommitdiffstats
path: root/src/corelib/io/qdir.cpp
diff options
context:
space:
mode:
authorJoão Abecasis <joao.abecasis@nokia.com>2010-08-26 12:03:36 (GMT)
committerJoão Abecasis <joao.abecasis@nokia.com>2010-08-27 13:47:28 (GMT)
commiteeae8a7479cdb0b716b28ad502abed69dbf339b2 (patch)
tree4ca22c547c32654745e3fcdefca5bfb6f28b029f /src/corelib/io/qdir.cpp
parentfdec31a2e57c7da48be741c14bedaaff4b95e7af (diff)
downloadQt-eeae8a7479cdb0b716b28ad502abed69dbf339b2.zip
Qt-eeae8a7479cdb0b716b28ad502abed69dbf339b2.tar.gz
Qt-eeae8a7479cdb0b716b28ad502abed69dbf339b2.tar.bz2
Simplify QDir::cd
Copy constructing a QDir instance from this and then detaching it in setPath doesn't get us anything so we might as well do it all in one go. Reviewed-by: Prasanth Ullattil
Diffstat (limited to 'src/corelib/io/qdir.cpp')
-rw-r--r--src/corelib/io/qdir.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/corelib/io/qdir.cpp b/src/corelib/io/qdir.cpp
index 1da4f82..9ebfce5 100644
--- a/src/corelib/io/qdir.cpp
+++ b/src/corelib/io/qdir.cpp
@@ -896,8 +896,7 @@ bool QDir::cd(const QString &dirName)
}
}
- QDir dir(*this);
- dir.setPath(newPath);
+ QDir dir(newPath);
if (!dir.exists())
return false;