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-09-07 12:17:05 (GMT) |
commit | 659c4d56a075c1f49ece99be38d7e436b2c53581 (patch) | |
tree | 506bb4df8a4e831f3fadcda853391064ee0ae017 /src/corelib/io/qdir.cpp | |
parent | 4c88ffbbf0de319bcb4aef54be3997bb41a08100 (diff) | |
download | Qt-659c4d56a075c1f49ece99be38d7e436b2c53581.zip Qt-659c4d56a075c1f49ece99be38d7e436b2c53581.tar.gz Qt-659c4d56a075c1f49ece99be38d7e436b2c53581.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 5ae54fc..c797ee8 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; |