forked from qt-creator/qt-creator
Also use file renaming workaround for Qt5.
QTBUG-3570 doesn't look like being fixed in Qt5. Change-Id: Icddcd0e98899c9a8ac01b99783bb9450dcbe952b Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
This commit is contained in:
@@ -193,12 +193,10 @@ void FileUtils::removeFile(const QString &filePath, bool deleteFromFS)
|
||||
static inline bool fileSystemRenameFile(const QString &orgFilePath,
|
||||
const QString &newFilePath)
|
||||
{
|
||||
#if QT_VERSION < 0x050000 // ### fixme: QTBUG-3570 might be fixed in Qt 5?
|
||||
QFile f(orgFilePath); // Due to QTBUG-3570
|
||||
QAbstractFileEngine *fileEngine = f.fileEngine();
|
||||
if (!fileEngine->caseSensitive() && orgFilePath.compare(newFilePath, Qt::CaseInsensitive) == 0)
|
||||
return fileEngine->rename(newFilePath);
|
||||
#endif
|
||||
return QFile::rename(orgFilePath, newFilePath);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user