From 67cf8bf9a8e6e583e9da02b153e8fdbe558637cb Mon Sep 17 00:00:00 2001 From: Tasuku Suzuki Date: Fri, 28 Jun 2013 01:57:10 +0900 Subject: Make qtbase compile with QT_NO_TEMPORARYFILE Change-Id: I0211ed44513723392e3f50b76be10b95c0bcddd5 Reviewed-by: Oswald Buddenhagen --- src/corelib/io/qfile.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/corelib') 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(); -- cgit v1.2.3