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;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
CppEditor::CppCompletionAssistProvider *ClangModelManagerSupport::functionHintAssistProvider()
|
|
||||||
{
|
|
||||||
return nullptr;
|
|
||||||
}
|
|
||||||
|
|
||||||
void ClangModelManagerSupport::followSymbol(const CppEditor::CursorInEditor &data,
|
void ClangModelManagerSupport::followSymbol(const CppEditor::CursorInEditor &data,
|
||||||
const Utils::LinkHandler &processLinkCallback, bool resolveTarget,
|
const Utils::LinkHandler &processLinkCallback, bool resolveTarget,
|
||||||
bool inNextSplit)
|
bool inNextSplit)
|
||||||
|
@@ -63,7 +63,6 @@ public:
|
|||||||
~ClangModelManagerSupport() override;
|
~ClangModelManagerSupport() override;
|
||||||
|
|
||||||
CppEditor::CppCompletionAssistProvider *completionAssistProvider() override;
|
CppEditor::CppCompletionAssistProvider *completionAssistProvider() override;
|
||||||
CppEditor::CppCompletionAssistProvider *functionHintAssistProvider() override;
|
|
||||||
TextEditor::BaseHoverHandler *createHoverHandler() override { return nullptr; }
|
TextEditor::BaseHoverHandler *createHoverHandler() override { return nullptr; }
|
||||||
CppEditor::BaseEditorDocumentProcessor *createEditorDocumentProcessor(
|
CppEditor::BaseEditorDocumentProcessor *createEditorDocumentProcessor(
|
||||||
TextEditor::TextDocument *baseTextDocument) override;
|
TextEditor::TextDocument *baseTextDocument) override;
|
||||||
|
@@ -124,11 +124,6 @@ CppCompletionAssistProvider *BuiltinModelManagerSupport::completionAssistProvide
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
CppCompletionAssistProvider *BuiltinModelManagerSupport::functionHintAssistProvider()
|
|
||||||
{
|
|
||||||
return nullptr;
|
|
||||||
}
|
|
||||||
|
|
||||||
TextEditor::BaseHoverHandler *BuiltinModelManagerSupport::createHoverHandler()
|
TextEditor::BaseHoverHandler *BuiltinModelManagerSupport::createHoverHandler()
|
||||||
{
|
{
|
||||||
return new CppHoverHandler;
|
return new CppHoverHandler;
|
||||||
|
@@ -42,7 +42,6 @@ public:
|
|||||||
~BuiltinModelManagerSupport() override;
|
~BuiltinModelManagerSupport() override;
|
||||||
|
|
||||||
CppCompletionAssistProvider *completionAssistProvider() final;
|
CppCompletionAssistProvider *completionAssistProvider() final;
|
||||||
CppCompletionAssistProvider *functionHintAssistProvider() override;
|
|
||||||
TextEditor::BaseHoverHandler *createHoverHandler() final;
|
TextEditor::BaseHoverHandler *createHoverHandler() final;
|
||||||
BaseEditorDocumentProcessor *createEditorDocumentProcessor(
|
BaseEditorDocumentProcessor *createEditorDocumentProcessor(
|
||||||
TextEditor::TextDocument *baseTextDocument) final;
|
TextEditor::TextDocument *baseTextDocument) final;
|
||||||
|
@@ -150,24 +150,12 @@ void CppEditorDocument::setCompletionAssistProvider(TextEditor::CompletionAssist
|
|||||||
m_completionAssistProvider = nullptr;
|
m_completionAssistProvider = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CppEditorDocument::setFunctionHintAssistProvider(TextEditor::CompletionAssistProvider *provider)
|
|
||||||
{
|
|
||||||
TextDocument::setFunctionHintAssistProvider(provider);
|
|
||||||
m_functionHintAssistProvider = nullptr;
|
|
||||||
}
|
|
||||||
|
|
||||||
CompletionAssistProvider *CppEditorDocument::completionAssistProvider() const
|
CompletionAssistProvider *CppEditorDocument::completionAssistProvider() const
|
||||||
{
|
{
|
||||||
return m_completionAssistProvider
|
return m_completionAssistProvider
|
||||||
? m_completionAssistProvider : TextDocument::completionAssistProvider();
|
? m_completionAssistProvider : TextDocument::completionAssistProvider();
|
||||||
}
|
}
|
||||||
|
|
||||||
CompletionAssistProvider *CppEditorDocument::functionHintAssistProvider() const
|
|
||||||
{
|
|
||||||
return m_functionHintAssistProvider
|
|
||||||
? m_functionHintAssistProvider : TextDocument::functionHintAssistProvider();
|
|
||||||
}
|
|
||||||
|
|
||||||
TextEditor::IAssistProvider *CppEditorDocument::quickFixAssistProvider() const
|
TextEditor::IAssistProvider *CppEditorDocument::quickFixAssistProvider() const
|
||||||
{
|
{
|
||||||
if (const auto baseProvider = TextDocument::quickFixAssistProvider())
|
if (const auto baseProvider = TextDocument::quickFixAssistProvider())
|
||||||
@@ -223,7 +211,6 @@ void CppEditorDocument::onMimeTypeChanged()
|
|||||||
m_isObjCEnabled = (mt == QLatin1String(Constants::OBJECTIVE_C_SOURCE_MIMETYPE)
|
m_isObjCEnabled = (mt == QLatin1String(Constants::OBJECTIVE_C_SOURCE_MIMETYPE)
|
||||||
|| mt == QLatin1String(Constants::OBJECTIVE_CPP_SOURCE_MIMETYPE));
|
|| mt == QLatin1String(Constants::OBJECTIVE_CPP_SOURCE_MIMETYPE));
|
||||||
m_completionAssistProvider = mm()->completionAssistProvider();
|
m_completionAssistProvider = mm()->completionAssistProvider();
|
||||||
m_functionHintAssistProvider = mm()->functionHintAssistProvider();
|
|
||||||
|
|
||||||
initializeTimer();
|
initializeTimer();
|
||||||
}
|
}
|
||||||
|
@@ -51,9 +51,7 @@ public:
|
|||||||
|
|
||||||
bool isObjCEnabled() const;
|
bool isObjCEnabled() const;
|
||||||
void setCompletionAssistProvider(TextEditor::CompletionAssistProvider *provider) override;
|
void setCompletionAssistProvider(TextEditor::CompletionAssistProvider *provider) override;
|
||||||
void setFunctionHintAssistProvider(TextEditor::CompletionAssistProvider *provider) override;
|
|
||||||
TextEditor::CompletionAssistProvider *completionAssistProvider() const override;
|
TextEditor::CompletionAssistProvider *completionAssistProvider() const override;
|
||||||
TextEditor::CompletionAssistProvider *functionHintAssistProvider() const override;
|
|
||||||
TextEditor::IAssistProvider *quickFixAssistProvider() const override;
|
TextEditor::IAssistProvider *quickFixAssistProvider() const override;
|
||||||
|
|
||||||
void recalculateSemanticInfoDetached();
|
void recalculateSemanticInfoDetached();
|
||||||
@@ -128,7 +126,6 @@ private:
|
|||||||
QScopedPointer<BaseEditorDocumentProcessor> m_processor;
|
QScopedPointer<BaseEditorDocumentProcessor> m_processor;
|
||||||
|
|
||||||
CppCompletionAssistProvider *m_completionAssistProvider = nullptr;
|
CppCompletionAssistProvider *m_completionAssistProvider = nullptr;
|
||||||
CppCompletionAssistProvider *m_functionHintAssistProvider = nullptr;
|
|
||||||
|
|
||||||
// (Un)Registration in CppModelManager
|
// (Un)Registration in CppModelManager
|
||||||
QScopedPointer<CppEditorDocumentHandle> m_editorDocumentHandle;
|
QScopedPointer<CppEditorDocumentHandle> m_editorDocumentHandle;
|
||||||
|
@@ -1620,11 +1620,6 @@ CppCompletionAssistProvider *CppModelManager::completionAssistProvider() const
|
|||||||
return d->m_builtinModelManagerSupport->completionAssistProvider();
|
return d->m_builtinModelManagerSupport->completionAssistProvider();
|
||||||
}
|
}
|
||||||
|
|
||||||
CppCompletionAssistProvider *CppModelManager::functionHintAssistProvider() const
|
|
||||||
{
|
|
||||||
return d->m_builtinModelManagerSupport->functionHintAssistProvider();
|
|
||||||
}
|
|
||||||
|
|
||||||
TextEditor::BaseHoverHandler *CppModelManager::createHoverHandler() const
|
TextEditor::BaseHoverHandler *CppModelManager::createHoverHandler() const
|
||||||
{
|
{
|
||||||
return d->m_builtinModelManagerSupport->createHoverHandler();
|
return d->m_builtinModelManagerSupport->createHoverHandler();
|
||||||
|
@@ -162,7 +162,6 @@ public:
|
|||||||
|
|
||||||
void activateClangCodeModel(ModelManagerSupportProvider *modelManagerSupportProvider);
|
void activateClangCodeModel(ModelManagerSupportProvider *modelManagerSupportProvider);
|
||||||
CppCompletionAssistProvider *completionAssistProvider() const;
|
CppCompletionAssistProvider *completionAssistProvider() const;
|
||||||
CppCompletionAssistProvider *functionHintAssistProvider() const;
|
|
||||||
BaseEditorDocumentProcessor *createEditorDocumentProcessor(
|
BaseEditorDocumentProcessor *createEditorDocumentProcessor(
|
||||||
TextEditor::TextDocument *baseTextDocument) const;
|
TextEditor::TextDocument *baseTextDocument) const;
|
||||||
TextEditor::BaseHoverHandler *createHoverHandler() const;
|
TextEditor::BaseHoverHandler *createHoverHandler() const;
|
||||||
|
@@ -57,7 +57,6 @@ public:
|
|||||||
virtual ~ModelManagerSupport() = 0;
|
virtual ~ModelManagerSupport() = 0;
|
||||||
|
|
||||||
virtual CppCompletionAssistProvider *completionAssistProvider() = 0;
|
virtual CppCompletionAssistProvider *completionAssistProvider() = 0;
|
||||||
virtual CppCompletionAssistProvider *functionHintAssistProvider() = 0;
|
|
||||||
virtual TextEditor::BaseHoverHandler *createHoverHandler() = 0;
|
virtual TextEditor::BaseHoverHandler *createHoverHandler() = 0;
|
||||||
virtual BaseEditorDocumentProcessor *createEditorDocumentProcessor(
|
virtual BaseEditorDocumentProcessor *createEditorDocumentProcessor(
|
||||||
TextEditor::TextDocument *baseTextDocument) = 0;
|
TextEditor::TextDocument *baseTextDocument) = 0;
|
||||||
|
Reference in New Issue
Block a user