Commit 73616849 authored by Orgad Shaneh's avatar Orgad Shaneh Committed by Orgad Shaneh
Browse files

Utils: Avoid copy on FileName::toString()

Takes ~6% of project loading

Change-Id: Id277f6cc9d5666b9a383419959cfd37b936437f8
Reviewed-by: default avatarDaniel Teske <>
parent 25096de5
......@@ -548,9 +548,9 @@ QFileInfo FileName::toFileInfo() const
/// \returns a QString for passing on to QString based APIs
QString FileName::toString() const
const QString &FileName::toString() const
return QString(*this);
return *this;
/// \returns a QString to display to the user
......@@ -71,7 +71,7 @@ public:
static FileName fromLatin1(const QByteArray &filename);
static FileName fromUserInput(const QString &filename);
static FileName fromUtf8(const char *filename, int filenameSize = -1);
QString toString() const;
const QString &toString() const;
QString toUserOutput() const;
QString fileName(int pathComponents = 0) const;
bool exists() const;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment