Merge remote-tracking branch 'origin/10.0'

Conflicts:
	src/shared/qbs

Change-Id: I33e13270c8c15a51b4ce4eaa6b4584041ed124e0
This commit is contained in:
Eike Ziller
2023-03-13 12:30:04 +01:00
62 changed files with 446 additions and 292 deletions

View File

@@ -342,16 +342,10 @@ void ClangModelManagerSupport::findUsages(const CppEditor::CursorInEditor &curso
void ClangModelManagerSupport::switchHeaderSource(const FilePath &filePath, bool inNextSplit)
{
if (ClangdClient * const client = clientForFile(filePath)) {
// The fast, synchronous approach works most of the time, so let's try that one first.
const FilePath otherFile = correspondingHeaderOrSource(filePath);
if (!otherFile.isEmpty())
openEditor(otherFile, inNextSplit);
else
client->switchHeaderSource(filePath, inNextSplit);
return;
}
CppModelManager::switchHeaderSource(inNextSplit, CppModelManager::Backend::Builtin);
if (ClangdClient * const client = clientForFile(filePath))
client->switchHeaderSource(filePath, inNextSplit);
else
CppModelManager::switchHeaderSource(inNextSplit, CppModelManager::Backend::Builtin);
}
void ClangModelManagerSupport::checkUnused(const Link &link, Core::SearchResult *search,