Commit cd15efed authored by Miquel Sabaté's avatar Miquel Sabaté
Browse files

codecompletion: pass a View instead of a Document in the executed method.

REVIEW: 120067
parent 91a285e8
......@@ -96,7 +96,7 @@ void NormalDeclarationCompletionItem::execute(KTextEditor::View* view, const KTe
KTextEditor::Range newRange = word;
newRange.setEnd(KTextEditor::Cursor(newRange.end().line(), newRange.start().column() + newText.length()));
executed(document, newRange);
executed(view, newRange);
QWidget* NormalDeclarationCompletionItem::createExpandingWidget(const KDevelop::CodeCompletionModel* model) const
......@@ -116,9 +116,9 @@ QString NormalDeclarationCompletionItem::shortenedTypeString(KDevelop::Declarati
return decl->abstractType()->toString();
void NormalDeclarationCompletionItem::executed(KTextEditor::Document* document, const KTextEditor::Range& word)
void NormalDeclarationCompletionItem::executed(KTextEditor::View* view, const KTextEditor::Range& word)
......@@ -129,7 +129,7 @@ QVariant NormalDeclarationCompletionItem::data(const QModelIndex& index, int rol
kDebug(9007) << "Failed to lock the du-chain in time";
return QVariant();
return QVariant();
......@@ -49,17 +49,17 @@ protected:
* Called after execute, you may insert additional chars for this declaration (eg. parens)
* Default implementation does nothing
virtual void executed(KTextEditor::Document* document, const KTextEditor::Range& word);
virtual void executed(KTextEditor::View* view, const KTextEditor::Range& word);
QExplicitlySharedDataPointer<CodeCompletionContext> m_completionContext;
KDevelop::DeclarationPointer m_declaration;
int m_inheritanceDepth; //Inheritance-depth: 0 for local functions(within no class), 1 for within local class, 1000+ for global items.
static const int normalBestMatchesCount;
static const bool shortenArgumentHintReturnValues;
static const int maximumArgumentHintReturnValueLength;
static const int desiredTypeLength;
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