forked from qt-creator/qt-creator
		
	Better name for method to pick the completion collector
isValid -> supportsEditor
This commit is contained in:
		@@ -508,14 +508,11 @@ static int startOfOperator(TextEditor::ITextEditable *editor,
 | 
			
		||||
    return start;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
bool CppCodeCompletion::isValid(TextEditor::ITextEditable *editor)
 | 
			
		||||
bool CppCodeCompletion::supportsEditor(TextEditor::ITextEditable *editor)
 | 
			
		||||
{ return m_manager->isCppEditor(editor); }
 | 
			
		||||
 | 
			
		||||
bool CppCodeCompletion::triggersCompletion(TextEditor::ITextEditable *editor)
 | 
			
		||||
{
 | 
			
		||||
    if (! m_manager->isCppEditor(editor)) // ### remove me
 | 
			
		||||
        return false;
 | 
			
		||||
 | 
			
		||||
    const int pos = editor->position();
 | 
			
		||||
    if (startOfOperator(editor, pos, /*token =*/ 0,
 | 
			
		||||
                        /*want function call=*/ true) != pos)
 | 
			
		||||
 
 | 
			
		||||
@@ -58,7 +58,7 @@ class CppCodeCompletion : public TextEditor::ICompletionCollector
 | 
			
		||||
public:
 | 
			
		||||
    explicit CppCodeCompletion(CppModelManager *manager);
 | 
			
		||||
 | 
			
		||||
    bool isValid(TextEditor::ITextEditable *editor);
 | 
			
		||||
    bool supportsEditor(TextEditor::ITextEditable *editor);
 | 
			
		||||
    bool triggersCompletion(TextEditor::ITextEditable *editor);
 | 
			
		||||
    int startCompletion(TextEditor::ITextEditable *editor);
 | 
			
		||||
    void completions(QList<TextEditor::CompletionItem> *completions);
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user