diff options
author | Christian Kandeler <christian.kandeler@qt.io> | 2024-02-27 17:19:56 +0100 |
---|---|---|
committer | Christian Kandeler <christian.kandeler@qt.io> | 2024-02-28 13:44:14 +0000 |
commit | 68dab97bc567a2236e943653680ba7b29ec25945 (patch) | |
tree | 7988cca870f9b7c7022017b493cf161c1f16c38c /src/plugins/cppeditor/followsymbol_switchmethoddecldef_test.cpp | |
parent | f3a53dfd8cb41d52b53edd86ab523bc79632a827 (diff) |
CppEditor: Fix running tests with clangd
Try harder to find a suitable kit:
- Pick one without warnings.
- Pick one with a Qt, as otherwise configureAsExampleProject()
will fail.
Change-Id: I5a38e86bd81840c6794de365980618c904936d3a
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Diffstat (limited to 'src/plugins/cppeditor/followsymbol_switchmethoddecldef_test.cpp')
-rw-r--r-- | src/plugins/cppeditor/followsymbol_switchmethoddecldef_test.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/plugins/cppeditor/followsymbol_switchmethoddecldef_test.cpp b/src/plugins/cppeditor/followsymbol_switchmethoddecldef_test.cpp index d18e8dc391..6597a261c4 100644 --- a/src/plugins/cppeditor/followsymbol_switchmethoddecldef_test.cpp +++ b/src/plugins/cppeditor/followsymbol_switchmethoddecldef_test.cpp @@ -494,8 +494,10 @@ void FollowSymbolTest::initTestCase() return; // Find suitable kit. + // Qt is not actually required for the tests, but we need it for consistency with + // configureAsExampleProject(). F2TestCase::m_testKit = Utils::findOr(KitManager::kits(), nullptr, [](const Kit *k) { - return k->isValid(); + return k->isValid() && !k->hasWarning() && k->value("QtSupport.QtInformation").isValid(); }); if (!F2TestCase::m_testKit) QSKIP("This test requires at least one kit to be present"); |