aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/clangcodemodel/test
diff options
context:
space:
mode:
authorDavid Schulz <[email protected]>2023-11-16 10:13:05 +0100
committerDavid Schulz <[email protected]>2023-11-17 05:38:13 +0000
commitcff26d813a8805c34588536ca19453852b946643 (patch)
tree99c59fbfb254f0d21136fd9fcfd8102b16d7d662 /src/plugins/clangcodemodel/test
parent7affb80fc386652ba544bb7812f109caf08d39ab (diff)
Clangd: Avoid client restart after modifying open documents
Change-Id: I116eed1b047159e3d1ce64f18f44da6a0ad7b231 Reviewed-by: Christian Kandeler <[email protected]>
Diffstat (limited to 'src/plugins/clangcodemodel/test')
-rw-r--r--src/plugins/clangcodemodel/test/clangdtests.cpp10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/plugins/clangcodemodel/test/clangdtests.cpp b/src/plugins/clangcodemodel/test/clangdtests.cpp
index bfc6d1d4f8d..984aac6e779 100644
--- a/src/plugins/clangcodemodel/test/clangdtests.cpp
+++ b/src/plugins/clangcodemodel/test/clangdtests.cpp
@@ -2052,21 +2052,15 @@ 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 a new client and diagnostics in the current editor.
+ // verify that we get 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(newClient, &ClangdClient::textMarkCreated, timeOutInMs()));
+ QVERIFY(waitForSignalOrTimeout(client(), &ClangdClient::textMarkCreated, timeOutInMs()));
}
ClangdTestIndirectChanges::ClangdTestIndirectChanges()