forked from qt-creator/qt-creator
QmlProject: Check if .qmlproject file does exist
Task-number: QDS-7434 Change-Id: I3e6717dbab47fd9e5c9fb84c4131ac2f88984cd8 Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Tim Jenssen <tim.jenssen@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
This commit is contained in:
@@ -445,8 +445,14 @@ Utils::FilePath QmlProjectPlugin::projectFilePath()
|
||||
{
|
||||
auto project = ProjectExplorer::SessionManager::startupProject();
|
||||
const QmlProjectManager::QmlProject *qmlProject = qobject_cast<const QmlProjectManager::QmlProject*>(project);
|
||||
if (qmlProject)
|
||||
if (qmlProject) {
|
||||
return qmlProject->projectFilePath();
|
||||
} else if (project) {
|
||||
auto projectFolder = project->rootProjectDirectory();
|
||||
auto qmlProjectFile = findQmlProject(projectFolder);
|
||||
if (qmlProjectFile.exists())
|
||||
return qmlProjectFile;
|
||||
}
|
||||
|
||||
return {};
|
||||
}
|
||||
|
Reference in New Issue
Block a user