Commit 6611b069 authored by Kevin Funk's avatar Kevin Funk

clang-tidy: modernize-use-override

parent 5bae1a2d
......@@ -93,9 +93,9 @@ public:
/**
* @brief The "interface method" which returns all the completion items to kdevelop.
**/
virtual QList< KDevelop::CompletionTreeItemPointer > completionItems(bool& abort, bool fullCompletion = true);
QList< KDevelop::CompletionTreeItemPointer > completionItems(bool& abort, bool fullCompletion = true) override;
virtual QList< CompletionTreeElementPointer > ungroupedElements();
QList< CompletionTreeElementPointer > ungroupedElements() override;
/**
* @brief Get all possible items matching the specified dot-separated search string.
......
......@@ -32,7 +32,7 @@ class FunctionDeclarationCompletionItem : public Python::PythonDeclarationComple
public:
FunctionDeclarationCompletionItem(DeclarationPointer decl, KDevelop::CodeCompletionContext::Ptr context);
virtual ~FunctionDeclarationCompletionItem();
~FunctionDeclarationCompletionItem() override;
int argumentHintDepth() const override;
virtual int atArgument() const;
void setAtArgument(int d);
......
......@@ -33,7 +33,7 @@ class ImportFileItem : public IncludeFileItemBase
public:
ImportFileItem(const KDevelop::IncludeItem& include);
virtual ~ImportFileItem();
~ImportFileItem() override;
void execute(KTextEditor::View* view, const KTextEditor::Range& word) override;
QString moduleName;
......
......@@ -32,14 +32,14 @@ class KDEVPYTHONCOMPLETION_EXPORT PythonCodeCompletionModel : public KDevelop::C
public:
PythonCodeCompletionModel(QObject* parent);
virtual ~PythonCodeCompletionModel();
~PythonCodeCompletionModel() override;
virtual KDevelop::CodeCompletionWorker* createCompletionWorker();
KTextEditor::Range completionRange(KTextEditor::View* view, const KTextEditor::Cursor &position);
KDevelop::CodeCompletionWorker* createCompletionWorker() override;
KTextEditor::Range completionRange(KTextEditor::View* view, const KTextEditor::Cursor &position) override;
bool shouldStartCompletion(KTextEditor::View* view, const QString& inserted,
bool userInsertion, const KTextEditor::Cursor& position);
virtual bool shouldAbortCompletion(KTextEditor::View* view, const KTextEditor::Range& range, const QString& currentCompletion);
QString filterString(KTextEditor::View *view, const KTextEditor::Range &range, const KTextEditor::Cursor &position);
bool userInsertion, const KTextEditor::Cursor& position) override;
bool shouldAbortCompletion(KTextEditor::View* view, const KTextEditor::Range& range, const QString& currentCompletion) override;
QString filterString(KTextEditor::View *view, const KTextEditor::Range &range, const KTextEditor::Cursor &position) override;
QUrl m_currentDocument;
};
......
......@@ -28,12 +28,12 @@ class PdbLauncher : public KDevelop::ILauncher
{
public:
PdbLauncher();
virtual QList< KDevelop::LaunchConfigurationPageFactory* > configPages() const;
virtual QString description() const;
virtual QString id();
virtual QString name() const;
virtual KJob* start(const QString& launchMode, KDevelop::ILaunchConfiguration* cfg);
virtual QStringList supportedModes() const;
QList< KDevelop::LaunchConfigurationPageFactory* > configPages() const override;
QString description() const override;
QString id() override;
QString name() const override;
KJob* start(const QString& launchMode, KDevelop::ILaunchConfiguration* cfg) override;
QStringList supportedModes() const override;
};
}
......
......@@ -52,8 +52,8 @@ public:
/**
* @brief Entry function called by KDevPlatform API.
*/
virtual ReferencedTopDUContext build(const KDevelop::IndexedString& url, Ast* node,
ReferencedTopDUContext updateContext = ReferencedTopDUContext());
ReferencedTopDUContext build(const KDevelop::IndexedString& url, Ast* node,
ReferencedTopDUContext updateContext = ReferencedTopDUContext()) override;
/**
* @brief Set the editor integrator.
......@@ -129,40 +129,40 @@ protected:
* @param range Range to encompass
* @return KDevelop::TopDUContext* weak pointer to the created top context.
*/
TopDUContext* newTopContext(const RangeInRevision& range, ParsingEnvironmentFile* file);
TopDUContext* newTopContext(const RangeInRevision& range, ParsingEnvironmentFile* file) override;
/**
* @brief Create a new context.
* Overridden to create instances of Python's specialized DUContext.
*/
virtual KDevelop::DUContext* newContext(const KDevelop::RangeInRevision& range);
KDevelop::DUContext* newContext(const KDevelop::RangeInRevision& range) override;
protected:
// AST visitor functions
virtual void visitFunctionDefinition( FunctionDefinitionAst* );
virtual void visitClassDefinition( ClassDefinitionAst* );
virtual void visitCode(CodeAst* node);
virtual void visitListComprehension(ListComprehensionAst* node);
virtual void visitDictionaryComprehension(DictionaryComprehensionAst* node);
virtual void visitGeneratorExpression(GeneratorExpressionAst* node);
void visitFunctionDefinition( FunctionDefinitionAst* ) override;
void visitClassDefinition( ClassDefinitionAst* ) override;
void visitCode(CodeAst* node) override;
void visitListComprehension(ListComprehensionAst* node) override;
void visitDictionaryComprehension(DictionaryComprehensionAst* node) override;
void visitGeneratorExpression(GeneratorExpressionAst* node) override;
void visitComprehensionCommon(Ast* node);
virtual void startVisiting(Ast* node);
virtual KDevelop::RangeInRevision editorFindRange(Ast* fromNode, Ast* toNode);
void startVisiting(Ast* node) override;
KDevelop::RangeInRevision editorFindRange(Ast* fromNode, Ast* toNode) override;
virtual KDevelop::CursorInRevision editorFindPositionSafe(Ast* node);
virtual KDevelop::CursorInRevision startPos(Ast* node);
virtual KDevelop::QualifiedIdentifier identifierForNode(Identifier* node);
KDevelop::QualifiedIdentifier identifierForNode(Identifier* node) override;
/**
* @brief Set @p context as the context of @p node.
* The context is stored inside the AST itself.
*/
virtual void setContextOnNode(Ast* node, KDevelop::DUContext* context);
void setContextOnNode(Ast* node, KDevelop::DUContext* context) override;
/**
* @brief Get the context set on @p node as previously set by @ref setContextOnNode.
*/
virtual KDevelop::DUContext* contextFromNode(Ast* node);
KDevelop::DUContext* contextFromNode(Ast* node) override;
/**
* @brief Add the saved list of contexts to import to the current context, and clear it.
......
......@@ -43,7 +43,7 @@ class KDEVPYTHONDUCHAIN_EXPORT DeclarationBuilder: public DeclarationBuilderBase
{
public:
DeclarationBuilder(PythonEditorIntegrator* editor, int ownPriority);
virtual ~DeclarationBuilder();
~DeclarationBuilder() override;
/**
* @brief Entry function, called by KDevPlatform.
......
......@@ -62,7 +62,7 @@ public:
FunctionDeclaration(const KDevelop::RangeInRevision &range, KDevelop::DUContext *context);
FunctionDeclaration(FunctionDeclarationData &data);
FunctionDeclaration(FunctionDeclarationData &data, const KDevelop::RangeInRevision &range, KDevelop::DUContext *context);
~FunctionDeclaration();
~FunctionDeclaration() override;
enum {
Identity = 126
......
......@@ -57,28 +57,28 @@ public:
/// Use this to construct the expression-visitor recursively
ExpressionVisitor(Python::ExpressionVisitor* parent, const DUContext* overrideContext=nullptr);
virtual void visitBinaryOperation(BinaryOperationAst* node);
virtual void visitUnaryOperation(UnaryOperationAst* node);
virtual void visitBooleanOperation(BooleanOperationAst* node);
virtual void visitCompare(CompareAst* node);
virtual void visitString(StringAst* node);
virtual void visitBytes(BytesAst* node);
virtual void visitNumber(NumberAst* node);
virtual void visitName(NameAst* node);
virtual void visitList(ListAst* node);
virtual void visitDict(DictAst* node);
virtual void visitSet(SetAst* node);
virtual void visitSubscript(SubscriptAst* node);
virtual void visitCall(CallAst* node);
virtual void visitAttribute(AttributeAst* node);
virtual void visitTuple(TupleAst* node);
virtual void visitLambda(LambdaAst* node);
virtual void visitListComprehension(ListComprehensionAst* node);
virtual void visitDictionaryComprehension(DictionaryComprehensionAst* node);
virtual void visitSetComprehension(SetComprehensionAst* node);
virtual void visitIfExpression(IfExpressionAst* node);
virtual void visitNameConstant(NameConstantAst* node);
void visitBinaryOperation(BinaryOperationAst* node) override;
void visitUnaryOperation(UnaryOperationAst* node) override;
void visitBooleanOperation(BooleanOperationAst* node) override;
void visitCompare(CompareAst* node) override;
void visitString(StringAst* node) override;
void visitBytes(BytesAst* node) override;
void visitNumber(NumberAst* node) override;
void visitName(NameAst* node) override;
void visitList(ListAst* node) override;
void visitDict(DictAst* node) override;
void visitSet(SetAst* node) override;
void visitSubscript(SubscriptAst* node) override;
void visitCall(CallAst* node) override;
void visitAttribute(AttributeAst* node) override;
void visitTuple(TupleAst* node) override;
void visitLambda(LambdaAst* node) override;
void visitListComprehension(ListComprehensionAst* node) override;
void visitDictionaryComprehension(DictionaryComprehensionAst* node) override;
void visitSetComprehension(SetComprehensionAst* node) override;
void visitIfExpression(IfExpressionAst* node) override;
void visitNameConstant(NameConstantAst* node) override;
/**
* @brief Checks for magic docstrings that override a call's return type.
......@@ -130,7 +130,7 @@ private:
void addUnknownName(const QString& name);
virtual AbstractType::Ptr encounterPreprocess(AbstractType::Ptr type);
AbstractType::Ptr encounterPreprocess(AbstractType::Ptr type) override;
void setLastIsAlias(bool alias) {
m_isAlias = alias;
......
......@@ -59,9 +59,9 @@ public:
static_cast<KDevelop::DUChainBase*>(this)->d_func_dynamic()->setClassId(this);
}
virtual QWidget* createNavigationWidget(KDevelop::Declaration* decl, KDevelop::TopDUContext* topContext,
QWidget* createNavigationWidget(KDevelop::Declaration* decl, KDevelop::TopDUContext* topContext,
const QString& htmlPrefix, const QString& htmlSuffix,
KDevelop::AbstractNavigationWidget::DisplayHints hints) const;
KDevelop::AbstractNavigationWidget::DisplayHints hints) const override;
enum {
Identity = IdentityT
......
......@@ -81,8 +81,8 @@ public:
void setCreatedBy(TopDUContext* context, const ModificationRevision& revision);
/** @return the creating TopDUContext for this type hint. */
IndexedTopDUContext createdBy() const;
virtual AbstractType* clone() const;
virtual uint hash() const;
AbstractType* clone() const override;
uint hash() const override;
/**
* @brief Checks whether this hint is still valid, and returns false if it is not
......@@ -92,7 +92,7 @@ public:
**/
bool isValid();
virtual bool equals(const AbstractType* rhs) const;
bool equals(const AbstractType* rhs) const override;
enum {
Identity = 62
};
......
......@@ -68,20 +68,20 @@ public:
IndexedContainer(const IndexedContainer& rhs);
IndexedContainer(IndexedContainerData& data);
void addEntry(AbstractType::Ptr typeToAdd);
virtual AbstractType* clone() const;
virtual uint hash() const;
AbstractType* clone() const override;
uint hash() const override;
int typesCount() const;
const IndexedType& typeAt(int index) const;
void replaceType(int index, AbstractType::Ptr newType);
AbstractType::Ptr asUnsureType() const;
virtual QString toString() const;
QString toString() const override;
// "toString"s only the container type, not the content; used in declarationnavigationcontext to create
// separate links for the content and container type
// by keeping toString separate, it is possible to have a pretty type in unsure types etc. without additional
// efforts being necessary
QString containerToString() const;
virtual bool equals(const AbstractType* rhs) const;
bool equals(const AbstractType* rhs) const override;
enum {
// #warning check identity value (59)
......
......@@ -42,10 +42,10 @@ public:
ParseSession* parseSession() const;
protected:
virtual void visitName(NameAst* node);
virtual void visitCall(CallAst* node);
virtual void visitAttribute(AttributeAst* node);
virtual void visitSubscript(SubscriptAst* node);
void visitName(NameAst* node) override;
void visitCall(CallAst* node) override;
void visitAttribute(AttributeAst* node) override;
void visitSubscript(SubscriptAst* node) override;
private:
ParseSession* m_session;
inline int& nextUseIndex()
......
This diff is collapsed.
......@@ -36,7 +36,7 @@ public:
class KDEVPYTHONPARSER_EXPORT TrivialLazyLineFetcher : public LazyLineFetcher {
public:
TrivialLazyLineFetcher(QStringList lines) : m_lines(lines) { }
virtual QString fetchLine(int lineno) {
QString fetchLine(int lineno) override {
return m_lines.at(lineno);
};
private:
......@@ -47,7 +47,7 @@ class KDEVPYTHONPARSER_EXPORT TextDocumentLazyLineFetcher : public LazyLineFetch
public:
TextDocumentLazyLineFetcher(KTextEditor::Document* d) :
m_document(d) { };
QString fetchLine(int lineno) {
QString fetchLine(int lineno) override {
return m_document->line(lineno);
};
private:
......
......@@ -46,7 +46,7 @@ class KDEVPYTHONPARSER_EXPORT ParseSession : public IAstContainer
{
public:
ParseSession();
~ParseSession();
~ParseSession() override;
void setContents( const QString& contents );
QString contents() const;
......
......@@ -37,7 +37,7 @@ class StyleChecking : public QObject
Q_OBJECT
public:
StyleChecking(QObject* parent=nullptr);
~StyleChecking();
~StyleChecking() override;
void startChecker(const QString& text, const QString& select={},
const QString& ignore={}, const int maxLineLength=80);
......
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