[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [kdevplatform] language/codecompletion: Pass by reference for foundDeclarations
From: Olivier JG <olivier.jg () gmail ! com>
Date: 2015-10-10 20:32:41
Message-ID: E1Zl0or-0004E2-Pg () scm ! kde ! org
[Download RAW message or body]
Git commit 4a718f7ab5465dc9c340e15d3adde35565393b29 by Olivier JG.
Committed on 10/10/2015 at 20:36.
Pushed by olivierjg into branch 'master'.
Pass by reference for foundDeclarations
M +2 -1 language/codecompletion/codecompletionmodel.cpp
M +2 -1 language/codecompletion/codecompletionmodel.h
M +3 -2 language/codecompletion/codecompletionworker.cpp
M +4 -2 language/codecompletion/codecompletionworker.h
http://commits.kde.org/kdevplatform/4a718f7ab5465dc9c340e15d3adde35565393b29
diff --git a/language/codecompletion/codecompletionmodel.cpp \
b/language/codecompletion/codecompletionmodel.cpp index 9e12961..6ee981b 100644
--- a/language/codecompletion/codecompletionmodel.cpp
+++ b/language/codecompletion/codecompletionmodel.cpp
@@ -248,7 +248,8 @@ void CodeCompletionModel::completionInvoked(KTextEditor::View* \
view, const KText completionInvokedInternal(view, range, invocationType, url);
}
-void CodeCompletionModel::foundDeclarations(QList<QExplicitlySharedDataPointer<CompletionTreeElement> \
> items, QExplicitlySharedDataPointer<CodeCompletionContext> completionContext) +void \
> CodeCompletionModel::foundDeclarations(const \
> QList<QExplicitlySharedDataPointer<CompletionTreeElement>>& items,
+ const \
QExplicitlySharedDataPointer<CodeCompletionContext>& completionContext) {
m_completionContext = completionContext;
diff --git a/language/codecompletion/codecompletionmodel.h \
b/language/codecompletion/codecompletionmodel.h index a9d62bd..1c2c581 100644
--- a/language/codecompletion/codecompletionmodel.h
+++ b/language/codecompletion/codecompletionmodel.h
@@ -113,7 +113,8 @@ class KDEVPLATFORMLANGUAGE_EXPORT CodeCompletionModel : public \
KTextEditor::Code
protected Q_SLOTS:
///Connection from the background-thread into the model: This is called when the \
background-thread is ready
- virtual void foundDeclarations(QList<QExplicitlySharedDataPointer<CompletionTreeElement> \
> item, QExplicitlySharedDataPointer<CodeCompletionContext> completionContext); + \
> virtual void foundDeclarations(const \
> QList<QExplicitlySharedDataPointer<CompletionTreeElement>>& item,
+ const \
QExplicitlySharedDataPointer<CodeCompletionContext>& completionContext);
protected:
///Eventually override this, determine the context or whatever, and then emit \
completionsNeeded(..) to continue processing in the background tread.
diff --git a/language/codecompletion/codecompletionworker.cpp \
b/language/codecompletion/codecompletionworker.cpp index 5aec2c5..6f1efb9 100644
--- a/language/codecompletion/codecompletionworker.cpp
+++ b/language/codecompletion/codecompletionworker.cpp
@@ -62,10 +62,11 @@ bool CodeCompletionWorker::fullCompletion() const {
}
void CodeCompletionWorker::failed() {
- foundDeclarations( QList<QExplicitlySharedDataPointer<CompletionTreeElement> \
>(), QExplicitlySharedDataPointer<KDevelop::CodeCompletionContext>() ); + \
> foundDeclarations({}, {});
}
-void KDevelop::CodeCompletionWorker::foundDeclarations(QList< \
QExplicitlySharedDataPointer< KDevelop::CompletionTreeElement > > items, \
QExplicitlySharedDataPointer< KDevelop::CodeCompletionContext > completionContext) \
+void CodeCompletionWorker::foundDeclarations(const \
QList<CompletionTreeElementPointer>& items, + \
const CodeCompletionContext::Ptr& completionContext) {
m_hasFoundDeclarations = true;
emit foundDeclarationsReal(items, completionContext);
diff --git a/language/codecompletion/codecompletionworker.h \
b/language/codecompletion/codecompletionworker.h index 7e2c63a..9f10c04 100644
--- a/language/codecompletion/codecompletionworker.h
+++ b/language/codecompletion/codecompletionworker.h
@@ -62,12 +62,14 @@ class KDEVPLATFORMLANGUAGE_EXPORT CodeCompletionWorker : public \
QObject
///When this is called, the result is shown in the completion-list.
///Call this from within your code
- void foundDeclarations(QList<QExplicitlySharedDataPointer<CompletionTreeElement> \
>, QExplicitlySharedDataPointer<CodeCompletionContext> completionContext); + void \
> foundDeclarations(const \
> QList<QExplicitlySharedDataPointer<CompletionTreeElement>>&,
+ const CodeCompletionContext::Ptr& completionContext);
Q_SIGNALS:
///Internal connections into the foreground completion model
- void foundDeclarationsReal(QList<QExplicitlySharedDataPointer<CompletionTreeElement> \
>, QExplicitlySharedDataPointer<CodeCompletionContext> completionContext); + void \
> foundDeclarationsReal(const \
> QList<QExplicitlySharedDataPointer<CompletionTreeElement>>&,
+ const \
QExplicitlySharedDataPointer<CodeCompletionContext>& completionContext);
protected:
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic