QmlProjectExporter: quick crash fix if qmldir is outside of the project

Task-number: QDS-15523
Change-Id: I5b27808752fa38e6a46ff01f8feb03079bed5a68
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
Tim Jenssen
2025-06-05 17:46:13 +02:00
parent 97a649deca
commit 5f6aafc224

View File

@@ -194,6 +194,8 @@ bool CMakeGenerator::checkUri(const QString& uri, const Utils::FilePath &path) c
Utils::FilePath relative = path.relativeChildPath(m_root->dir);
QList<QStringView> pathComponents = relative.pathView().split('/', Qt::SkipEmptyParts);
if (pathComponents.isEmpty())
return false;
for (const auto& import : buildSystem()->allImports()) {
Utils::FilePath importPath = Utils::FilePath::fromUserInput(import);