Merge remote-tracking branch 'origin/9.0'

Conflicts:
	src/plugins/qmldesigner/components/componentcore/modelnodeoperations.cpp
	src/plugins/qmldesigner/components/stateseditornew/propertychangesmodel.cpp
	src/plugins/qmldesigner/components/stateseditornew/propertymodel.cpp
	src/plugins/qmldesigner/qmldesignerprojectmanager.cpp
	src/plugins/qmldesigner/qmldesignerprojectmanager.h

Change-Id: Ib029a830ee99190bc4ea2ad75d9300bfa86b42d9
This commit is contained in:
Tim Jenssen
2022-10-25 19:01:00 +02:00
186 changed files with 2027 additions and 1207 deletions

View File

@@ -345,19 +345,19 @@ void CppModelManager::showPreprocessedFile(bool inNextSplit)
.arg(reason));
};
static const auto showFallbackWarning = [](const QString &reason) {
Core::MessageManager::writeSilently(Tr::tr("%1, falling back to built-in preprocessor")
Core::MessageManager::writeSilently(Tr::tr("%1, falling back to built-in preprocessor.")
.arg(reason));
};
static const auto saveAndOpen = [](const FilePath &filePath, const QByteArray &contents,
bool inNextSplit) {
SaveFile f(filePath.toString());
if (!f.open()) {
showError(Tr::tr("Failed to open output file \"%1\"").arg(filePath.toUserOutput()));
showError(Tr::tr("Failed to open output file \"%1\".").arg(filePath.toUserOutput()));
return;
}
f.write(contents);
if (!f.commit()) {
showError(Tr::tr("Failed to write output file \"%1\"").arg(filePath.toUserOutput()));
showError(Tr::tr("Failed to write output file \"%1\".").arg(filePath.toUserOutput()));
return;
}
f.close();
@@ -389,7 +389,7 @@ void CppModelManager::showPreprocessedFile(bool inNextSplit)
const Project * const project = ProjectTree::currentProject();
if (!project || !project->activeTarget()
|| !project->activeTarget()->activeBuildConfiguration()) {
showFallbackWarning(Tr::tr("Could not determine which compiler to invoke"));
showFallbackWarning(Tr::tr("Could not determine which compiler to invoke."));
useBuiltinPreprocessor();
return;
}
@@ -401,7 +401,7 @@ void CppModelManager::showPreprocessedFile(bool inNextSplit)
} else if (classifier.isCxx() || classifier.isHeader()) {
tc = ToolChainKitAspect::cxxToolChain(project->activeTarget()->kit());
} else {
showFallbackWarning(Tr::tr("Could not determine which compiler to invoke"));
showFallbackWarning(Tr::tr("Could not determine which compiler to invoke."));
useBuiltinPreprocessor();
return;
}
@@ -411,7 +411,7 @@ void CppModelManager::showPreprocessedFile(bool inNextSplit)
&& (tc->typeId() == ProjectExplorer::Constants::MSVC_TOOLCHAIN_TYPEID
|| tc->typeId() == ProjectExplorer::Constants::CLANG_CL_TOOLCHAIN_TYPEID);
if (!isGcc && !isMsvc) {
showFallbackWarning(Tr::tr("Could not determine compiler command line"));
showFallbackWarning(Tr::tr("Could not determine compiler command line."));
useBuiltinPreprocessor();
return;
}
@@ -421,7 +421,7 @@ void CppModelManager::showPreprocessedFile(bool inNextSplit)
return pp->belongsToProject(ProjectTree::currentProject());
});
if (!projectPart) {
showFallbackWarning(Tr::tr("Could not determine compiler command line"));
showFallbackWarning(Tr::tr("Could not determine compiler command line."));
useBuiltinPreprocessor();
return;
}