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:
Tim Jenssen
2023-06-07 19:29:21 +02:00
parent 5d0aab9eb3
commit f09598de43

View File

@@ -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);
}