forked from qt-creator/qt-creator
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user