Qt tries to be smart and emulate unix-like rename across directories on windows, e.g. when operating system rename fails it tries a copy/delete, but does not check completely for success on deleting the old file.
As a workaround I suggest to make your own function. Something along this should work (did not test myself though):
#include "qt_windows.h"
bool winRenameFile(const QString& aOldName, const QString& aNewName)
{
return MoveFile((LPWSTR)aOldName.utf16(), (LPWSTR)aNewName.utf16());
} // winRenameFile
#include "qt_windows.h"
bool winRenameFile(const QString& aOldName, const QString& aNewName)
{
return MoveFile((LPWSTR)aOldName.utf16(), (LPWSTR)aNewName.utf16());
} // winRenameFile
To copy to clipboard, switch view to plain text mode
Bookmarks