diff --git a/codecompletion/completionworker.cpp b/codecompletion/completionworker.cpp index d8ee52b..2c61175 100644 --- a/codecompletion/completionworker.cpp +++ b/codecompletion/completionworker.cpp @@ -1,42 +1,42 @@ /* * Copyright 2017 Emma Gospodinova * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library. If not, see . */ #include "completionworker.h" #include "completionmodel.h" #include "completioncontext.h" namespace Rust { CompletionWorker::CompletionWorker(CompletionModel *parent) : KDevelop::CodeCompletionWorker(parent) { } -KDevelop::CodeCompletionContext *CompletionWorker::createCompletionContext(KDevelop::DUContextPointer context, +KDevelop::CodeCompletionContext *CompletionWorker::createCompletionContext(const KDevelop::DUContextPointer &context, const QString &contextText, const QString &followingText, const KDevelop::CursorInRevision &position) const { if (!context) { return nullptr; } return new CompletionContext(context, contextText, followingText, position, 0); } } diff --git a/codecompletion/completionworker.h b/codecompletion/completionworker.h index a0306c7..3851f70 100644 --- a/codecompletion/completionworker.h +++ b/codecompletion/completionworker.h @@ -1,43 +1,43 @@ /* * Copyright 2017 Emma Gospodinova * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library. If not, see . */ #ifndef COMPLETIONWORKER_H #define COMPLETIONWORKER_H #include namespace Rust { class CompletionModel; class CompletionWorker : public KDevelop::CodeCompletionWorker { Q_OBJECT public: CompletionWorker(CompletionModel *parent); protected: - KDevelop::CodeCompletionContext *createCompletionContext(KDevelop::DUContextPointer context, + KDevelop::CodeCompletionContext *createCompletionContext(const KDevelop::DUContextPointer &context, const QString &contextText, const QString &followingText, const KDevelop::CursorInRevision &position) const override; }; } #endif // COMPLETIONWORKER_H