forked from qt-creator/qt-creator
Utils: Implement FilePath::rename()
And uses it in CMake's fileapi reader. Change-Id: I9e719aa4b253eaca17c6b304eab5e7268fcfab29 Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -311,8 +311,7 @@ void FileApiReader::makeBackupConfiguration(bool store)
|
||||
if (reply.exists()) {
|
||||
if (replyPrev.exists())
|
||||
FileUtils::removeRecursively(replyPrev);
|
||||
QDir dir;
|
||||
if (!dir.rename(reply.toString(), replyPrev.toString()))
|
||||
if (!reply.renameFile(replyPrev))
|
||||
Core::MessageManager::writeFlashing(tr("Failed to rename %1 to %2.")
|
||||
.arg(reply.toString(), replyPrev.toString()));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user