forked from qt-creator/qt-creator
QmlJS: Don't use QDir::separator() for internal paths
We use forward slashes in all internal paths, even on Windows. Change-Id: Ie0b418c770dad96829dd357fe425616b6d3a5b82 Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
This commit is contained in:
@@ -2185,7 +2185,7 @@ ImportInfo ImportInfo::moduleImport(QString uri, ComponentVersion version,
|
||||
info.m_type = ImportType::Library;
|
||||
info.m_name = uri;
|
||||
info.m_path = uri;
|
||||
info.m_path.replace(QLatin1Char('.'), QDir::separator());
|
||||
info.m_path.replace(QLatin1Char('.'), QLatin1Char('/'));
|
||||
info.m_version = version;
|
||||
info.m_as = as;
|
||||
info.m_ast = ast;
|
||||
@@ -2200,7 +2200,7 @@ ImportInfo ImportInfo::pathImport(const QString &docPath, const QString &path,
|
||||
|
||||
QFileInfo importFileInfo(path);
|
||||
if (!importFileInfo.isAbsolute())
|
||||
importFileInfo = QFileInfo(docPath + QDir::separator() + path);
|
||||
importFileInfo = QFileInfo(docPath + QLatin1Char('/') + path);
|
||||
info.m_path = importFileInfo.absoluteFilePath();
|
||||
|
||||
if (importFileInfo.isFile()) {
|
||||
|
||||
Reference in New Issue
Block a user