Debugger: add python debugger setting in run configuration

Change-Id: Ifa5d72566007e0bb006523433dcef97689677fbf
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
David Schulz
2023-11-29 15:08:48 +01:00
committed by hjk
parent 5034936333
commit eb740bdd95
11 changed files with 143 additions and 131 deletions

View File

@@ -13,6 +13,7 @@
#include <coreplugin/messagemanager.h>
#include <projectexplorer/target.h>
#include <projectexplorer/projectexplorerconstants.h>
#include <qmljs/qmljsmodelmanagerinterface.h>
@@ -186,10 +187,14 @@ void PythonBuildSystem::triggerParsing()
newRoot->addNestedNode(
std::make_unique<PythonFileNode>(projectFile, displayName, FileType::Project));
bool hasQmlFiles = false;
for (const FileEntry &entry : std::as_const(m_files)) {
const QString displayName = entry.filePath.relativePathFrom(projectDirectory()).toUserOutput();
const FileType fileType = getFileType(entry.filePath);
hasQmlFiles |= fileType == FileType::QML;
newRoot->addNestedNode(std::make_unique<PythonFileNode>(entry.filePath, displayName, fileType));
const MimeType mt = mimeTypeForFile(entry.filePath, MimeMatchMode::MatchExtension);
if (mt.matchesName(Constants::C_PY_MIMETYPE) || mt.matchesName(Constants::C_PY3_MIMETYPE)
@@ -204,6 +209,8 @@ void PythonBuildSystem::triggerParsing()
appTargets.append(bti);
}
}
project()->setProjectLanguage(ProjectExplorer::Constants::QMLJS_LANGUAGE_ID, hasQmlFiles);
setRootProjectNode(std::move(newRoot));
setApplicationTargets(appTargets);