forked from qt-creator/qt-creator
CppEditor: remove unused function hint provider
Since we removed the libclang based backend both implementations of ModelManagerSupport::functionHintAssistProvider returned a nullptr. Change-Id: I113c5a08cf604eb1bb2a64a851f022ecd5c908d6 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -185,11 +185,6 @@ CppEditor::CppCompletionAssistProvider *ClangModelManagerSupport::completionAssi
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
CppEditor::CppCompletionAssistProvider *ClangModelManagerSupport::functionHintAssistProvider()
|
||||
{
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
void ClangModelManagerSupport::followSymbol(const CppEditor::CursorInEditor &data,
|
||||
const Utils::LinkHandler &processLinkCallback, bool resolveTarget,
|
||||
bool inNextSplit)
|
||||
|
@@ -63,7 +63,6 @@ public:
|
||||
~ClangModelManagerSupport() override;
|
||||
|
||||
CppEditor::CppCompletionAssistProvider *completionAssistProvider() override;
|
||||
CppEditor::CppCompletionAssistProvider *functionHintAssistProvider() override;
|
||||
TextEditor::BaseHoverHandler *createHoverHandler() override { return nullptr; }
|
||||
CppEditor::BaseEditorDocumentProcessor *createEditorDocumentProcessor(
|
||||
TextEditor::TextDocument *baseTextDocument) override;
|
||||
|
@@ -124,11 +124,6 @@ CppCompletionAssistProvider *BuiltinModelManagerSupport::completionAssistProvide
|
||||
}
|
||||
|
||||
|
||||
CppCompletionAssistProvider *BuiltinModelManagerSupport::functionHintAssistProvider()
|
||||
{
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
TextEditor::BaseHoverHandler *BuiltinModelManagerSupport::createHoverHandler()
|
||||
{
|
||||
return new CppHoverHandler;
|
||||
|
@@ -42,7 +42,6 @@ public:
|
||||
~BuiltinModelManagerSupport() override;
|
||||
|
||||
CppCompletionAssistProvider *completionAssistProvider() final;
|
||||
CppCompletionAssistProvider *functionHintAssistProvider() override;
|
||||
TextEditor::BaseHoverHandler *createHoverHandler() final;
|
||||
BaseEditorDocumentProcessor *createEditorDocumentProcessor(
|
||||
TextEditor::TextDocument *baseTextDocument) final;
|
||||
|
@@ -150,24 +150,12 @@ void CppEditorDocument::setCompletionAssistProvider(TextEditor::CompletionAssist
|
||||
m_completionAssistProvider = nullptr;
|
||||
}
|
||||
|
||||
void CppEditorDocument::setFunctionHintAssistProvider(TextEditor::CompletionAssistProvider *provider)
|
||||
{
|
||||
TextDocument::setFunctionHintAssistProvider(provider);
|
||||
m_functionHintAssistProvider = nullptr;
|
||||
}
|
||||
|
||||
CompletionAssistProvider *CppEditorDocument::completionAssistProvider() const
|
||||
{
|
||||
return m_completionAssistProvider
|
||||
? m_completionAssistProvider : TextDocument::completionAssistProvider();
|
||||
}
|
||||
|
||||
CompletionAssistProvider *CppEditorDocument::functionHintAssistProvider() const
|
||||
{
|
||||
return m_functionHintAssistProvider
|
||||
? m_functionHintAssistProvider : TextDocument::functionHintAssistProvider();
|
||||
}
|
||||
|
||||
TextEditor::IAssistProvider *CppEditorDocument::quickFixAssistProvider() const
|
||||
{
|
||||
if (const auto baseProvider = TextDocument::quickFixAssistProvider())
|
||||
@@ -223,7 +211,6 @@ void CppEditorDocument::onMimeTypeChanged()
|
||||
m_isObjCEnabled = (mt == QLatin1String(Constants::OBJECTIVE_C_SOURCE_MIMETYPE)
|
||||
|| mt == QLatin1String(Constants::OBJECTIVE_CPP_SOURCE_MIMETYPE));
|
||||
m_completionAssistProvider = mm()->completionAssistProvider();
|
||||
m_functionHintAssistProvider = mm()->functionHintAssistProvider();
|
||||
|
||||
initializeTimer();
|
||||
}
|
||||
|
@@ -51,9 +51,7 @@ public:
|
||||
|
||||
bool isObjCEnabled() const;
|
||||
void setCompletionAssistProvider(TextEditor::CompletionAssistProvider *provider) override;
|
||||
void setFunctionHintAssistProvider(TextEditor::CompletionAssistProvider *provider) override;
|
||||
TextEditor::CompletionAssistProvider *completionAssistProvider() const override;
|
||||
TextEditor::CompletionAssistProvider *functionHintAssistProvider() const override;
|
||||
TextEditor::IAssistProvider *quickFixAssistProvider() const override;
|
||||
|
||||
void recalculateSemanticInfoDetached();
|
||||
@@ -128,7 +126,6 @@ private:
|
||||
QScopedPointer<BaseEditorDocumentProcessor> m_processor;
|
||||
|
||||
CppCompletionAssistProvider *m_completionAssistProvider = nullptr;
|
||||
CppCompletionAssistProvider *m_functionHintAssistProvider = nullptr;
|
||||
|
||||
// (Un)Registration in CppModelManager
|
||||
QScopedPointer<CppEditorDocumentHandle> m_editorDocumentHandle;
|
||||
|
@@ -1620,11 +1620,6 @@ CppCompletionAssistProvider *CppModelManager::completionAssistProvider() const
|
||||
return d->m_builtinModelManagerSupport->completionAssistProvider();
|
||||
}
|
||||
|
||||
CppCompletionAssistProvider *CppModelManager::functionHintAssistProvider() const
|
||||
{
|
||||
return d->m_builtinModelManagerSupport->functionHintAssistProvider();
|
||||
}
|
||||
|
||||
TextEditor::BaseHoverHandler *CppModelManager::createHoverHandler() const
|
||||
{
|
||||
return d->m_builtinModelManagerSupport->createHoverHandler();
|
||||
|
@@ -162,7 +162,6 @@ public:
|
||||
|
||||
void activateClangCodeModel(ModelManagerSupportProvider *modelManagerSupportProvider);
|
||||
CppCompletionAssistProvider *completionAssistProvider() const;
|
||||
CppCompletionAssistProvider *functionHintAssistProvider() const;
|
||||
BaseEditorDocumentProcessor *createEditorDocumentProcessor(
|
||||
TextEditor::TextDocument *baseTextDocument) const;
|
||||
TextEditor::BaseHoverHandler *createHoverHandler() const;
|
||||
|
@@ -57,7 +57,6 @@ public:
|
||||
virtual ~ModelManagerSupport() = 0;
|
||||
|
||||
virtual CppCompletionAssistProvider *completionAssistProvider() = 0;
|
||||
virtual CppCompletionAssistProvider *functionHintAssistProvider() = 0;
|
||||
virtual TextEditor::BaseHoverHandler *createHoverHandler() = 0;
|
||||
virtual BaseEditorDocumentProcessor *createEditorDocumentProcessor(
|
||||
TextEditor::TextDocument *baseTextDocument) = 0;
|
||||
|
Reference in New Issue
Block a user