forked from qt-creator/qt-creator
ClangCodeModel: Fix Qt header completion with clangd < 14
The problem is fixed upstream, but this must work now. Fixes: QTCREATORBUG-26482 Change-Id: I3b2e863efec0edf7eaa74d73eb94705aa28723cf Reviewed-by: David Schulz <david.schulz@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
This commit is contained in:
@@ -1488,9 +1488,15 @@ void ClangdTestCompletion::testCompleteIncludeDirective()
|
||||
getProposal("includeDirectiveCompletion.cpp", proposal);
|
||||
|
||||
QVERIFY(proposal);
|
||||
QVERIFY(hasItem(proposal, " file.h>"));
|
||||
QVERIFY(hasItem(proposal, " otherFile.h>"));
|
||||
QVERIFY(hasItem(proposal, " mylib/"));
|
||||
if (client()->versionNumber() < QVersionNumber(14)) {
|
||||
QVERIFY(hasItem(proposal, "file.h"));
|
||||
QVERIFY(hasItem(proposal, "otherFile.h"));
|
||||
QVERIFY(hasItem(proposal, "mylib/"));
|
||||
} else {
|
||||
QVERIFY(hasItem(proposal, " file.h>"));
|
||||
QVERIFY(hasItem(proposal, " otherFile.h>"));
|
||||
QVERIFY(hasItem(proposal, " mylib/"));
|
||||
}
|
||||
QVERIFY(!hasSnippet(proposal, "class "));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user