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;
......
......@@ -34,6 +34,8 @@
#include "qmljsdocument.h"
#include "qmljsscopechain.h"
#include <utils/qtcoverride.h>
namespace QmlJS {
class ValueOwner;
......@@ -46,7 +48,7 @@ class QMLJS_EXPORT Evaluate: protected AST::Visitor
{
public:
Evaluate(const ScopeChain *scopeChain, ReferenceContext *referenceContext = 0);
virtual ~Evaluate();
~Evaluate() QTC_OVERRIDE;
// same as value()
const Value *operator()(AST::Node *ast);
......@@ -63,99 +65,99 @@ protected:
const Value *switchResult(const Value *result);
// Ui
virtual bool visit(AST::UiProgram *ast);
virtual bool visit(AST::UiHeaderItemList *ast);
virtual bool visit(AST::UiQualifiedPragmaId *ast);
virtual bool visit(AST::UiPragma *ast);
virtual bool visit(AST::UiImport *ast);
virtual bool visit(AST::UiPublicMember *ast);
virtual bool visit(AST::UiSourceElement *ast);
virtual bool visit(AST::UiObjectDefinition *ast);
virtual bool visit(AST::UiObjectInitializer *ast);
virtual bool visit(AST::UiObjectBinding *ast);
virtual bool visit(AST::UiScriptBinding *ast);
virtual bool visit(AST::UiArrayBinding *ast);
virtual bool visit(AST::UiObjectMemberList *ast);
virtual bool visit(AST::UiArrayMemberList *ast);
virtual bool visit(AST::UiQualifiedId *ast);
bool visit(AST::UiProgram *ast) QTC_OVERRIDE;
bool visit(AST::UiHeaderItemList *ast) QTC_OVERRIDE;
bool visit(AST::UiQualifiedPragmaId *ast) QTC_OVERRIDE;
bool visit(AST::UiPragma *ast) QTC_OVERRIDE;
bool visit(AST::UiImport *ast) QTC_OVERRIDE;
bool visit(AST::UiPublicMember *ast) QTC_OVERRIDE;
bool visit(AST::UiSourceElement *ast) QTC_OVERRIDE;
bool visit(AST::UiObjectDefinition *ast) QTC_OVERRIDE;
bool visit(AST::UiObjectInitializer *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::UiObjectMemberList *ast) QTC_OVERRIDE;
bool visit(AST::UiArrayMemberList *ast) QTC_OVERRIDE;
bool visit(AST::UiQualifiedId *ast) QTC_OVERRIDE;
// QmlJS
virtual bool visit(AST::ThisExpression *ast);
virtual bool visit(AST::IdentifierExpression *ast);
virtual bool visit(AST::NullExpression *ast);
virtual bool visit(AST::TrueLiteral *ast);
virtual bool visit(AST::FalseLiteral *ast);
virtual bool visit(AST::StringLiteral *ast);
virtual bool visit(AST::NumericLiteral *ast);
virtual bool visit(AST::RegExpLiteral *ast);
virtual bool visit(AST::ArrayLiteral *ast);
virtual bool visit(AST::ObjectLiteral *ast);
virtual bool visit(AST::ElementList *ast);
virtual bool visit(AST::Elision *ast);
virtual bool visit(AST::PropertyAssignmentList *ast);
virtual bool visit(AST::PropertyGetterSetter *ast);
virtual bool visit(AST::PropertyNameAndValue *ast);
virtual bool visit(AST::NestedExpression *ast);
virtual bool visit(AST::IdentifierPropertyName *ast);
virtual bool visit(AST::StringLiteralPropertyName *ast);
virtual bool visit(AST::NumericLiteralPropertyName *ast);
virtual bool visit(AST::ArrayMemberExpression *ast);
virtual bool visit(AST::FieldMemberExpression *ast);
virtual bool visit(AST::NewMemberExpression *ast);
virtual bool visit(AST::NewExpression *ast);
virtual bool visit(AST::CallExpression *ast);
virtual bool visit(AST::ArgumentList *ast);
virtual bool visit(AST::PostIncrementExpression *ast);
virtual bool visit(AST::PostDecrementExpression *ast);
virtual bool visit(AST::DeleteExpression *ast);
virtual bool visit(AST::VoidExpression *ast);
virtual bool visit(AST::TypeOfExpression *ast);
virtual bool visit(AST::PreIncrementExpression *ast);
virtual bool visit(AST::PreDecrementExpression *ast);
virtual bool visit(AST::UnaryPlusExpression *ast);
virtual bool visit(AST::UnaryMinusExpression *ast);
virtual bool visit(AST::TildeExpression *ast);
virtual bool visit(AST::NotExpression *ast);
virtual bool visit(AST::BinaryExpression *ast);
virtual bool visit(AST::ConditionalExpression *ast);
virtual bool visit(AST::Expression *ast);
virtual bool visit(AST::Block *ast);
virtual bool visit(AST::StatementList *ast);
virtual bool visit(AST::VariableStatement *ast);
virtual bool visit(AST::VariableDeclarationList *ast);
virtual bool visit(AST::VariableDeclaration *ast);
virtual bool visit(AST::EmptyStatement *ast);
virtual bool visit(AST::ExpressionStatement *ast);
virtual bool visit(AST::IfStatement *ast);
virtual bool visit(AST::DoWhileStatement *ast);
virtual bool visit(AST::WhileStatement *ast);
virtual bool visit(AST::ForStatement *ast);
virtual bool visit(AST::LocalForStatement *ast);
virtual bool visit(AST::ForEachStatement *ast);
virtual bool visit(AST::LocalForEachStatement *ast);
virtual bool visit(AST::ContinueStatement *ast);
virtual bool visit(AST::BreakStatement *ast);
virtual bool visit(AST::ReturnStatement *ast);
virtual bool visit(AST::WithStatement *ast);
virtual bool visit(AST::SwitchStatement *ast);
virtual bool visit(AST::CaseBlock *ast);
virtual bool visit(AST::CaseClauses *ast);
virtual bool visit(AST::CaseClause *ast);
virtual bool visit(AST::DefaultClause *ast);
virtual bool visit(AST::LabelledStatement *ast);
virtual bool visit(AST::ThrowStatement *ast);
virtual bool visit(AST::TryStatement *ast);
virtual bool visit(AST::Catch *ast);
virtual bool visit(AST::Finally *ast);
virtual bool visit(AST::FunctionDeclaration *ast);
virtual bool visit(AST::FunctionExpression *ast);
virtual bool visit(AST::FormalParameterList *ast);
virtual bool visit(AST::FunctionBody *ast);
virtual bool visit(AST::Program *ast);
virtual bool visit(AST::SourceElements *ast);
virtual bool visit(AST::FunctionSourceElement *ast);
virtual bool visit(AST::StatementSourceElement *ast);
virtual bool visit(AST::DebuggerStatement *ast);
bool visit(AST::ThisExpression *ast) QTC_OVERRIDE;
bool visit(AST::IdentifierExpression *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::StringLiteral *ast) QTC_OVERRIDE;
bool visit(AST::NumericLiteral *ast) QTC_OVERRIDE;
bool visit(AST::RegExpLiteral *ast) QTC_OVERRIDE;
bool visit(AST::ArrayLiteral *ast) QTC_OVERRIDE;
bool visit(AST::ObjectLiteral *ast) QTC_OVERRIDE;
bool visit(AST::ElementList *ast) QTC_OVERRIDE;
bool visit(AST::Elision *ast) QTC_OVERRIDE;
bool visit(AST::PropertyAssignmentList *ast) QTC_OVERRIDE;
bool visit(AST::PropertyGetterSetter *ast) QTC_OVERRIDE;
bool visit(AST::PropertyNameAndValue *ast) QTC_OVERRIDE;
bool visit(AST::NestedExpression *ast) QTC_OVERRIDE;
bool visit(AST::IdentifierPropertyName *ast) QTC_OVERRIDE;
bool visit(AST::StringLiteralPropertyName *ast) QTC_OVERRIDE;
bool visit(AST::NumericLiteralPropertyName *ast) QTC_OVERRIDE;
bool visit(AST::ArrayMemberExpression *ast) QTC_OVERRIDE;
bool visit(AST::FieldMemberExpression *ast) QTC_OVERRIDE;
bool visit(AST::NewMemberExpression *ast) QTC_OVERRIDE;
bool visit(AST::NewExpression *ast) QTC_OVERRIDE;
bool visit(AST::CallExpression *ast) QTC_OVERRIDE;
bool visit(AST::ArgumentList *ast) QTC_OVERRIDE;
bool visit(AST::PostIncrementExpression *ast) QTC_OVERRIDE;
bool visit(AST::PostDecrementExpression *ast) QTC_OVERRIDE;
bool visit(AST::DeleteExpression *ast) QTC_OVERRIDE;
bool visit(AST::VoidExpression *ast) QTC_OVERRIDE;
bool visit(AST::TypeOfExpression *ast) QTC_OVERRIDE;
bool visit(AST::PreIncrementExpression *ast) QTC_OVERRIDE;
bool visit(AST::PreDecrementExpression *ast) QTC_OVERRIDE;
bool visit(AST::UnaryPlusExpression *ast) QTC_OVERRIDE;
bool visit(AST::UnaryMinusExpression *ast) QTC_OVERRIDE;
bool visit(AST::TildeExpression *ast) QTC_OVERRIDE;
bool visit(AST::NotExpression *ast) QTC_OVERRIDE;
bool visit(AST::BinaryExpression *ast) QTC_OVERRIDE;
bool visit(AST::ConditionalExpression *ast) QTC_OVERRIDE;
bool visit(AST::Expression *ast) QTC_OVERRIDE;
bool visit(AST::Block *ast) QTC_OVERRIDE;
bool visit(AST::StatementList *ast) QTC_OVERRIDE;
bool visit(AST::VariableStatement *ast) QTC_OVERRIDE;
bool visit(AST::VariableDeclarationList *ast) QTC_OVERRIDE;
bool visit(AST::VariableDeclaration *ast) QTC_OVERRIDE;
bool visit(AST::EmptyStatement *ast) QTC_OVERRIDE;
bool visit(AST::ExpressionStatement *ast) QTC_OVERRIDE;
bool visit(AST::IfStatement *ast) QTC_OVERRIDE;
bool visit(AST::DoWhileStatement *ast) QTC_OVERRIDE;
bool visit(AST::WhileStatement *ast) QTC_OVERRIDE;
bool visit(AST::ForStatement *ast) QTC_OVERRIDE;
bool visit(AST::LocalForStatement *ast) QTC_OVERRIDE;
bool visit(AST::ForEachStatement *ast) QTC_OVERRIDE;
bool visit(AST::LocalForEachStatement *ast) QTC_OVERRIDE;
bool visit(AST::ContinueStatement *ast) QTC_OVERRIDE;
bool visit(AST::BreakStatement *ast) QTC_OVERRIDE;
bool visit(AST::ReturnStatement *ast) QTC_OVERRIDE;
bool visit(AST::WithStatement *ast) QTC_OVERRIDE;
bool visit(AST::SwitchStatement *ast) QTC_OVERRIDE;
bool visit(AST::CaseBlock *ast) QTC_OVERRIDE;
bool visit(AST::CaseClauses *ast) QTC_OVERRIDE;
bool visit(AST::CaseClause *ast) QTC_OVERRIDE;
bool visit(AST::DefaultClause *ast) QTC_OVERRIDE;
bool visit(AST::LabelledStatement *ast) QTC_OVERRIDE;
bool visit(AST::ThrowStatement *ast) QTC_OVERRIDE;
bool visit(AST::TryStatement *ast) QTC_OVERRIDE;
bool visit(AST::Catch *ast) QTC_OVERRIDE;
bool visit(AST::Finally *ast) QTC_OVERRIDE;
bool visit(AST::FunctionDeclaration *ast) QTC_OVERRIDE;
bool visit(AST::FunctionExpression *ast) QTC_OVERRIDE;
bool visit(AST::FormalParameterList *ast) QTC_OVERRIDE;
bool visit(AST::FunctionBody *ast) QTC_OVERRIDE;
bool visit(AST::Program *ast) QTC_OVERRIDE;
bool visit(AST::SourceElements *ast) QTC_OVERRIDE;
bool visit(AST::FunctionSourceElement *ast) QTC_OVERRIDE;
bool visit(AST::StatementSourceElement *ast) QTC_OVERRIDE;
bool visit(AST::DebuggerStatement *ast) QTC_OVERRIDE;
private:
QmlJS::Document::Ptr _doc;
......
<
......@@ -34,6 +34,7 @@
#include <qmljs/qmljs_global.h>
#include <qmljs/qmljsconstants.h>
#include <qmljs/qmljsimportdependencies.h>
#include <utils/qtcoverride.h>
#include <QFileInfoList>
#include <QList>
......@@ -275,61 +276,61 @@ template <> Q_INLINE_TEMPLATE const ASTSignal *value_cast(const Value *v)
class QMLJS_EXPORT NullValue: public Value
{
public:
virtual const NullValue *asNullValue() const;
virtual void accept(ValueVisitor *visitor) const;
const NullValue *asNullValue() const QTC_OVERRIDE;
void accept(ValueVisitor *visitor) const QTC_OVERRIDE;
};
class QMLJS_EXPORT UndefinedValue: public Value
{
public:
virtual const UndefinedValue *asUndefinedValue() const;
virtual void accept(ValueVisitor *visitor) const;
const UndefinedValue *asUndefinedValue() const QTC_OVERRIDE;
void accept(ValueVisitor *visitor) const QTC_OVERRIDE;
};
class QMLJS_EXPORT UnknownValue: public Value
{
public:
virtual const UnknownValue *asUnknownValue() const;
virtual void accept(ValueVisitor *) const;
const UnknownValue *asUnknownValue() const QTC_OVERRIDE;
void accept(ValueVisitor *) const QTC_OVERRIDE;
};
class QMLJS_EXPORT NumberValue: public Value
{
public:
virtual const NumberValue *asNumberValue() const;
virtual void accept(ValueVisitor *visitor) const;
const NumberValue *asNumberValue() const QTC_OVERRIDE;
void accept(ValueVisitor *visitor) const QTC_OVERRIDE;
};
class QMLJS_EXPORT RealValue: public NumberValue
{
public:
virtual const RealValue *asRealValue() const;
const RealValue *asRealValue() const QTC_OVERRIDE;
};
class QMLJS_EXPORT IntValue: public NumberValue
{
public:
virtual const IntValue *asIntValue() const;
const IntValue *asIntValue() const QTC_OVERRIDE;
};
class QMLJS_EXPORT BooleanValue: public Value
{
public:
virtual const BooleanValue *asBooleanValue() const;
virtual void accept(ValueVisitor *visitor) const;
const BooleanValue *asBooleanValue() const QTC_OVERRIDE;
void accept(ValueVisitor *visitor) const QTC_OVERRIDE;
};
class QMLJS_EXPORT StringValue: public Value
{
public:
virtual const StringValue *asStringValue() const;
virtual void accept(ValueVisitor *visitor) const;
const StringValue *asStringValue() const QTC_OVERRIDE;
void accept(ValueVisitor *visitor) const QTC_OVERRIDE;
};
class QMLJS_EXPORT UrlValue: public StringValue
{
public:
virtual const UrlValue *asUrlValue() const;
const UrlValue *asUrlValue() const QTC_OVERRIDE;
};
class QMLJS_EXPORT MemberProcessor
......@@ -353,13 +354,13 @@ class QMLJS_EXPORT Reference: public Value
{
public:
Reference(ValueOwner *valueOwner);
virtual ~Reference();
~Reference() QTC_OVERRIDE;
ValueOwner *valueOwner() const;
// Value interface
virtual const Reference *asReference() const;
virtual void accept(ValueVisitor *) const;
const Reference *asReference() const QTC_OVERRIDE;
void accept(ValueVisitor *) const QTC_OVERRIDE;
private:
virtual const Value *value(ReferenceContext *referenceContext) const;
......@@ -372,23 +373,23 @@ class QMLJS_EXPORT ColorValue: public Value
{
public:
// Value interface
virtual const ColorValue *asColorValue() const;
virtual void accept(ValueVisitor *) const;
const ColorValue *asColorValue() const QTC_OVERRIDE;
void accept(ValueVisitor *) const QTC_OVERRIDE;
};
class QMLJS_EXPORT AnchorLineValue: public Value
{
public:
// Value interface
virtual const AnchorLineValue *asAnchorLineValue() const;
virtual void accept(ValueVisitor *) const;
const AnchorLineValue *asAnchorLineValue() const QTC_OVERRIDE;
void accept(ValueVisitor *) const QTC_OVERRIDE;
};
class QMLJS_EXPORT ObjectValue: public Value
{
public:
ObjectValue(ValueOwner *valueOwner);
virtual ~ObjectValue();
~ObjectValue() QTC_OVERRIDE;
ValueOwner *valueOwner() const;
......@@ -411,14 +412,14 @@ public:
virtual const Value *lookupMember(const QString &name, const Context *context,
const ObjectValue **foundInObject = 0,
bool examinePrototypes = true) const;
const Value *lookupMember(const QString &name, const ContextPtr &context,
virtual const Value *lookupMember(const QString &name, const ContextPtr &context,
const ObjectValue **foundInObject = 0,
bool examinePrototypes = true) const
{ return lookupMember(name, context.data(), foundInObject, examinePrototypes); }
// Value interface
virtual const ObjectValue *asObjectValue() const;
virtual void accept(ValueVisitor *visitor) const;
const ObjectValue *asObjectValue() const QTC_OVERRIDE;
void accept(ValueVisitor *visitor) const QTC_OVERRIDE;
private:
bool checkPrototype(const ObjectValue *prototype, QSet<const ObjectValue *> *processed) const;
......@@ -464,9 +465,9 @@ class QMLJS_EXPORT QmlEnumValue: public NumberValue
{
public:
QmlEnumValue(const CppComponentValue *owner, int index);
virtual ~QmlEnumValue();
~QmlEnumValue() QTC_OVERRIDE;
virtual const QmlEnumValue *asQmlEnumValue() const;
const QmlEnumValue *asQmlEnumValue() const QTC_OVERRIDE;
QString name() const;