forked from qt-creator/qt-creator
QmlProject: Resolve import paths relative to target directory
On desktop the target directory is the same as the source directory. On remote devices, it can be different. We need to resolve when we know where to deploy. Change-Id: I3f2bc088476ae73dac5231cb24f277c055f7d044 Task-number: QTCREATORBUG-19888 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io> Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This commit is contained in:
@@ -47,8 +47,6 @@ void QmlProjectItem::setSourceDirectory(const QString &directoryPath)
|
||||
this, &QmlProjectItem::qmlFilesChanged);
|
||||
}
|
||||
}
|
||||
|
||||
setImportPaths(m_importPaths);
|
||||
}
|
||||
|
||||
void QmlProjectItem::setTargetDirectory(const QString &directoryPath)
|
||||
@@ -60,17 +58,6 @@ void QmlProjectItem::setImportPaths(const QStringList &importPaths)
|
||||
{
|
||||
if (m_importPaths != importPaths)
|
||||
m_importPaths = importPaths;
|
||||
|
||||
// convert to absolute paths
|
||||
QStringList absoluteImportPaths;
|
||||
const QDir sourceDir(sourceDirectory());
|
||||
foreach (const QString &importPath, importPaths)
|
||||
absoluteImportPaths += QDir::cleanPath(sourceDir.absoluteFilePath(importPath));
|
||||
|
||||
if (m_absoluteImportPaths == absoluteImportPaths)
|
||||
return;
|
||||
|
||||
m_absoluteImportPaths = absoluteImportPaths;
|
||||
}
|
||||
|
||||
/* Returns list of absolute paths */
|
||||
|
||||
Reference in New Issue
Block a user