Merge remote-tracking branch 'origin/13.0'

Conflicts:
	cmake/QtCreatorIDEBranding.cmake
	qbs/modules/qtc/qtc.qbs
	src/plugins/cppeditor/cppcodemodelsettings.cpp
	src/plugins/cppeditor/cppcodemodelsettings.h

Change-Id: I54937c39b06897a72a105e4e0a8b5f8a76c38e26
This commit is contained in:
Eike Ziller
2024-03-06 15:10:15 +01:00
151 changed files with 4134 additions and 1934 deletions

View File

@@ -386,8 +386,6 @@ void doSemanticHighlighting(
}
if (isOutputParameter(token))
styles.mixinStyles.push_back(C_OUTPUT_ARGUMENT);
qCDebug(clangdLogHighlight) << "adding highlighting result"
<< token.line << token.column << token.length << int(styles.mainStyle);
return HighlightingResult(token.line, token.column, token.length, styles);
};
@@ -420,6 +418,8 @@ void doSemanticHighlighting(
}
QList<Range> virtualRanges;
for (const HighlightingResult &r : results) {
qCDebug(clangdLogHighlight)
<< '\t' << r.line << r.column << r.length << int(r.textStyles.mainStyle);
if (r.textStyles.mainStyle != C_VIRTUAL_METHOD)
continue;
const Position startPos(r.line - 1, r.column - 1);

View File

@@ -798,11 +798,6 @@ void ClangModelManagerSupport::watchForExternalChanges()
if (!LanguageClientManager::hasClients<ClangdClient>())
return;
for (const FilePath &file : files) {
if (TextEditor::TextDocument::textDocumentForFilePath(file)) {
// if we have a document for that file we should receive the content
// change via the document signals
continue;
}
const ProjectFile::Kind kind = ProjectFile::classify(file.toString());
if (!ProjectFile::isSource(kind) && !ProjectFile::isHeader(kind))
continue;

View File

@@ -2207,15 +2207,21 @@ void ClangdTestExternalChanges::test()
QVERIFY(curDoc->marks().isEmpty());
// Now trigger an external change in an open, but not currently visible file and
// verify that we get diagnostics in the current editor.
// verify that we get a new client and diagnostics in the current editor.
TextDocument * const docToChange = document("mainwindow.cpp");
docToChange->setSilentReload();
QFile otherSource(filePath("mainwindow.cpp").toString());
QVERIFY(otherSource.open(QIODevice::WriteOnly));
otherSource.write("blubb");
otherSource.close();
QVERIFY(waitForSignalOrTimeout(LanguageClientManager::instance(),
&LanguageClientManager::clientAdded, timeOutInMs()));
ClangdClient * const newClient = ClangModelManagerSupport::clientForProject(project());
QVERIFY(newClient);
QVERIFY(newClient != oldClient);
newClient->enableTesting();
if (curDoc->marks().isEmpty())
QVERIFY(waitForSignalOrTimeout(client(), &ClangdClient::textMarkCreated, timeOutInMs()));
QVERIFY(waitForSignalOrTimeout(newClient, &ClangdClient::textMarkCreated, timeOutInMs()));
}