Merge remote-tracking branch 'origin/5.0'

Change-Id: I370268624bd6e91e7b44fa236e913f5f55867e17
This commit is contained in:
Eike Ziller
2021-08-20 09:50:30 +02:00
28 changed files with 174 additions and 154 deletions

View File

@@ -1196,9 +1196,24 @@ FilePath FilePath::pathAppended(const QString &path) const
FilePath fn = *this;
if (path.isEmpty())
return fn;
if (!fn.m_data.isEmpty() && !fn.m_data.endsWith(QLatin1Char('/')))
fn.m_data.append('/');
fn.m_data.append(path);
if (fn.m_data.isEmpty()) {
fn.m_data = path;
return fn;
}
if (fn.m_data.endsWith('/')) {
if (path.startsWith('/'))
fn.m_data.append(path.mid(1));
else
fn.m_data.append(path);
} else {
if (path.startsWith('/'))
fn.m_data.append(path);
else
fn.m_data.append('/').append(path);
}
return fn;
}