Merge remote-tracking branch 'origin/12.0'

Conflicts:
	src/plugins/cmakeprojectmanager/cmakebuildsystem.cpp

Change-Id: I7a2cfa35b5bc9070c66561bfba3e4b5a8e26917f
This commit is contained in:
Eike Ziller
2024-01-19 09:33:04 +01:00
2 changed files with 6 additions and 5 deletions

View File

@@ -275,8 +275,7 @@ static QString newFilesForFunction(const std::string &cmakeFunction,
static std::optional<Link> cmakeFileForBuildKey(const QString &buildKey,
const QList<CMakeBuildTarget> &targets)
{
auto target = Utils::findOrDefault(targets,
[buildKey](const CMakeBuildTarget &target) {
auto target = Utils::findOrDefault(targets, [buildKey](const CMakeBuildTarget &target) {
return target.title == buildKey;
});
if (target.backtrace.isEmpty()) {
@@ -658,7 +657,7 @@ bool CMakeBuildSystem::addSrcFiles(Node *context, const FilePaths &filePaths, Fi
return false;
}
const std::string target_name = targetName.toStdString();
const std::string target_name = function->Arguments().front().Value;
auto qtAddModule = [target_name](const auto &func) {
return (func.LowerCaseName() == "qt_add_qml_module"
|| func.LowerCaseName() == "qt6_add_qml_module")

View File

@@ -863,6 +863,8 @@ ChangeSet FunctionDeclDefLink::changes(const Snapshot &snapshot, int targetOffse
const QStringView docView = QStringView(content);
for (auto it = renamedTargetParameters.cbegin();
it != renamedTargetParameters.cend(); ++it) {
if (!it.key()->name())
continue;
const QString paramName = Overview().prettyName(it.key()->name());
for (const Token &tok : functionComments) {
const TranslationUnit * const tu = targetFile->cppDocument()->translationUnit();