forked from qt-creator/qt-creator
QmlProjectManager: fix import FilePath
Deployment was not working for subdirectories. Path was not correct in projectInfo.importPaths.maybeInsert. Change-Id: I4fd8a08ef6182c52963d6d76a700f4687abd9730 Reviewed-by: Marco Bubke <marco.bubke@qt.io>
This commit is contained in:
@@ -107,8 +107,9 @@ void QmlBuildSystem::updateDeploymentData()
|
||||
}
|
||||
|
||||
ProjectExplorer::DeploymentData deploymentData;
|
||||
for (const auto &file : m_projectItem->files())
|
||||
deploymentData.addFile(file, m_projectItem->targetDirectory());
|
||||
for (const auto &file : m_projectItem->files()) {
|
||||
deploymentData.addFile(file, targetFile(file).parentDir().path());
|
||||
}
|
||||
|
||||
setDeploymentData(deploymentData);
|
||||
}
|
||||
@@ -187,7 +188,7 @@ void QmlBuildSystem::refresh(RefreshOptions options)
|
||||
project()->files(Project::HiddenRccFolders));
|
||||
|
||||
for (const QString &searchPath : customImportPaths()) {
|
||||
projectInfo.importPaths.maybeInsert(projectFilePath().pathAppended(searchPath),
|
||||
projectInfo.importPaths.maybeInsert(projectDirectory().pathAppended(searchPath),
|
||||
QmlJS::Dialect::Qml);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user