From f47e7f68d9af34a2a42b6acbd7b339fe6cac5aab Mon Sep 17 00:00:00 2001
From: Nikolai Kosjar <nikolai.kosjar@digia.com>
Date: Tue, 1 Oct 2013 16:45:07 +0200
Subject: [PATCH] TextEditor: De-noise IAssistProcessor derived classes

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

Change-Id: I4f4f9aa491fbfc9390cc7b7093f1b3c1c8e460a4
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
---
 src/plugins/cpptools/cppcompletionassist.cpp                 | 5 -----
 src/plugins/cpptools/cppcompletionassist.h                   | 1 -
 src/plugins/fakevim/fakevimplugin.cpp                        | 2 --
 src/plugins/glsleditor/glslcompletionassist.cpp              | 5 -----
 src/plugins/glsleditor/glslcompletionassist.h                | 1 -
 src/plugins/qmljseditor/qmljscompletionassist.cpp            | 5 -----
 src/plugins/qmljseditor/qmljscompletionassist.h              | 1 -
 src/plugins/texteditor/circularclipboardassist.cpp           | 2 --
 src/plugins/texteditor/codeassist/iassistprocessor.h         | 2 +-
 .../texteditor/codeassist/keywordscompletionassist.cpp       | 5 -----
 src/plugins/texteditor/codeassist/keywordscompletionassist.h | 1 -
 .../texteditor/codeassist/quickfixassistprocessor.cpp        | 5 -----
 src/plugins/texteditor/codeassist/quickfixassistprocessor.h  | 1 -
 13 files changed, 1 insertion(+), 35 deletions(-)

diff --git a/src/plugins/cpptools/cppcompletionassist.cpp b/src/plugins/cpptools/cppcompletionassist.cpp
index b19a479a3cc..59d2b8aa534 100644
--- a/src/plugins/cpptools/cppcompletionassist.cpp
+++ b/src/plugins/cpptools/cppcompletionassist.cpp
@@ -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));
diff --git a/src/plugins/cpptools/cppcompletionassist.h b/src/plugins/cpptools/cppcompletionassist.h
index 1ec57cf4d8a..6345d895b25 100644
--- a/src/plugins/cpptools/cppcompletionassist.h
+++ b/src/plugins/cpptools/cppcompletionassist.h
@@ -102,7 +102,6 @@ public:
     CppCompletionAssistProcessor();
     virtual ~CppCompletionAssistProcessor();
 
-    virtual TextEditor::IAssistProposal *immediateProposal(const TextEditor::IAssistInterface *);
     virtual TextEditor::IAssistProposal *perform(const TextEditor::IAssistInterface *interface);
 
 private:
diff --git a/src/plugins/fakevim/fakevimplugin.cpp b/src/plugins/fakevim/fakevimplugin.cpp
index 179dd86b714..f8e79162f2e 100644
--- a/src/plugins/fakevim/fakevimplugin.cpp
+++ b/src/plugins/fakevim/fakevimplugin.cpp
@@ -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();
diff --git a/src/plugins/glsleditor/glslcompletionassist.cpp b/src/plugins/glsleditor/glslcompletionassist.cpp
index 768bd0b149a..f5ecd2c9834 100644
--- a/src/plugins/glsleditor/glslcompletionassist.cpp
+++ b/src/plugins/glsleditor/glslcompletionassist.cpp
@@ -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));
diff --git a/src/plugins/glsleditor/glslcompletionassist.h b/src/plugins/glsleditor/glslcompletionassist.h
index 5d96452cc64..bf75cfe31fa 100644
--- a/src/plugins/glsleditor/glslcompletionassist.h
+++ b/src/plugins/glsleditor/glslcompletionassist.h
@@ -71,7 +71,6 @@ public:
     GLSLCompletionAssistProcessor();
     virtual ~GLSLCompletionAssistProcessor();
 
-    virtual TextEditor::IAssistProposal *immediateProposal(const TextEditor::IAssistInterface *);
     virtual TextEditor::IAssistProposal *perform(const TextEditor::IAssistInterface *interface);
 
 private:
diff --git a/src/plugins/qmljseditor/qmljscompletionassist.cpp b/src/plugins/qmljseditor/qmljscompletionassist.cpp
index c3edc8394dc..65a80f6d295 100644
--- a/src/plugins/qmljseditor/qmljscompletionassist.cpp
+++ b/src/plugins/qmljseditor/qmljscompletionassist.cpp
@@ -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);
diff --git a/src/plugins/qmljseditor/qmljscompletionassist.h b/src/plugins/qmljseditor/qmljscompletionassist.h
index 40a4239a5ba..a8437211e3e 100644
--- a/src/plugins/qmljseditor/qmljscompletionassist.h
+++ b/src/plugins/qmljseditor/qmljscompletionassist.h
@@ -95,7 +95,6 @@ public:
     QmlJSCompletionAssistProcessor();
     virtual ~QmlJSCompletionAssistProcessor();
 
-    virtual TextEditor::IAssistProposal *immediateProposal(const TextEditor::IAssistInterface *);
     virtual TextEditor::IAssistProposal *perform(const TextEditor::IAssistInterface *interface);
 
 private:
diff --git a/src/plugins/texteditor/circularclipboardassist.cpp b/src/plugins/texteditor/circularclipboardassist.cpp
index 3370fa0faeb..046f1b836d9 100644
--- a/src/plugins/texteditor/circularclipboardassist.cpp
+++ b/src/plugins/texteditor/circularclipboardassist.cpp
@@ -86,8 +86,6 @@ private:
 class ClipboardAssistProcessor: public IAssistProcessor
 {
 public:
-    IAssistProposal *immediateProposal(const TextEditor::IAssistInterface *) { return 0; }
-
     IAssistProposal *perform(const IAssistInterface *interface)
     {
         if (!interface)
diff --git a/src/plugins/texteditor/codeassist/iassistprocessor.h b/src/plugins/texteditor/codeassist/iassistprocessor.h
index 3a66c0279d4..1bcefc29acf 100644
--- a/src/plugins/texteditor/codeassist/iassistprocessor.h
+++ b/src/plugins/texteditor/codeassist/iassistprocessor.h
@@ -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;
 };
 
diff --git a/src/plugins/texteditor/codeassist/keywordscompletionassist.cpp b/src/plugins/texteditor/codeassist/keywordscompletionassist.cpp
index 46b395b89c6..e58f395f1b2 100644
--- a/src/plugins/texteditor/codeassist/keywordscompletionassist.cpp
+++ b/src/plugins/texteditor/codeassist/keywordscompletionassist.cpp
@@ -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);
diff --git a/src/plugins/texteditor/codeassist/keywordscompletionassist.h b/src/plugins/texteditor/codeassist/keywordscompletionassist.h
index 45e202429dc..80aa1c8e04c 100644
--- a/src/plugins/texteditor/codeassist/keywordscompletionassist.h
+++ b/src/plugins/texteditor/codeassist/keywordscompletionassist.h
@@ -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;
 
diff --git a/src/plugins/texteditor/codeassist/quickfixassistprocessor.cpp b/src/plugins/texteditor/codeassist/quickfixassistprocessor.cpp
index 6fa8e7c4059..db90f5d4d1b 100644
--- a/src/plugins/texteditor/codeassist/quickfixassistprocessor.cpp
+++ b/src/plugins/texteditor/codeassist/quickfixassistprocessor.cpp
@@ -47,11 +47,6 @@ QuickFixAssistProcessor::QuickFixAssistProcessor()
 QuickFixAssistProcessor::~QuickFixAssistProcessor()
 {}
 
-IAssistProposal *QuickFixAssistProcessor::immediateProposal(const IAssistInterface *)
-{
-    return 0;
-}
-
 IAssistProposal *QuickFixAssistProcessor::perform(const IAssistInterface *interface)
 {
     if (!interface)
diff --git a/src/plugins/texteditor/codeassist/quickfixassistprocessor.h b/src/plugins/texteditor/codeassist/quickfixassistprocessor.h
index a79a793c804..96737a1a4df 100644
--- a/src/plugins/texteditor/codeassist/quickfixassistprocessor.h
+++ b/src/plugins/texteditor/codeassist/quickfixassistprocessor.h
@@ -42,7 +42,6 @@ public:
 
     virtual const IAssistProvider *provider() const = 0;
 
-    virtual TextEditor::IAssistProposal *immediateProposal(const IAssistInterface *interface);
     virtual IAssistProposal *perform(const IAssistInterface *interface);
 };
 
-- 
GitLab