Core: filepathify file renaming

Change-Id: I3d4f39e34e65cde3df7b7c19570e3a54d0625d53
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
David Schulz
2021-06-11 14:34:34 +02:00
parent 55b91a7617
commit f66df921d7
32 changed files with 203 additions and 176 deletions

View File

@@ -823,19 +823,19 @@ bool FolderNode::deleteFiles(const QStringList &filePaths)
return false;
}
bool FolderNode::canRenameFile(const QString &filePath, const QString &newFilePath)
bool FolderNode::canRenameFile(const Utils::FilePath &oldFilePath, const Utils::FilePath &newFilePath)
{
ProjectNode *pn = managingProject();
if (pn)
return pn->canRenameFile(filePath, newFilePath);
return pn->canRenameFile(oldFilePath, newFilePath);
return false;
}
bool FolderNode::renameFile(const QString &filePath, const QString &newFilePath)
bool FolderNode::renameFile(const Utils::FilePath &oldFilePath, const Utils::FilePath &newFilePath)
{
ProjectNode *pn = managingProject();
if (pn)
return pn->renameFile(filePath, newFilePath);
return pn->renameFile(oldFilePath, newFilePath);
return false;
}
@@ -965,17 +965,17 @@ bool ProjectNode::deleteFiles(const QStringList &filePaths)
return false;
}
bool ProjectNode::canRenameFile(const QString &filePath, const QString &newFilePath)
bool ProjectNode::canRenameFile(const Utils::FilePath &oldFilePath, const Utils::FilePath &newFilePath)
{
if (BuildSystem *bs = buildSystem())
return bs->canRenameFile(this, filePath, newFilePath);
return bs->canRenameFile(this, oldFilePath, newFilePath);
return true;
}
bool ProjectNode::renameFile(const QString &filePath, const QString &newFilePath)
bool ProjectNode::renameFile(const Utils::FilePath &oldFilePath, const Utils::FilePath &newFilePath)
{
if (BuildSystem *bs = buildSystem())
return bs->renameFile(this, filePath, newFilePath);
return bs->renameFile(this, oldFilePath, newFilePath);
return false;
}