Do not use QDir::separator() for internal paths

Internal paths are supposed to be normalized

Change-Id: Ic6943ce13ad389dfdb44054a9e6f03da8c6cd88d
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
This commit is contained in:
Orgad Shaneh
2015-01-31 22:11:11 +02:00
committed by Orgad Shaneh
parent 704f3d539b
commit 1bcfa137a3
12 changed files with 23 additions and 27 deletions

View File

@@ -914,13 +914,10 @@ bool QmlJSCompletionAssistProcessor::completeFileName(const QString &relativeBas
{
const QFileInfo fileInfo(fileName);
QString directoryPrefix;
if (fileInfo.isRelative()) {
directoryPrefix = relativeBasePath;
directoryPrefix += QDir::separator();
directoryPrefix += fileInfo.path();
} else {
if (fileInfo.isRelative())
directoryPrefix = relativeBasePath + QLatin1Char('/') + fileInfo.path();
else
directoryPrefix = fileInfo.path();
}
if (!QFileInfo::exists(directoryPrefix))
return false;