aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/cppeditor/followsymbol_switchmethoddecldef_test.cpp
diff options
context:
space:
mode:
authorChristian Kandeler <christian.kandeler@qt.io>2021-06-25 16:50:52 +0200
committerChristian Kandeler <christian.kandeler@qt.io>2021-06-28 10:34:24 +0000
commitba138a185534269f6a6f32088965b12cbb898337 (patch)
tree9a29aa1877502f61e089cc263755a45c83e4f056 /src/plugins/cppeditor/followsymbol_switchmethoddecldef_test.cpp
parentcd20ad8ff433acdf1629580e4700c2e9e394a962 (diff)
CppTools: Add dedicated settings and settings page for clangd
We plan to add more clangd settings, and it makes sense to have a dedicated place for them both in the code and the UI. Change-Id: Ideb92935b7a5a6a98e07980f4011736fb82042d1 Reviewed-by: David Schulz <david.schulz@qt.io>
Diffstat (limited to 'src/plugins/cppeditor/followsymbol_switchmethoddecldef_test.cpp')
-rw-r--r--src/plugins/cppeditor/followsymbol_switchmethoddecldef_test.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/plugins/cppeditor/followsymbol_switchmethoddecldef_test.cpp b/src/plugins/cppeditor/followsymbol_switchmethoddecldef_test.cpp
index 5eefae1e02..90ee657f6c 100644
--- a/src/plugins/cppeditor/followsymbol_switchmethoddecldef_test.cpp
+++ b/src/plugins/cppeditor/followsymbol_switchmethoddecldef_test.cpp
@@ -285,7 +285,7 @@ F2TestCase::F2TestCase(CppEditorAction action,
const QString curTestName = QLatin1String(QTest::currentTestFunction());
const QString tag = QLatin1String(QTest::currentDataTag());
- const bool useClangd = CppTools::codeModelSettings()->useClangd();
+ const bool useClangd = CppTools::ClangdSettings::useClangd();
if (useClangd) {
if (curTestName == "test_FollowSymbolUnderCursor_QObject_connect"
|| curTestName == "test_FollowSymbolUnderCursor_QObject_oldStyleConnect") {
@@ -475,7 +475,7 @@ F2TestCase::F2TestCase(CppEditorAction action,
// qDebug() << "Expected line:" << expectedLine;
// qDebug() << "Expected column:" << expectedColumn;
- if (!CppTools::codeModelSettings()->useClangd()) {
+ if (!CppTools::ClangdSettings::useClangd()) {
QEXPECT_FAIL("globalVarFromEnum", "Contributor works on a fix.", Abort);
QEXPECT_FAIL("matchFunctionSignature_Follow_5", "foo(int) resolved as CallAST", Abort);
}
@@ -541,12 +541,11 @@ namespace Internal {
void CppEditorPlugin::initTestCase()
{
- const auto settings = CppTools::codeModelSettings();
const QString clangdFromEnv = qEnvironmentVariable("QTC_CLANGD");
if (clangdFromEnv.isEmpty())
return;
- settings->setClangdFilePath(Utils::FilePath::fromString(clangdFromEnv));
- const auto clangd = settings->clangdFilePath();
+ ClangdSettings::setClangdFilePath(Utils::FilePath::fromString(clangdFromEnv));
+ const auto clangd = ClangdSettings::clangdFilePath();
if (clangd.isEmpty() || !clangd.exists())
return;