forked from qt-creator/qt-creator
Utils: Use FilePath in copy helpers
Change-Id: I81b367a5851c0fbcdf45c63c5536c206845a8337 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -144,13 +144,12 @@ static bool removeRecursivelyLocal(const FilePath &filePath, QString *error)
|
||||
bool FileUtils::copyRecursively(const FilePath &srcFilePath, const FilePath &tgtFilePath, QString *error)
|
||||
{
|
||||
return copyRecursively(
|
||||
srcFilePath, tgtFilePath, error, [](const QFileInfo &src, const QFileInfo &dest, QString *error) {
|
||||
if (!QFile::copy(src.filePath(), dest.filePath())) {
|
||||
srcFilePath, tgtFilePath, error, [](const FilePath &src, const FilePath &dest, QString *error) {
|
||||
if (!src.copyFile(dest)) {
|
||||
if (error) {
|
||||
*error = QCoreApplication::translate("Utils::FileUtils",
|
||||
"Could not copy file \"%1\" to \"%2\".")
|
||||
.arg(FilePath::fromFileInfo(src).toUserOutput(),
|
||||
FilePath::fromFileInfo(dest).toUserOutput());
|
||||
.arg(src.toUserOutput(), dest.toUserOutput());
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user