diff options
author | João Abecasis <joao.abecasis@nokia.com> | 2010-08-26 12:03:36 (GMT) |
---|---|---|
committer | João Abecasis <joao.abecasis@nokia.com> | 2010-08-27 13:47:28 (GMT) |
commit | eeae8a7479cdb0b716b28ad502abed69dbf339b2 (patch) | |
tree | 4ca22c547c32654745e3fcdefca5bfb6f28b029f /src/corelib/io/qdir.cpp | |
parent | fdec31a2e57c7da48be741c14bedaaff4b95e7af (diff) | |
download | Qt-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.cpp | 3 |
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; |