diff options
author | Tasuku Suzuki <stasuku@gmail.com> | 2013-06-28 01:57:10 +0900 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-01-10 21:57:34 +0100 |
commit | 67cf8bf9a8e6e583e9da02b153e8fdbe558637cb (patch) | |
tree | cf173db4c5fb396f849e2c7730d8ceb64c612817 /src | |
parent | f568e43e107ba909eaad300729ee93354b0a1846 (diff) |
Make qtbase compile with QT_NO_TEMPORARYFILE
Change-Id: I0211ed44513723392e3f50b76be10b95c0bcddd5
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/corelib/io/qfile.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/corelib/io/qfile.cpp b/src/corelib/io/qfile.cpp index 519ac009aa..82aee331c5 100644 --- a/src/corelib/io/qfile.cpp +++ b/src/corelib/io/qfile.cpp @@ -571,6 +571,8 @@ QFile::rename(const QString &newName) d->setError(QFile::RenameError, tr("Destination file exists")); return false; } +#ifndef QT_NO_TEMPORARYFILE + // This #ifndef disables the workaround it encloses. Therefore, this configuration is not recommended. #ifdef Q_OS_LINUX // rename() on Linux simply does nothing when renaming "foo" to "Foo" on a case-insensitive // FS, such as FAT32. Move the file away and rename in 2 steps to work around. @@ -598,7 +600,8 @@ QFile::rename(const QString &newName) arg(QDir::toNativeSeparators(tempFile.fileName()), tempFile.errorString())); } return false; -#endif +#endif // Q_OS_LINUX +#endif // QT_NO_TEMPORARYFILE } unsetError(); close(); |