Utils: Rename FileName to FilePath

More in line with QFileInfo terminonlogy which appears to be
best-of-breed within Qt.

Change-Id: I1d051ff1c8363ebd4ee56376451df45216c4c9ab
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
hjk
2019-05-28 13:49:26 +02:00
parent 4704f49fbb
commit 473a741c9f
688 changed files with 3487 additions and 3484 deletions

View File

@@ -196,7 +196,7 @@ QString DesignDocument::simplfiedDisplayName() const
return rootModelNode().simplifiedTypeName();
}
void DesignDocument::updateFileName(const Utils::FileName & /*oldFileName*/, const Utils::FileName &newFileName)
void DesignDocument::updateFileName(const Utils::FilePath & /*oldFileName*/, const Utils::FilePath &newFileName)
{
if (m_documentModel)
m_documentModel->setFileUrl(QUrl::fromLocalFile(newFileName.toString()));
@@ -209,11 +209,11 @@ void DesignDocument::updateFileName(const Utils::FileName & /*oldFileName*/, con
emit displayNameChanged(displayName());
}
Utils::FileName DesignDocument::fileName() const
Utils::FilePath DesignDocument::fileName() const
{
if (editor())
return editor()->document()->filePath();
return Utils::FileName();
return Utils::FilePath();
}
Kit *DesignDocument::currentKit() const
@@ -250,7 +250,7 @@ void DesignDocument::loadDocument(QPlainTextEdit *edit)
m_inFileComponentTextModifier.reset();
updateFileName(Utils::FileName(), fileName());
updateFileName(Utils::FilePath(), fileName());
updateQrcFiles();
@@ -287,7 +287,7 @@ void DesignDocument::updateQrcFiles()
ProjectExplorer::Project *currentProject = ProjectExplorer::SessionManager::projectForFile(fileName());
if (currentProject) {
for (const Utils::FileName &fileName : currentProject->files(ProjectExplorer::Project::SourceFiles)) {
for (const Utils::FilePath &fileName : currentProject->files(ProjectExplorer::Project::SourceFiles)) {
if (fileName.endsWith(".qrc"))
QmlJS::ModelManagerInterface::instance()->updateQrcFile(fileName.toString());
}