Commit f47e7f68 authored by Nikolai Kosjar's avatar Nikolai Kosjar
Browse files

TextEditor: De-noise IAssistProcessor derived classes



...by providing a default implementation of immediateProposal() in the
base class.

Change-Id: I4f4f9aa491fbfc9390cc7b7093f1b3c1c8e460a4
Reviewed-by: default avatarErik Verbruggen <erik.verbruggen@digia.com>
parent 3fb3307b
......@@ -639,11 +639,6 @@ CppCompletionAssistProcessor::CppCompletionAssistProcessor()
CppCompletionAssistProcessor::~CppCompletionAssistProcessor()
{}
IAssistProposal *CppCompletionAssistProcessor::immediateProposal(const IAssistInterface *)
{
return 0;
}
IAssistProposal * CppCompletionAssistProcessor::perform(const IAssistInterface *interface)
{
m_interface.reset(static_cast<const CppCompletionAssistInterface *>(interface));
......
......@@ -102,7 +102,6 @@ public:
CppCompletionAssistProcessor();
virtual ~CppCompletionAssistProcessor();
virtual TextEditor::IAssistProposal *immediateProposal(const TextEditor::IAssistInterface *);
virtual TextEditor::IAssistProposal *perform(const TextEditor::IAssistInterface *interface);
private:
......
......@@ -808,8 +808,6 @@ public:
: m_provider(static_cast<const FakeVimCompletionAssistProvider *>(provider))
{}
IAssistProposal *immediateProposal(const IAssistInterface *) { return 0; }
IAssistProposal *perform(const IAssistInterface *interface)
{
const QString &needle = m_provider->needle();
......
......@@ -214,11 +214,6 @@ GLSLCompletionAssistProcessor::GLSLCompletionAssistProcessor()
GLSLCompletionAssistProcessor::~GLSLCompletionAssistProcessor()
{}
IAssistProposal *GLSLCompletionAssistProcessor::immediateProposal(const IAssistInterface *)
{
return 0;
}
IAssistProposal *GLSLCompletionAssistProcessor::perform(const IAssistInterface *interface)
{
m_interface.reset(static_cast<const GLSLCompletionAssistInterface *>(interface));
......
......@@ -71,7 +71,6 @@ public:
GLSLCompletionAssistProcessor();
virtual ~GLSLCompletionAssistProcessor();
virtual TextEditor::IAssistProposal *immediateProposal(const TextEditor::IAssistInterface *);
virtual TextEditor::IAssistProposal *perform(const TextEditor::IAssistInterface *interface);
private:
......
......@@ -510,11 +510,6 @@ QmlJSCompletionAssistProcessor::QmlJSCompletionAssistProcessor()
QmlJSCompletionAssistProcessor::~QmlJSCompletionAssistProcessor()
{}
IAssistProposal *QmlJSCompletionAssistProcessor::immediateProposal(const IAssistInterface *)
{
return 0;
}
IAssistProposal *QmlJSCompletionAssistProcessor::createContentProposal() const
{
IGenericProposalModel *model = new QmlJSAssistProposalModel(m_completions);
......
......@@ -95,7 +95,6 @@ public:
QmlJSCompletionAssistProcessor();
virtual ~QmlJSCompletionAssistProcessor();
virtual TextEditor::IAssistProposal *immediateProposal(const TextEditor::IAssistInterface *);
virtual TextEditor::IAssistProposal *perform(const TextEditor::IAssistInterface *interface);
private:
......
......@@ -86,8 +86,6 @@ private:
class ClipboardAssistProcessor: public IAssistProcessor
{
public:
IAssistProposal *immediateProposal(const TextEditor::IAssistInterface *) { return 0; }
IAssistProposal *perform(const IAssistInterface *interface)
{
if (!interface)
......
......@@ -46,7 +46,7 @@ public:
IAssistProcessor();
virtual ~IAssistProcessor();
virtual IAssistProposal *immediateProposal(const IAssistInterface *interface) = 0;
virtual IAssistProposal *immediateProposal(const IAssistInterface *) { return 0; }
virtual IAssistProposal *perform(const IAssistInterface *interface) = 0;
};
......
......@@ -177,11 +177,6 @@ KeywordsCompletionAssistProcessor::KeywordsCompletionAssistProcessor(Keywords ke
KeywordsCompletionAssistProcessor::~KeywordsCompletionAssistProcessor()
{}
IAssistProposal *KeywordsCompletionAssistProcessor::immediateProposal(const IAssistInterface *)
{
return 0;
}
IAssistProposal *KeywordsCompletionAssistProcessor::perform(const IAssistInterface *interface)
{
m_interface.reset(interface);
......
......@@ -88,7 +88,6 @@ public:
KeywordsCompletionAssistProcessor(Keywords keywords);
virtual ~KeywordsCompletionAssistProcessor();
virtual TextEditor::IAssistProposal *immediateProposal(const TextEditor::IAssistInterface *);
virtual TextEditor::IAssistProposal *perform(const TextEditor::IAssistInterface *interface);
virtual QChar startOfCommentChar() const;
......
......@@ -47,11 +47,6 @@ QuickFixAssistProcessor::QuickFixAssistProcessor()
QuickFixAssistProcessor::~QuickFixAssistProcessor()
{}
IAssistProposal *QuickFixAssistProcessor::immediateProposal(const IAssistInterface *)
{
return 0;
}
IAssistProposal *QuickFixAssistProcessor::perform(const IAssistInterface *interface)
{
if (!interface)
......
......@@ -42,7 +42,6 @@ public:
virtual const IAssistProvider *provider() const = 0;
virtual TextEditor::IAssistProposal *immediateProposal(const IAssistInterface *interface);
virtual IAssistProposal *perform(const IAssistInterface *interface);
};
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment