Commit cbf76068 authored by Fawzi Mohamed's avatar Fawzi Mohamed

qmljs: using QTC_OVERRIDE consistently

Change-Id: I37c96397014b7b710aeec629c5e715bba4997766
Reviewed-by: default avatarKai Koehne <kai.koehne@digia.com>
parent 30719c68
......@@ -37,6 +37,7 @@
#include <qmljs/qmljsstaticanalysismessage.h>
#include <utils/json.h>
#include <utils/qtcoverride.h>
#include <QStack>
#include <QList>
......@@ -48,21 +49,21 @@ class QMLJS_EXPORT JsonCheck : public AST::Visitor
{
public:
JsonCheck(Document::Ptr doc);
virtual ~JsonCheck();
~JsonCheck() QTC_OVERRIDE;
QList<StaticAnalysis::Message> operator()(Utils::JsonSchema *schema);
private:
virtual bool preVisit(AST::Node *);
virtual void postVisit(AST::Node *);
virtual bool visit(AST::ObjectLiteral *ast);
virtual bool visit(AST::ArrayLiteral *ast);
virtual bool visit(AST::NullExpression *ast);
virtual bool visit(AST::TrueLiteral *ast);
virtual bool visit(AST::FalseLiteral *ast);
virtual bool visit(AST::NumericLiteral *ast);
virtual bool visit(AST::StringLiteral *ast);
bool preVisit(AST::Node *) QTC_OVERRIDE;
void postVisit(AST::Node *) QTC_OVERRIDE;
bool visit(AST::ObjectLiteral *ast) QTC_OVERRIDE;
bool visit(AST::ArrayLiteral *ast) QTC_OVERRIDE;
bool visit(AST::NullExpression *ast) QTC_OVERRIDE;
bool visit(AST::TrueLiteral *ast) QTC_OVERRIDE;
bool visit(AST::FalseLiteral *ast) QTC_OVERRIDE;
bool visit(AST::NumericLiteral *ast) QTC_OVERRIDE;
bool visit(AST::StringLiteral *ast) QTC_OVERRIDE;
struct AnalysisData
{
......
......@@ -32,6 +32,7 @@
#include <qmljs/parser/qmljsastvisitor_p.h>
#include <qmljs/qmljsvalueowner.h>
#include <utils/qtcoverride.h>
#include <QHash>
#include <QCoreApplication>
......@@ -48,7 +49,7 @@ class QMLJS_EXPORT Bind: protected AST::Visitor
public:
Bind(Document *doc, QList<DiagnosticMessage> *messages,
bool isJsLibrary, const QList<ImportInfo> &jsImports);
virtual ~Bind();
~Bind() QTC_OVERRIDE;
bool isJsLibrary() const;
QList<ImportInfo> imports() const;
......@@ -68,21 +69,21 @@ protected:
void accept(AST::Node *node);
virtual bool visit(AST::UiProgram *ast);
virtual bool visit(AST::Program *ast);
bool visit(AST::UiProgram *ast) QTC_OVERRIDE;
bool visit(AST::Program *ast) QTC_OVERRIDE;
// Ui
virtual bool visit(AST::UiImport *ast);
virtual bool visit(AST::UiPublicMember *ast);
virtual bool visit(AST::UiObjectDefinition *ast);
virtual bool visit(AST::UiObjectBinding *ast);
virtual bool visit(AST::UiScriptBinding *ast);
virtual bool visit(AST::UiArrayBinding *ast);
bool visit(AST::UiImport *ast) QTC_OVERRIDE;
bool visit(AST::UiPublicMember *ast) QTC_OVERRIDE;
bool visit(AST::UiObjectDefinition *ast) QTC_OVERRIDE;
bool visit(AST::UiObjectBinding *ast) QTC_OVERRIDE;
bool visit(AST::UiScriptBinding *ast) QTC_OVERRIDE;
bool visit(AST::UiArrayBinding *ast) QTC_OVERRIDE;
// QML/JS
virtual bool visit(AST::FunctionDeclaration *ast);
virtual bool visit(AST::FunctionExpression *ast);
virtual bool visit(AST::VariableDeclaration *ast);
bool visit(AST::FunctionDeclaration *ast) QTC_OVERRIDE;
bool visit(AST::FunctionExpression *ast) QTC_OVERRIDE;
bool visit(AST::VariableDeclaration *ast) QTC_OVERRIDE;
ObjectValue *switchObjectValue(ObjectValue *newObjectValue);
ObjectValue *bindObject(AST::UiQualifiedId *qualifiedTypeNameId, AST::UiObjectInitializer *initializer);
......
......@@ -34,6 +34,7 @@
#include <qmljs/qmljsscopechain.h>
#include <qmljs/qmljsstaticanalysismessage.h>
#include <qmljs/parser/qmljsastvisitor_p.h>
#include <utils/qtcoverride.h>
#include <QCoreApplication>
#include <QSet>
......@@ -52,7 +53,7 @@ class QMLJS_EXPORT Check: protected AST::Visitor
public:
// prefer taking root scope chain?
Check(Document::Ptr doc, const ContextPtr &context);
virtual ~Check();
~Check() QTC_OVERRIDE;
QList<StaticAnalysis::Message> operator()();
......@@ -60,43 +61,43 @@ public:
void disableMessage(StaticAnalysis::Type type);
protected:
virtual bool preVisit(AST::Node *ast);
virtual void postVisit(AST::Node *ast);
virtual bool visit(AST::UiProgram *ast);
virtual bool visit(AST::UiObjectDefinition *ast);
virtual bool visit(AST::UiObjectBinding *ast);
virtual bool visit(AST::UiScriptBinding *ast);
virtual bool visit(AST::UiArrayBinding *ast);
virtual bool visit(AST::UiPublicMember *ast);
virtual bool visit(AST::IdentifierExpression *ast);
virtual bool visit(AST::FieldMemberExpression *ast);
virtual bool visit(AST::FunctionDeclaration *ast);
virtual bool visit(AST::FunctionExpression *ast);
virtual bool visit(AST::UiObjectInitializer *);
virtual bool visit(AST::BinaryExpression *ast);
virtual bool visit(AST::Block *ast);
virtual bool visit(AST::WithStatement *ast);
virtual bool visit(AST::VoidExpression *ast);
virtual bool visit(AST::Expression *ast);
virtual bool visit(AST::ExpressionStatement *ast);
virtual bool visit(AST::IfStatement *ast);
virtual bool visit(AST::ForStatement *ast);
virtual bool visit(AST::LocalForStatement *ast);
virtual bool visit(AST::WhileStatement *ast);
virtual bool visit(AST::DoWhileStatement *ast);
virtual bool visit(AST::CaseBlock *ast);
virtual bool visit(AST::NewExpression *ast);
virtual bool visit(AST::NewMemberExpression *ast);
virtual bool visit(AST::CallExpression *ast);
virtual bool visit(AST::StatementList *ast);
virtual bool visit(AST::ReturnStatement *ast);
virtual bool visit(AST::ThrowStatement *ast);
virtual bool visit(AST::DeleteExpression *ast);
virtual bool visit(AST::TypeOfExpression *ast);
virtual void endVisit(QmlJS::AST::UiObjectInitializer *);
bool preVisit(AST::Node *ast) QTC_OVERRIDE;
void postVisit(AST::Node *ast) QTC_OVERRIDE;
bool visit(AST::UiProgram *ast) QTC_OVERRIDE;
bool visit(AST::UiObjectDefinition *ast) QTC_OVERRIDE;
bool visit(AST::UiObjectBinding *ast) QTC_OVERRIDE;
bool visit(AST::UiScriptBinding *ast) QTC_OVERRIDE;
bool visit(AST::UiArrayBinding *ast) QTC_OVERRIDE;
bool visit(AST::UiPublicMember *ast) QTC_OVERRIDE;
bool visit(AST::IdentifierExpression *ast) QTC_OVERRIDE;
bool visit(AST::FieldMemberExpression *ast) QTC_OVERRIDE;
bool visit(AST::FunctionDeclaration *ast) QTC_OVERRIDE;
bool visit(AST::FunctionExpression *ast) QTC_OVERRIDE;
bool visit(AST::UiObjectInitializer *) QTC_OVERRIDE;
bool visit(AST::BinaryExpression *ast) QTC_OVERRIDE;
bool visit(AST::Block *ast) QTC_OVERRIDE;
bool visit(AST::WithStatement *ast) QTC_OVERRIDE;
bool visit(AST::VoidExpression *ast) QTC_OVERRIDE;
bool visit(AST::Expression *ast) QTC_OVERRIDE;
bool visit(AST::ExpressionStatement *ast) QTC_OVERRIDE;
bool visit(AST::IfStatement *ast) QTC_OVERRIDE;
bool visit(AST::ForStatement *ast) QTC_OVERRIDE;
bool visit(AST::LocalForStatement *ast) QTC_OVERRIDE;
bool visit(AST::WhileStatement *ast) QTC_OVERRIDE;
bool visit(AST::DoWhileStatement *ast) QTC_OVERRIDE;
bool visit(AST::CaseBlock *ast) QTC_OVERRIDE;
bool visit(AST::NewExpression *ast) QTC_OVERRIDE;
bool visit(AST::NewMemberExpression *ast) QTC_OVERRIDE;
bool visit(AST::CallExpression *ast) QTC_OVERRIDE;
bool visit(AST::StatementList *ast) QTC_OVERRIDE;
bool visit(AST::ReturnStatement *ast) QTC_OVERRIDE;
bool visit(AST::ThrowStatement *ast) QTC_OVERRIDE;
bool visit(AST::DeleteExpression *ast) QTC_OVERRIDE;
bool visit(AST::TypeOfExpression *ast) QTC_OVERRIDE;
void endVisit(QmlJS::AST::UiObjectInitializer *) QTC_OVERRIDE;
private:
void visitQmlObject(AST::Node *ast, AST::UiQualifiedId *typeId,
......
......@@ -34,6 +34,7 @@
#include "qmljsscanner.h"
#include <utils/qtcoverride.h>
#include <QStack>
#include <QList>
#include <QVector>
......@@ -323,8 +324,8 @@ public:
void setIndentSize(int size);
protected:
virtual void onEnter(int newState, int *indentDepth, int *savedIndentDepth) const;
virtual void adjustIndent(const QList<QmlJS::Token> &tokens, int lexerState, int *indentDepth) const;
void onEnter(int newState, int *indentDepth, int *savedIndentDepth) const QTC_OVERRIDE;
void adjustIndent(const QList<QmlJS::Token> &tokens, int lexerState, int *indentDepth) const QTC_OVERRIDE;
private:
int m_indentSize;
......
This diff is collapsed.
This diff is collapsed.
......@@ -33,6 +33,7 @@
#include "qmljs_global.h"
#include "parser/qmljsastvisitor_p.h"
#include "qmljsdocument.h"
#include <utils/qtcoverride.h>
namespace QmlJS {
......@@ -48,13 +49,13 @@ protected:
using Visitor::visit;
virtual bool preVisit(AST::Node *node);
virtual bool visit(AST::UiPublicMember *node);
virtual bool visit(AST::UiScriptBinding *node);
virtual bool visit(AST::UiObjectDefinition *node);
virtual bool visit(AST::UiObjectBinding *node);
virtual bool visit(AST::FunctionDeclaration *node);
virtual bool visit(AST::FunctionExpression *node);
bool preVisit(AST::Node *node) QTC_OVERRIDE;
bool visit(AST::UiPublicMember *node) QTC_OVERRIDE;
bool visit(AST::UiScriptBinding *node) QTC_OVERRIDE;
bool visit(AST::UiObjectDefinition *node) QTC_OVERRIDE;
bool visit(AST::UiObjectBinding *node) QTC_OVERRIDE;
bool visit(AST::FunctionDeclaration *node) QTC_OVERRIDE;
bool visit(AST::FunctionExpression *node) QTC_OVERRIDE;
private:
bool containsOffset(AST::SourceLocation start, AST::SourceLocation end);
......
......@@ -33,6 +33,8 @@
#include <qmljs/qmljs_global.h>
#include <qmljs/parser/qmljsastfwd_p.h>
#include <utils/qtcoverride.h>
#include <QHash>
#include <QList>
#include <QStringList>
......@@ -120,9 +122,9 @@ public:
SimpleReaderNode::Ptr readFromSource(const QString &source);
protected:
virtual void elementStart(const QString &name);
virtual void elementEnd();
virtual void propertyDefinition(const QString &name, const QVariant &value);
void elementStart(const QString &name) QTC_OVERRIDE;
void elementEnd() QTC_OVERRIDE;
void propertyDefinition(const QString &name, const QVariant &value) QTC_OVERRIDE;
private:
SimpleReaderNode::Ptr m_rootNode;
......
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