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:
@@ -34,6 +34,11 @@
|
||||
#include <QCoreApplication>
|
||||
#include <QTextCursor>
|
||||
|
||||
namespace TextEditor {
|
||||
class AssistInterface;
|
||||
class AssistProposalItemInterface;
|
||||
}
|
||||
|
||||
namespace ClangCodeModel {
|
||||
namespace Internal {
|
||||
|
||||
@@ -48,6 +53,11 @@ public:
|
||||
ClangCompletionAssistProcessor();
|
||||
~ClangCompletionAssistProcessor() override;
|
||||
|
||||
static QList<TextEditor::AssistProposalItemInterface *> completeInclude(
|
||||
int position, unsigned completionOperator,
|
||||
const TextEditor::AssistInterface *interface,
|
||||
const ProjectExplorer::HeaderPaths &headerPaths);
|
||||
|
||||
TextEditor::IAssistProposal *perform(const TextEditor::AssistInterface *interface) override;
|
||||
|
||||
void handleAvailableCompletions(const CodeCompletions &completions);
|
||||
@@ -65,12 +75,10 @@ private:
|
||||
TextEditor::IAssistProposal *createProposal();
|
||||
TextEditor::IAssistProposal *createFunctionHintProposal(
|
||||
const CodeCompletions &completions);
|
||||
|
||||
QList<TextEditor::AssistProposalItemInterface *> toAssistProposalItems(
|
||||
const CodeCompletions &completions) const;
|
||||
bool completeInclude(const QTextCursor &cursor);
|
||||
bool completeInclude(int position);
|
||||
void completeIncludePath(const QString &realPath, const QStringList &suffixes);
|
||||
static QList<TextEditor::AssistProposalItemInterface *> completeIncludePath(
|
||||
const QString &realPath, const QStringList &suffixes, unsigned completionOperator);
|
||||
bool completePreprocessorDirectives();
|
||||
bool completeDoxygenKeywords();
|
||||
void addCompletionItem(const QString &text,
|
||||
|
||||
Reference in New Issue
Block a user