Merge remote-tracking branch 'origin/5.0'

Conflicts:
	src/plugins/coreplugin/locator/executefilter.cpp

Change-Id: Iff5b82a9e491b782e4720138904f389d318b005c
This commit is contained in:
Eike Ziller
2021-08-11 10:10:51 +02:00
104 changed files with 1405 additions and 552 deletions

View File

@@ -983,6 +983,15 @@ bool FilePath::endsWith(const QString &s) const
return m_data.endsWith(s, caseSensitivity());
}
/// \returns whether FilePath starts with a drive letter
/// \note defaults to \c false if it is a non-Windows host or represents a path on device
bool FilePath::startsWithDriveLetter() const
{
if (needsDevice() || !HostOsInfo::isWindowsHost())
return false;
return m_data.length() >= 2 && m_data.at(0).isLetter() && m_data.at(1) == ':';
}
/// \returns the relativeChildPath of FilePath to parent if FilePath is a child of parent
/// \note returns a empty FilePath if FilePath is not a child of parent
/// That is, this never returns a path starting with "../"