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:
Marcus Tillmanns
2022-08-16 09:47:23 +02:00
parent 91d568180d
commit 4f0ac5678f
2 changed files with 18 additions and 12 deletions

View File

@@ -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