diff options
author | Tim Jenssen <tim.jenssen@qt.io> | 2023-06-07 19:29:21 +0200 |
---|---|---|
committer | Tim Jenssen <tim.jenssen@qt.io> | 2023-06-07 18:04:31 +0000 |
commit | b5cadd63e6a7a13e7ec5cc5ada5302a7eff33d45 (patch) | |
tree | 5d647f539f147a222bd714ee49f313dc57b49a0a | |
parent | 5d8bbe6f5dd8d5e4a1adddfd693c686fe5f719fc (diff) |
QmlProjectManager: fix import FilePath
Deployment was not working for subdirectories.
Path was not correct in projectInfo.importPaths.maybeInsert.
Change-Id: I4fd8a08ef6182c52963d6d76a700f4687abd9730
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
-rw-r--r-- | src/plugins/qmlprojectmanager/buildsystem/qmlbuildsystem.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/plugins/qmlprojectmanager/buildsystem/qmlbuildsystem.cpp b/src/plugins/qmlprojectmanager/buildsystem/qmlbuildsystem.cpp index 559bdeb198..20052b45e4 100644 --- a/src/plugins/qmlprojectmanager/buildsystem/qmlbuildsystem.cpp +++ b/src/plugins/qmlprojectmanager/buildsystem/qmlbuildsystem.cpp @@ -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); } |