forked from qt-creator/qt-creator
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:
@@ -194,6 +194,8 @@ bool CMakeGenerator::checkUri(const QString& uri, const Utils::FilePath &path) c
|
|||||||
|
|
||||||
Utils::FilePath relative = path.relativeChildPath(m_root->dir);
|
Utils::FilePath relative = path.relativeChildPath(m_root->dir);
|
||||||
QList<QStringView> pathComponents = relative.pathView().split('/', Qt::SkipEmptyParts);
|
QList<QStringView> pathComponents = relative.pathView().split('/', Qt::SkipEmptyParts);
|
||||||
|
if (pathComponents.isEmpty())
|
||||||
|
return false;
|
||||||
|
|
||||||
for (const auto& import : buildSystem()->allImports()) {
|
for (const auto& import : buildSystem()->allImports()) {
|
||||||
Utils::FilePath importPath = Utils::FilePath::fromUserInput(import);
|
Utils::FilePath importPath = Utils::FilePath::fromUserInput(import);
|
||||||
|
Reference in New Issue
Block a user