summaryrefslogtreecommitdiffstats
path: root/src/corelib/io
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-09-07 12:17:05 (GMT)
commit659c4d56a075c1f49ece99be38d7e436b2c53581 (patch)
tree506bb4df8a4e831f3fadcda853391064ee0ae017 /src/corelib/io
parent4c88ffbbf0de319bcb4aef54be3997bb41a08100 (diff)
downloadQt-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')
-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 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;