forked from qt-creator/qt-creator
FilePath: Fix operator+ to use stringAppend instead of pathAppended
Change-Id: I643a2e9eed22fafc793bbc75cba0344c4005b3f3 Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -969,7 +969,7 @@ bool FilePath::operator>=(const FilePath &other) const
|
||||
|
||||
FilePath FilePath::operator+(const QString &s) const
|
||||
{
|
||||
return pathAppended(s);
|
||||
return stringAppended(s);
|
||||
}
|
||||
|
||||
/// \returns whether FilePath is a child of \a s
|
||||
@@ -1277,9 +1277,7 @@ FilePath FilePath::pathAppended(const QString &path) const
|
||||
|
||||
FilePath FilePath::stringAppended(const QString &str) const
|
||||
{
|
||||
FilePath fn = *this;
|
||||
fn.m_path.append(str);
|
||||
return fn;
|
||||
return FilePath::fromString(toString() + str);
|
||||
}
|
||||
|
||||
size_t FilePath::hash(uint seed) const
|
||||
|
||||
Reference in New Issue
Block a user