Utils::FileName: Fix append("") appending a '/'

Change-Id: I2767a901220711dbba6b34c36e256d282f468778
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
This commit is contained in:
Daniel Teske
2014-11-06 17:03:21 +01:00
committed by Daniel Teske
parent 1ce60cb31d
commit 21638efe9d

View File

@@ -701,6 +701,8 @@ FileName FileName::relativeChildPath(const FileName &parent) const
/// Appends \a s, ensuring a / between the parts
FileName &FileName::appendPath(const QString &s)
{
if (s.isEmpty())
return *this;
if (!isEmpty() && !QString::endsWith(QLatin1Char('/')))
appendString(QLatin1Char('/'));
appendString(s);