summaryrefslogtreecommitdiffstats
path: root/src/corelib
diff options
context:
space:
mode:
authorThomas Zander <t.zander@nokia.com>2010-09-16 13:46:23 (GMT)
committerThomas Zander <t.zander@nokia.com>2010-09-16 14:00:20 (GMT)
commit61ffabaf55f4130114ede74f90ae820bebbfa84a (patch)
tree85e676c73f1082a25e5b8b8aae4a317e8b9d9c32 /src/corelib
parentdb701aac50cf0e60d64697743331b437630e1d51 (diff)
downloadQt-61ffabaf55f4130114ede74f90ae820bebbfa84a.zip
Qt-61ffabaf55f4130114ede74f90ae820bebbfa84a.tar.gz
Qt-61ffabaf55f4130114ede74f90ae820bebbfa84a.tar.bz2
Restore 4.7.0 behavior that non-existing paths are possible.
Changing a relative path to a non-existing absolute path used to work, this should work again after this patch. Reviewed-by: João Abecasis
Diffstat (limited to 'src/corelib')
-rw-r--r--src/corelib/io/qdir.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/corelib/io/qdir.cpp b/src/corelib/io/qdir.cpp
index fcd17f7..efcc8f9 100644
--- a/src/corelib/io/qdir.cpp
+++ b/src/corelib/io/qdir.cpp
@@ -1550,10 +1550,11 @@ bool QDir::makeAbsolute() // ### What do the return values signify?
QScopedPointer<QDirPrivate> dir(new QDirPrivate(*d_ptr.constData()));
dir->setPath(absolutePath);
- if (!(dir->fileEngine->fileFlags(QAbstractFileEngine::TypesMask) & QAbstractFileEngine::DirectoryType))
+ d_ptr = dir.take();
+
+ if (!(d_ptr->fileEngine->fileFlags(QAbstractFileEngine::TypesMask) & QAbstractFileEngine::DirectoryType))
return false;
- d_ptr = dir.take();
return true;
}