Core: Avoid copy in IDocument::filePath()

Change-Id: I40d5ebc73856e85e36080b94e071edef15242666
Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
This commit is contained in:
Orgad Shaneh
2015-02-27 12:59:35 +02:00
committed by Orgad Shaneh
parent a5c0b56832
commit c273a47dcb
2 changed files with 2 additions and 2 deletions

View File

@@ -129,7 +129,7 @@ bool IDocument::setContents(const QByteArray &contents)
return false;
}
Utils::FileName IDocument::filePath() const
const Utils::FileName &IDocument::filePath() const
{
return d->filePath;
}

View File

@@ -89,7 +89,7 @@ public:
virtual bool save(QString *errorString, const QString &fileName = QString(), bool autoSave = false) = 0;
virtual bool setContents(const QByteArray &contents);
Utils::FileName filePath() const;
const Utils::FileName &filePath() const;
virtual void setFilePath(const Utils::FileName &filePath);
QString displayName() const;
void setPreferredDisplayName(const QString &name);