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

@@ -68,7 +68,7 @@ Core::IDocument::OpenResult SubmitEditorFile::open(QString *errorString, const Q
if (!m_editor->setFileContents(text.toUtf8()))
return OpenResult::CannotHandle;
setFilePath(FileName::fromString(fileName));
setFilePath(FilePath::fromString(fileName));
setModified(fileName != realFileName);
return OpenResult::Success;
}
@@ -93,7 +93,7 @@ void SubmitEditorFile::setModified(bool modified)
bool SubmitEditorFile::save(QString *errorString, const QString &fileName, bool autoSave)
{
const FileName fName = fileName.isEmpty() ? filePath() : FileName::fromString(fileName);
const FilePath fName = fileName.isEmpty() ? filePath() : FilePath::fromString(fileName);
FileSaver saver(fName.toString(),
QIODevice::WriteOnly | QIODevice::Truncate | QIODevice::Text);
saver.write(m_editor->fileContents());
@@ -101,7 +101,7 @@ bool SubmitEditorFile::save(QString *errorString, const QString &fileName, bool
return false;
if (autoSave)
return true;
setFilePath(FileName::fromUserInput(fName.toFileInfo().absoluteFilePath()));
setFilePath(FilePath::fromUserInput(fName.toFileInfo().absoluteFilePath()));
setModified(false);
if (!errorString->isEmpty())
return false;