Details
-
Bug
-
Resolution: Invalid
-
Not Evaluated
-
None
-
5.12.3
-
None
Description
copy function of QFile don't support to overwrite an exist file. But in most cases, we need to copy an file to overwrite an exist file. This is an essential function of QFile.
[static] bool QFile::copy(const QString &fileName, const QString &newName)
This is an overloaded function.
Copies the file fileName to newName. Returns true if successful; otherwise returns false.
If a file with the name newName already exists, copy() returns false (i.e., QFile will not overwrite it).