forked from qt-creator/qt-creator
Utils: Re-add some safety net in FilePath::setPath()
Amends c08317b5a6
Change-Id: I3b9bc61346aa60280beb3b29c33c0f76017e407a
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -877,11 +877,22 @@ void FilePath::setPath(QStringView path)
|
||||
setParts(scheme(), host(), path);
|
||||
}
|
||||
|
||||
void FilePath::setFromString(const QStringView fileNameView)
|
||||
void FilePath::setFromString(QStringView fileNameView)
|
||||
{
|
||||
static const QStringView qtcDevSlash(u"__qtc_devices__/");
|
||||
static const QStringView colonSlashSlash(u"://");
|
||||
|
||||
#if 1
|
||||
// FIXME: Remove below once the calling code is adjusted
|
||||
QString dummy;
|
||||
if (fileNameView.contains(u'\\')) {
|
||||
QTC_CHECK(false);
|
||||
dummy = fileNameView.toString();
|
||||
dummy.replace('\\', '/');
|
||||
fileNameView = dummy;
|
||||
}
|
||||
#endif
|
||||
|
||||
const QChar slash('/');
|
||||
|
||||
bool startsWithQtcSlashDev = false;
|
||||
|
Reference in New Issue
Block a user