forked from qt-creator/qt-creator
Prefer using 'override' instead of 'virtual'
warning: prefer using 'override' or (rarely) 'final' instead of 'virtual' [modernize-use-override] Change-Id: I6dac7a62b627fa1353b4455e1af92f869c2571cc Reviewed-by: Marco Benelli <marco.benelli@qt.io>
This commit is contained in:
@@ -142,34 +142,34 @@ protected:
|
||||
|
||||
using SymbolVisitor::visit;
|
||||
|
||||
virtual bool preVisit(Symbol *)
|
||||
bool preVisit(Symbol *) override
|
||||
{ return ! _scope; }
|
||||
|
||||
virtual bool visit(UsingNamespaceDirective *) { return false; }
|
||||
virtual bool visit(UsingDeclaration *) { return false; }
|
||||
virtual bool visit(NamespaceAlias *) { return false; }
|
||||
virtual bool visit(Declaration *) { return false; }
|
||||
virtual bool visit(Argument *) { return false; }
|
||||
virtual bool visit(TypenameArgument *) { return false; }
|
||||
virtual bool visit(BaseClass *) { return false; }
|
||||
virtual bool visit(ForwardClassDeclaration *) { return false; }
|
||||
bool visit(UsingNamespaceDirective *) override { return false; }
|
||||
bool visit(UsingDeclaration *) override { return false; }
|
||||
bool visit(NamespaceAlias *) override { return false; }
|
||||
bool visit(Declaration *) override { return false; }
|
||||
bool visit(Argument *) override { return false; }
|
||||
bool visit(TypenameArgument *) override { return false; }
|
||||
bool visit(BaseClass *) override { return false; }
|
||||
bool visit(ForwardClassDeclaration *) override { return false; }
|
||||
|
||||
virtual bool visit(Enum *symbol)
|
||||
bool visit(Enum *symbol) override
|
||||
{ return process(symbol); }
|
||||
|
||||
virtual bool visit(Function *symbol)
|
||||
bool visit(Function *symbol) override
|
||||
{ return process(symbol); }
|
||||
|
||||
virtual bool visit(Namespace *symbol)
|
||||
bool visit(Namespace *symbol) override
|
||||
{ return process(symbol); }
|
||||
|
||||
virtual bool visit(Class *symbol)
|
||||
bool visit(Class *symbol) override
|
||||
{ return process(symbol); }
|
||||
|
||||
virtual bool visit(Block *symbol)
|
||||
bool visit(Block *symbol) override
|
||||
{ return process(symbol); }
|
||||
|
||||
virtual bool visit(Template *symbol)
|
||||
bool visit(Template *symbol) override
|
||||
{
|
||||
if (Symbol *decl = symbol->declaration()) {
|
||||
if (decl->isFunction() || decl->isClass() || decl->isDeclaration())
|
||||
@@ -179,19 +179,19 @@ protected:
|
||||
}
|
||||
|
||||
// Objective-C
|
||||
virtual bool visit(ObjCBaseClass *) { return false; }
|
||||
virtual bool visit(ObjCBaseProtocol *) { return false; }
|
||||
virtual bool visit(ObjCForwardClassDeclaration *) { return false; }
|
||||
virtual bool visit(ObjCForwardProtocolDeclaration *) { return false; }
|
||||
virtual bool visit(ObjCPropertyDeclaration *) { return false; }
|
||||
bool visit(ObjCBaseClass *) override { return false; }
|
||||
bool visit(ObjCBaseProtocol *) override { return false; }
|
||||
bool visit(ObjCForwardClassDeclaration *) override { return false; }
|
||||
bool visit(ObjCForwardProtocolDeclaration *) override { return false; }
|
||||
bool visit(ObjCPropertyDeclaration *) override { return false; }
|
||||
|
||||
virtual bool visit(ObjCClass *symbol)
|
||||
bool visit(ObjCClass *symbol) override
|
||||
{ return process(symbol); }
|
||||
|
||||
virtual bool visit(ObjCProtocol *symbol)
|
||||
bool visit(ObjCProtocol *symbol) override
|
||||
{ return process(symbol); }
|
||||
|
||||
virtual bool visit(ObjCMethod *symbol)
|
||||
bool visit(ObjCMethod *symbol) override
|
||||
{ return process(symbol); }
|
||||
};
|
||||
|
||||
@@ -209,10 +209,10 @@ public:
|
||||
errorCount(0)
|
||||
{ }
|
||||
|
||||
virtual void report(int level,
|
||||
const StringLiteral *fileId,
|
||||
unsigned line, unsigned column,
|
||||
const char *format, va_list ap)
|
||||
void report(int level,
|
||||
const StringLiteral *fileId,
|
||||
unsigned line, unsigned column,
|
||||
const char *format, va_list ap) override
|
||||
{
|
||||
if (level == Error) {
|
||||
++errorCount;
|
||||
|
@@ -73,52 +73,52 @@ public:
|
||||
return (!temps.isEmpty()) ? temps.takeLast() : ty;
|
||||
}
|
||||
|
||||
virtual void visit(UndefinedType *)
|
||||
void visit(UndefinedType *) override
|
||||
{
|
||||
temps.append(FullySpecifiedType());
|
||||
}
|
||||
|
||||
virtual void visit(VoidType *)
|
||||
void visit(VoidType *) override
|
||||
{
|
||||
temps.append(control()->voidType());
|
||||
}
|
||||
|
||||
virtual void visit(IntegerType *type)
|
||||
void visit(IntegerType *type) override
|
||||
{
|
||||
temps.append(control()->integerType(type->kind()));
|
||||
}
|
||||
|
||||
virtual void visit(FloatType *type)
|
||||
void visit(FloatType *type) override
|
||||
{
|
||||
temps.append(control()->floatType(type->kind()));
|
||||
}
|
||||
|
||||
virtual void visit(PointerToMemberType *type)
|
||||
void visit(PointerToMemberType *type) override
|
||||
{
|
||||
const Name *memberName = rewrite->rewriteName(type->memberName());
|
||||
const FullySpecifiedType elementType = rewrite->rewriteType(type->elementType());
|
||||
temps.append(control()->pointerToMemberType(memberName, elementType));
|
||||
}
|
||||
|
||||
virtual void visit(PointerType *type)
|
||||
void visit(PointerType *type) override
|
||||
{
|
||||
const FullySpecifiedType elementType = rewrite->rewriteType(type->elementType());
|
||||
temps.append(control()->pointerType(elementType));
|
||||
}
|
||||
|
||||
virtual void visit(ReferenceType *type)
|
||||
void visit(ReferenceType *type) override
|
||||
{
|
||||
const FullySpecifiedType elementType = rewrite->rewriteType(type->elementType());
|
||||
temps.append(control()->referenceType(elementType, type->isRvalueReference()));
|
||||
}
|
||||
|
||||
virtual void visit(ArrayType *type)
|
||||
void visit(ArrayType *type) override
|
||||
{
|
||||
const FullySpecifiedType elementType = rewrite->rewriteType(type->elementType());
|
||||
temps.append(control()->arrayType(elementType, type->size()));
|
||||
}
|
||||
|
||||
virtual void visit(NamedType *type)
|
||||
void visit(NamedType *type) override
|
||||
{
|
||||
FullySpecifiedType ty = rewrite->env->apply(type->name(), rewrite);
|
||||
if (! ty->isUndefinedType()) {
|
||||
@@ -129,7 +129,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
virtual void visit(Function *type)
|
||||
void visit(Function *type) override
|
||||
{
|
||||
Function *funTy = control()->newFunction(0, 0);
|
||||
funTy->copy(type);
|
||||
@@ -158,55 +158,55 @@ public:
|
||||
temps.append(funTy);
|
||||
}
|
||||
|
||||
virtual void visit(Namespace *type)
|
||||
void visit(Namespace *type) override
|
||||
{
|
||||
qWarning() << Q_FUNC_INFO;
|
||||
temps.append(type);
|
||||
}
|
||||
|
||||
virtual void visit(Class *type)
|
||||
void visit(Class *type) override
|
||||
{
|
||||
qWarning() << Q_FUNC_INFO;
|
||||
temps.append(type);
|
||||
}
|
||||
|
||||
virtual void visit(Enum *type)
|
||||
void visit(Enum *type) override
|
||||
{
|
||||
qWarning() << Q_FUNC_INFO;
|
||||
temps.append(type);
|
||||
}
|
||||
|
||||
virtual void visit(ForwardClassDeclaration *type)
|
||||
void visit(ForwardClassDeclaration *type) override
|
||||
{
|
||||
qWarning() << Q_FUNC_INFO;
|
||||
temps.append(type);
|
||||
}
|
||||
|
||||
virtual void visit(ObjCClass *type)
|
||||
void visit(ObjCClass *type) override
|
||||
{
|
||||
qWarning() << Q_FUNC_INFO;
|
||||
temps.append(type);
|
||||
}
|
||||
|
||||
virtual void visit(ObjCProtocol *type)
|
||||
void visit(ObjCProtocol *type) override
|
||||
{
|
||||
qWarning() << Q_FUNC_INFO;
|
||||
temps.append(type);
|
||||
}
|
||||
|
||||
virtual void visit(ObjCMethod *type)
|
||||
void visit(ObjCMethod *type) override
|
||||
{
|
||||
qWarning() << Q_FUNC_INFO;
|
||||
temps.append(type);
|
||||
}
|
||||
|
||||
virtual void visit(ObjCForwardClassDeclaration *type)
|
||||
void visit(ObjCForwardClassDeclaration *type) override
|
||||
{
|
||||
qWarning() << Q_FUNC_INFO;
|
||||
temps.append(type);
|
||||
}
|
||||
|
||||
virtual void visit(ObjCForwardProtocolDeclaration *type)
|
||||
void visit(ObjCForwardProtocolDeclaration *type) override
|
||||
{
|
||||
qWarning() << Q_FUNC_INFO;
|
||||
temps.append(type);
|
||||
@@ -242,19 +242,19 @@ public:
|
||||
return (!temps.isEmpty()) ? temps.takeLast() : name;
|
||||
}
|
||||
|
||||
virtual void visit(const QualifiedNameId *name)
|
||||
void visit(const QualifiedNameId *name) override
|
||||
{
|
||||
const Name *base = rewrite->rewriteName(name->base());
|
||||
const Name *n = rewrite->rewriteName(name->name());
|
||||
temps.append(control()->qualifiedNameId(base, n));
|
||||
}
|
||||
|
||||
virtual void visit(const Identifier *name)
|
||||
void visit(const Identifier *name) override
|
||||
{
|
||||
temps.append(control()->identifier(name->chars(), name->size()));
|
||||
}
|
||||
|
||||
virtual void visit(const TemplateNameId *name)
|
||||
void visit(const TemplateNameId *name) override
|
||||
{
|
||||
QVarLengthArray<FullySpecifiedType, 8> args(name->templateArgumentCount());
|
||||
for (unsigned i = 0; i < name->templateArgumentCount(); ++i)
|
||||
@@ -263,23 +263,23 @@ public:
|
||||
args.data(), args.size()));
|
||||
}
|
||||
|
||||
virtual void visit(const DestructorNameId *name)
|
||||
void visit(const DestructorNameId *name) override
|
||||
{
|
||||
temps.append(control()->destructorNameId(identifier(name->identifier())));
|
||||
}
|
||||
|
||||
virtual void visit(const OperatorNameId *name)
|
||||
void visit(const OperatorNameId *name) override
|
||||
{
|
||||
temps.append(control()->operatorNameId(name->kind()));
|
||||
}
|
||||
|
||||
virtual void visit(const ConversionNameId *name)
|
||||
void visit(const ConversionNameId *name) override
|
||||
{
|
||||
FullySpecifiedType ty = rewrite->rewriteType(name->type());
|
||||
temps.append(control()->conversionNameId(ty));
|
||||
}
|
||||
|
||||
virtual void visit(const SelectorNameId *name)
|
||||
void visit(const SelectorNameId *name) override
|
||||
{
|
||||
QVarLengthArray<const Name *, 8> names(name->nameCount());
|
||||
for (unsigned i = 0; i < name->nameCount(); ++i)
|
||||
|
@@ -81,48 +81,48 @@ private:
|
||||
return previousType;
|
||||
}
|
||||
|
||||
virtual void visit(VoidType *)
|
||||
void visit(VoidType *) override
|
||||
{
|
||||
// nothing to do
|
||||
}
|
||||
|
||||
virtual void visit(IntegerType *)
|
||||
void visit(IntegerType *) override
|
||||
{
|
||||
// nothing to do
|
||||
}
|
||||
|
||||
virtual void visit(FloatType *)
|
||||
void visit(FloatType *) override
|
||||
{
|
||||
// nothing to do
|
||||
}
|
||||
|
||||
virtual void visit(PointerToMemberType *)
|
||||
void visit(PointerToMemberType *) override
|
||||
{
|
||||
qDebug() << Q_FUNC_INFO; // ### TODO
|
||||
}
|
||||
|
||||
virtual void visit(PointerType *ptrTy)
|
||||
void visit(PointerType *ptrTy) override
|
||||
{
|
||||
_type.setType(control()->pointerType(q->apply(ptrTy->elementType())));
|
||||
}
|
||||
|
||||
virtual void visit(ReferenceType *refTy)
|
||||
void visit(ReferenceType *refTy) override
|
||||
{
|
||||
_type.setType(control()->referenceType(q->apply(refTy->elementType()), refTy->isRvalueReference()));
|
||||
}
|
||||
|
||||
virtual void visit(ArrayType *arrayTy)
|
||||
void visit(ArrayType *arrayTy) override
|
||||
{
|
||||
_type.setType(control()->arrayType(q->apply(arrayTy->elementType()), arrayTy->size()));
|
||||
}
|
||||
|
||||
virtual void visit(NamedType *ty)
|
||||
void visit(NamedType *ty) override
|
||||
{
|
||||
FullySpecifiedType n = q->apply(ty->name());
|
||||
_type.setType(n.type());
|
||||
}
|
||||
|
||||
virtual void visit(Function *funTy)
|
||||
void visit(Function *funTy) override
|
||||
{
|
||||
Function *fun = control()->newFunction(/*sourceLocation=*/ 0, funTy->name());
|
||||
fun->setEnclosingScope(funTy->enclosingScope());
|
||||
@@ -149,47 +149,47 @@ private:
|
||||
_type.setType(fun);
|
||||
}
|
||||
|
||||
virtual void visit(Namespace *)
|
||||
void visit(Namespace *) override
|
||||
{
|
||||
qDebug() << Q_FUNC_INFO;
|
||||
}
|
||||
|
||||
virtual void visit(Class *)
|
||||
void visit(Class *) override
|
||||
{
|
||||
qDebug() << Q_FUNC_INFO;
|
||||
}
|
||||
|
||||
virtual void visit(Enum *)
|
||||
void visit(Enum *) override
|
||||
{
|
||||
qDebug() << Q_FUNC_INFO;
|
||||
}
|
||||
|
||||
virtual void visit(ForwardClassDeclaration *)
|
||||
void visit(ForwardClassDeclaration *) override
|
||||
{
|
||||
qDebug() << Q_FUNC_INFO;
|
||||
}
|
||||
|
||||
virtual void visit(ObjCClass *)
|
||||
void visit(ObjCClass *) override
|
||||
{
|
||||
qDebug() << Q_FUNC_INFO;
|
||||
}
|
||||
|
||||
virtual void visit(ObjCProtocol *)
|
||||
void visit(ObjCProtocol *) override
|
||||
{
|
||||
qDebug() << Q_FUNC_INFO;
|
||||
}
|
||||
|
||||
virtual void visit(ObjCMethod *)
|
||||
void visit(ObjCMethod *) override
|
||||
{
|
||||
qDebug() << Q_FUNC_INFO;
|
||||
}
|
||||
|
||||
virtual void visit(ObjCForwardClassDeclaration *)
|
||||
void visit(ObjCForwardClassDeclaration *) override
|
||||
{
|
||||
qDebug() << Q_FUNC_INFO;
|
||||
}
|
||||
|
||||
virtual void visit(ObjCForwardProtocolDeclaration *)
|
||||
void visit(ObjCForwardProtocolDeclaration *) override
|
||||
{
|
||||
qDebug() << Q_FUNC_INFO;
|
||||
}
|
||||
@@ -229,7 +229,7 @@ private:
|
||||
return previousType;
|
||||
}
|
||||
|
||||
virtual void visit(const Identifier *name)
|
||||
void visit(const Identifier *name) override
|
||||
{
|
||||
int index = findSubstitution(name->identifier());
|
||||
|
||||
@@ -240,7 +240,7 @@ private:
|
||||
_type = control()->namedType(name);
|
||||
}
|
||||
|
||||
virtual void visit(const TemplateNameId *name)
|
||||
void visit(const TemplateNameId *name) override
|
||||
{
|
||||
QVarLengthArray<FullySpecifiedType, 8> arguments(name->templateArgumentCount());
|
||||
for (unsigned i = 0; i < name->templateArgumentCount(); ++i) {
|
||||
@@ -294,31 +294,31 @@ private:
|
||||
return 0;
|
||||
}
|
||||
|
||||
virtual void visit(const QualifiedNameId *name)
|
||||
void visit(const QualifiedNameId *name) override
|
||||
{
|
||||
if (const Name *n = instantiate(name))
|
||||
_type = control()->namedType(n);
|
||||
}
|
||||
|
||||
virtual void visit(const DestructorNameId *name)
|
||||
void visit(const DestructorNameId *name) override
|
||||
{
|
||||
Overview oo;
|
||||
qWarning() << "ignored name:" << oo.prettyName(name);
|
||||
}
|
||||
|
||||
virtual void visit(const OperatorNameId *name)
|
||||
void visit(const OperatorNameId *name) override
|
||||
{
|
||||
Overview oo;
|
||||
qWarning() << "ignored name:" << oo.prettyName(name);
|
||||
}
|
||||
|
||||
virtual void visit(const ConversionNameId *name)
|
||||
void visit(const ConversionNameId *name) override
|
||||
{
|
||||
Overview oo;
|
||||
qWarning() << "ignored name:" << oo.prettyName(name);
|
||||
}
|
||||
|
||||
virtual void visit(const SelectorNameId *name)
|
||||
void visit(const SelectorNameId *name) override
|
||||
{
|
||||
Overview oo;
|
||||
qWarning() << "ignored name:" << oo.prettyName(name);
|
||||
|
@@ -659,7 +659,7 @@ public:
|
||||
accept(tu->ast());
|
||||
}
|
||||
|
||||
virtual bool preVisit(AST *)
|
||||
bool preVisit(AST *) override
|
||||
{
|
||||
if (_block)
|
||||
return false;
|
||||
@@ -667,7 +667,7 @@ public:
|
||||
return true;
|
||||
}
|
||||
|
||||
virtual bool visit(SimpleNameAST *ast)
|
||||
bool visit(SimpleNameAST *ast) override
|
||||
{
|
||||
if (ast->name
|
||||
&& ast->name->identifier()
|
||||
@@ -678,7 +678,7 @@ public:
|
||||
return false;
|
||||
}
|
||||
|
||||
virtual bool visit(MemberAccessAST *ast)
|
||||
bool visit(MemberAccessAST *ast) override
|
||||
{
|
||||
accept(ast->base_expression);
|
||||
return false;
|
||||
|
@@ -78,7 +78,7 @@ class BinaryVersionToolTipEventFilter : public QObject
|
||||
public:
|
||||
explicit BinaryVersionToolTipEventFilter(QLineEdit *le);
|
||||
|
||||
virtual bool eventFilter(QObject *, QEvent *);
|
||||
bool eventFilter(QObject *, QEvent *) override;
|
||||
|
||||
QStringList arguments() const { return m_arguments; }
|
||||
void setArguments(const QStringList &arguments) { m_arguments = arguments; }
|
||||
|
@@ -48,7 +48,7 @@ public:
|
||||
explicit SideBarComboBox(SideBarWidget *sideBarWidget) : m_sideBarWidget(sideBarWidget) {}
|
||||
|
||||
private:
|
||||
virtual const Command *command(const QString &text) const
|
||||
const Command *command(const QString &text) const override
|
||||
{ return m_sideBarWidget->command(text); }
|
||||
|
||||
SideBarWidget *m_sideBarWidget;
|
||||
|
@@ -123,7 +123,7 @@ public:
|
||||
}
|
||||
|
||||
protected:
|
||||
virtual bool preVisit(AST *ast)
|
||||
bool preVisit(AST *ast) override
|
||||
{
|
||||
if (m_functionDefinition)
|
||||
return false;
|
||||
|
@@ -161,29 +161,29 @@ protected:
|
||||
}
|
||||
|
||||
// nothing to do
|
||||
virtual bool visit(UsingNamespaceDirective *) { return true; }
|
||||
virtual bool visit(UsingDeclaration *) { return true; }
|
||||
virtual bool visit(Argument *) { return true; }
|
||||
virtual bool visit(BaseClass *) { return true; }
|
||||
bool visit(UsingNamespaceDirective *) override { return true; }
|
||||
bool visit(UsingDeclaration *) override { return true; }
|
||||
bool visit(Argument *) override { return true; }
|
||||
bool visit(BaseClass *) override { return true; }
|
||||
|
||||
virtual bool visit(Function *symbol)
|
||||
bool visit(Function *symbol) override
|
||||
{
|
||||
addFunction(symbol->name());
|
||||
return true;
|
||||
}
|
||||
|
||||
virtual bool visit(Block *)
|
||||
bool visit(Block *) override
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
virtual bool visit(NamespaceAlias *symbol)
|
||||
bool visit(NamespaceAlias *symbol) override
|
||||
{
|
||||
addType(symbol->name());
|
||||
return true;
|
||||
}
|
||||
|
||||
virtual bool visit(Declaration *symbol)
|
||||
bool visit(Declaration *symbol) override
|
||||
{
|
||||
if (symbol->enclosingEnum() != 0)
|
||||
addStatic(symbol->name());
|
||||
@@ -199,66 +199,66 @@ protected:
|
||||
return true;
|
||||
}
|
||||
|
||||
virtual bool visit(TypenameArgument *symbol)
|
||||
bool visit(TypenameArgument *symbol) override
|
||||
{
|
||||
addType(symbol->name());
|
||||
return true;
|
||||
}
|
||||
|
||||
virtual bool visit(Enum *symbol)
|
||||
bool visit(Enum *symbol) override
|
||||
{
|
||||
addType(symbol->name());
|
||||
return true;
|
||||
}
|
||||
|
||||
virtual bool visit(Namespace *symbol)
|
||||
bool visit(Namespace *symbol) override
|
||||
{
|
||||
addType(symbol->name());
|
||||
return true;
|
||||
}
|
||||
|
||||
virtual bool visit(Template *)
|
||||
bool visit(Template *) override
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
virtual bool visit(Class *symbol)
|
||||
bool visit(Class *symbol) override
|
||||
{
|
||||
addType(symbol->name());
|
||||
return true;
|
||||
}
|
||||
|
||||
virtual bool visit(ForwardClassDeclaration *symbol)
|
||||
bool visit(ForwardClassDeclaration *symbol) override
|
||||
{
|
||||
addType(symbol->name());
|
||||
return true;
|
||||
}
|
||||
|
||||
// Objective-C
|
||||
virtual bool visit(ObjCBaseClass *) { return true; }
|
||||
virtual bool visit(ObjCBaseProtocol *) { return true; }
|
||||
virtual bool visit(ObjCPropertyDeclaration *) { return true; }
|
||||
virtual bool visit(ObjCMethod *) { return true; }
|
||||
bool visit(ObjCBaseClass *) override { return true; }
|
||||
bool visit(ObjCBaseProtocol *) override { return true; }
|
||||
bool visit(ObjCPropertyDeclaration *) override { return true; }
|
||||
bool visit(ObjCMethod *) override { return true; }
|
||||
|
||||
virtual bool visit(ObjCClass *symbol)
|
||||
bool visit(ObjCClass *symbol) override
|
||||
{
|
||||
addType(symbol->name());
|
||||
return true;
|
||||
}
|
||||
|
||||
virtual bool visit(ObjCForwardClassDeclaration *symbol)
|
||||
bool visit(ObjCForwardClassDeclaration *symbol) override
|
||||
{
|
||||
addType(symbol->name());
|
||||
return true;
|
||||
}
|
||||
|
||||
virtual bool visit(ObjCProtocol *symbol)
|
||||
bool visit(ObjCProtocol *symbol) override
|
||||
{
|
||||
addType(symbol->name());
|
||||
return true;
|
||||
}
|
||||
|
||||
virtual bool visit(ObjCForwardProtocolDeclaration *symbol)
|
||||
bool visit(ObjCForwardProtocolDeclaration *symbol) override
|
||||
{
|
||||
addType(symbol->name());
|
||||
return true;
|
||||
|
@@ -116,17 +116,17 @@ protected:
|
||||
return true;
|
||||
}
|
||||
|
||||
virtual bool visit(CaptureAST *ast)
|
||||
bool visit(CaptureAST *ast) override
|
||||
{
|
||||
return checkLocalUse(ast->identifier, ast->firstToken());
|
||||
}
|
||||
|
||||
virtual bool visit(IdExpressionAST *ast)
|
||||
bool visit(IdExpressionAST *ast) override
|
||||
{
|
||||
return checkLocalUse(ast->name, ast->firstToken());
|
||||
}
|
||||
|
||||
virtual bool visit(SizeofExpressionAST *ast)
|
||||
bool visit(SizeofExpressionAST *ast) override
|
||||
{
|
||||
if (ast->expression && ast->expression->asTypeId()) {
|
||||
TypeIdAST *typeId = ast->expression->asTypeId();
|
||||
@@ -141,7 +141,7 @@ protected:
|
||||
return true;
|
||||
}
|
||||
|
||||
virtual bool visit(CastExpressionAST *ast)
|
||||
bool visit(CastExpressionAST *ast) override
|
||||
{
|
||||
if (ast->expression && ast->expression->asUnaryExpression()) {
|
||||
TypeIdAST *typeId = ast->type_id->asTypeId();
|
||||
@@ -158,137 +158,137 @@ protected:
|
||||
return true;
|
||||
}
|
||||
|
||||
virtual bool visit(FunctionDefinitionAST *ast)
|
||||
bool visit(FunctionDefinitionAST *ast) override
|
||||
{
|
||||
if (ast->symbol)
|
||||
enterScope(ast->symbol);
|
||||
return true;
|
||||
}
|
||||
|
||||
virtual void endVisit(FunctionDefinitionAST *ast)
|
||||
void endVisit(FunctionDefinitionAST *ast) override
|
||||
{
|
||||
if (ast->symbol)
|
||||
_scopeStack.removeLast();
|
||||
}
|
||||
|
||||
virtual bool visit(LambdaExpressionAST *ast)
|
||||
bool visit(LambdaExpressionAST *ast) override
|
||||
{
|
||||
if (ast->lambda_declarator && ast->lambda_declarator->symbol)
|
||||
enterScope(ast->lambda_declarator->symbol);
|
||||
return true;
|
||||
}
|
||||
|
||||
virtual void endVisit(LambdaExpressionAST *ast)
|
||||
void endVisit(LambdaExpressionAST *ast) override
|
||||
{
|
||||
if (ast->lambda_declarator && ast->lambda_declarator->symbol)
|
||||
_scopeStack.removeLast();
|
||||
}
|
||||
|
||||
virtual bool visit(CompoundStatementAST *ast)
|
||||
bool visit(CompoundStatementAST *ast) override
|
||||
{
|
||||
if (ast->symbol)
|
||||
enterScope(ast->symbol);
|
||||
return true;
|
||||
}
|
||||
|
||||
virtual void endVisit(CompoundStatementAST *ast)
|
||||
void endVisit(CompoundStatementAST *ast) override
|
||||
{
|
||||
if (ast->symbol)
|
||||
_scopeStack.removeLast();
|
||||
}
|
||||
|
||||
virtual bool visit(IfStatementAST *ast)
|
||||
bool visit(IfStatementAST *ast) override
|
||||
{
|
||||
if (ast->symbol)
|
||||
enterScope(ast->symbol);
|
||||
return true;
|
||||
}
|
||||
|
||||
virtual void endVisit(IfStatementAST *ast)
|
||||
void endVisit(IfStatementAST *ast) override
|
||||
{
|
||||
if (ast->symbol)
|
||||
_scopeStack.removeLast();
|
||||
}
|
||||
|
||||
virtual bool visit(WhileStatementAST *ast)
|
||||
bool visit(WhileStatementAST *ast) override
|
||||
{
|
||||
if (ast->symbol)
|
||||
enterScope(ast->symbol);
|
||||
return true;
|
||||
}
|
||||
|
||||
virtual void endVisit(WhileStatementAST *ast)
|
||||
void endVisit(WhileStatementAST *ast) override
|
||||
{
|
||||
if (ast->symbol)
|
||||
_scopeStack.removeLast();
|
||||
}
|
||||
|
||||
virtual bool visit(ForStatementAST *ast)
|
||||
bool visit(ForStatementAST *ast) override
|
||||
{
|
||||
if (ast->symbol)
|
||||
enterScope(ast->symbol);
|
||||
return true;
|
||||
}
|
||||
|
||||
virtual void endVisit(ForStatementAST *ast)
|
||||
void endVisit(ForStatementAST *ast) override
|
||||
{
|
||||
if (ast->symbol)
|
||||
_scopeStack.removeLast();
|
||||
}
|
||||
|
||||
virtual bool visit(ForeachStatementAST *ast)
|
||||
bool visit(ForeachStatementAST *ast) override
|
||||
{
|
||||
if (ast->symbol)
|
||||
enterScope(ast->symbol);
|
||||
return true;
|
||||
}
|
||||
|
||||
virtual void endVisit(ForeachStatementAST *ast)
|
||||
void endVisit(ForeachStatementAST *ast) override
|
||||
{
|
||||
if (ast->symbol)
|
||||
_scopeStack.removeLast();
|
||||
}
|
||||
|
||||
virtual bool visit(RangeBasedForStatementAST *ast)
|
||||
bool visit(RangeBasedForStatementAST *ast) override
|
||||
{
|
||||
if (ast->symbol)
|
||||
enterScope(ast->symbol);
|
||||
return true;
|
||||
}
|
||||
|
||||
virtual void endVisit(RangeBasedForStatementAST *ast)
|
||||
void endVisit(RangeBasedForStatementAST *ast) override
|
||||
{
|
||||
if (ast->symbol)
|
||||
_scopeStack.removeLast();
|
||||
}
|
||||
|
||||
virtual bool visit(SwitchStatementAST *ast)
|
||||
bool visit(SwitchStatementAST *ast) override
|
||||
{
|
||||
if (ast->symbol)
|
||||
enterScope(ast->symbol);
|
||||
return true;
|
||||
}
|
||||
|
||||
virtual void endVisit(SwitchStatementAST *ast)
|
||||
void endVisit(SwitchStatementAST *ast) override
|
||||
{
|
||||
if (ast->symbol)
|
||||
_scopeStack.removeLast();
|
||||
}
|
||||
|
||||
virtual bool visit(CatchClauseAST *ast)
|
||||
bool visit(CatchClauseAST *ast) override
|
||||
{
|
||||
if (ast->symbol)
|
||||
enterScope(ast->symbol);
|
||||
return true;
|
||||
}
|
||||
|
||||
virtual void endVisit(CatchClauseAST *ast)
|
||||
void endVisit(CatchClauseAST *ast) override
|
||||
{
|
||||
if (ast->symbol)
|
||||
_scopeStack.removeLast();
|
||||
}
|
||||
|
||||
virtual bool visit(ExpressionOrDeclarationStatementAST *ast)
|
||||
bool visit(ExpressionOrDeclarationStatementAST *ast) override
|
||||
{
|
||||
accept(ast->declaration);
|
||||
return false;
|
||||
|
@@ -49,9 +49,9 @@ public:
|
||||
, m_workingCopy(m_modelManager->workingCopy())
|
||||
{}
|
||||
|
||||
virtual void indentSelection(const QTextCursor &selection,
|
||||
const QString &fileName,
|
||||
const TextEditor::TextDocument *textDocument) const
|
||||
void indentSelection(const QTextCursor &selection,
|
||||
const QString &fileName,
|
||||
const TextEditor::TextDocument *textDocument) const override
|
||||
{
|
||||
const TextEditor::TabSettings &tabSettings =
|
||||
ProjectExplorer::actualTabSettings(fileName, textDocument);
|
||||
@@ -60,9 +60,9 @@ public:
|
||||
indenter.indent(selection.document(), selection, QChar::Null, tabSettings);
|
||||
}
|
||||
|
||||
virtual void reindentSelection(const QTextCursor &selection,
|
||||
const QString &fileName,
|
||||
const TextEditor::TextDocument *textDocument) const
|
||||
void reindentSelection(const QTextCursor &selection,
|
||||
const QString &fileName,
|
||||
const TextEditor::TextDocument *textDocument) const override
|
||||
{
|
||||
const TextEditor::TabSettings &tabSettings =
|
||||
ProjectExplorer::actualTabSettings(fileName, textDocument);
|
||||
@@ -71,7 +71,7 @@ public:
|
||||
indenter.reindent(selection.document(), selection, tabSettings);
|
||||
}
|
||||
|
||||
virtual void fileChanged(const QString &fileName)
|
||||
void fileChanged(const QString &fileName) override
|
||||
{
|
||||
m_modelManager->updateSourceFiles(QSet<QString>() << fileName);
|
||||
}
|
||||
|
@@ -58,7 +58,7 @@ public:
|
||||
|
||||
public:
|
||||
GCRunner(StringTablePrivate &stringTable): m_stringTable(stringTable) {}
|
||||
virtual void run() { m_stringTable.GC(); }
|
||||
void run() override { m_stringTable.GC(); }
|
||||
} m_gcRunner;
|
||||
|
||||
mutable QMutex m_lock;
|
||||
|
@@ -64,7 +64,7 @@ public:
|
||||
|
||||
using SymbolVisitor::visit;
|
||||
|
||||
virtual bool visit(Function *fun)
|
||||
bool visit(Function *fun) override
|
||||
{
|
||||
if (_oper) {
|
||||
if (const Name *name = fun->unqualifiedName()) {
|
||||
@@ -79,7 +79,7 @@ public:
|
||||
return false;
|
||||
}
|
||||
|
||||
virtual bool visit(Block *)
|
||||
bool visit(Block *) override
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
@@ -49,7 +49,7 @@ public:
|
||||
|
||||
void execute(const CPlusPlus::Document::Ptr &doc, const CPlusPlus::Snapshot &snapshot);
|
||||
|
||||
virtual bool visit(CPlusPlus::Class *);
|
||||
bool visit(CPlusPlus::Class *) override;
|
||||
|
||||
const QList<CPlusPlus::Symbol *> &derived() { return _derived; }
|
||||
const QStringList otherBases() { return _otherBases; }
|
||||
|
@@ -58,7 +58,7 @@ class IntegerValidator : public QValidator
|
||||
{
|
||||
public:
|
||||
explicit IntegerValidator(QObject *parent);
|
||||
virtual State validate(QString &, int &) const;
|
||||
State validate(QString &, int &) const override;
|
||||
|
||||
int base() const { return m_base; }
|
||||
void setBase(int b) { m_base = b; }
|
||||
|
@@ -64,7 +64,7 @@ public:
|
||||
explicit SearchFunction(const char *name);
|
||||
FunctionList operator()(const DocumentPtr &doc);
|
||||
|
||||
virtual bool visit(CPlusPlus::Function * f);
|
||||
bool visit(CPlusPlus::Function * f) override;
|
||||
|
||||
private:
|
||||
const size_t m_length;
|
||||
|
@@ -92,7 +92,7 @@ public:
|
||||
protected:
|
||||
using GLSL::Visitor::visit;
|
||||
|
||||
virtual void endVisit(CompoundStatementAST *ast)
|
||||
void endVisit(CompoundStatementAST *ast) override
|
||||
{
|
||||
if (ast->symbol) {
|
||||
QTextCursor tc(textDocument);
|
||||
|
@@ -43,7 +43,7 @@ namespace Internal {
|
||||
class ClassModel : public QStandardItemModel {
|
||||
public:
|
||||
explicit ClassModel(QObject *parent = 0);
|
||||
virtual bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::EditRole);
|
||||
bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::EditRole) override;
|
||||
|
||||
void appendPlaceHolder() { appendClass(m_newClassPlaceHolder); }
|
||||
|
||||
|
@@ -199,7 +199,7 @@ public:
|
||||
ModelNodeContextMenuAction(id, description, category, key, priority, action, enabled, visibility)
|
||||
{}
|
||||
|
||||
virtual void updateContext()
|
||||
void updateContext() override
|
||||
{
|
||||
defaultAction()->setSelectionContext(selectionContext());
|
||||
if (selectionContext().isValid()) {
|
||||
@@ -225,7 +225,7 @@ public:
|
||||
SelectionContextPredicate visibility = &SelectionContextFunctors::always) :
|
||||
ModelNodeContextMenuAction(id, description, category, key, priority, action, enabled, visibility)
|
||||
{}
|
||||
virtual void updateContext()
|
||||
void updateContext() override
|
||||
{
|
||||
defaultAction()->setSelectionContext(selectionContext());
|
||||
if (selectionContext().isValid()) {
|
||||
@@ -285,7 +285,7 @@ public:
|
||||
|
||||
{}
|
||||
|
||||
virtual void updateContext()
|
||||
void updateContext() override
|
||||
{
|
||||
menu()->clear();
|
||||
if (selectionContext().isValid()) {
|
||||
|
@@ -82,7 +82,7 @@ protected:
|
||||
|
||||
using AST::Visitor::visit;
|
||||
|
||||
virtual bool visit(AST::UiPublicMember *node)
|
||||
bool visit(AST::UiPublicMember *node) override
|
||||
{
|
||||
if (node->memberTypeName() == m_typeName){
|
||||
const ObjectValue * objectValue = m_context->lookupType(m_document.data(), QStringList(m_typeName));
|
||||
@@ -98,7 +98,7 @@ protected:
|
||||
return true;
|
||||
}
|
||||
|
||||
virtual bool visit(AST::UiObjectDefinition *node)
|
||||
bool visit(AST::UiObjectDefinition *node) override
|
||||
{
|
||||
bool oldInside = m_insideObject;
|
||||
if (checkTypeName(node->qualifiedTypeNameId))
|
||||
@@ -111,7 +111,7 @@ protected:
|
||||
return false;
|
||||
}
|
||||
|
||||
virtual bool visit(AST::UiObjectBinding *node)
|
||||
bool visit(AST::UiObjectBinding *node) override
|
||||
{
|
||||
bool oldInside = m_insideObject;
|
||||
if (checkTypeName(node->qualifiedTypeNameId))
|
||||
@@ -125,7 +125,7 @@ protected:
|
||||
return false;
|
||||
}
|
||||
|
||||
virtual bool visit(AST::UiScriptBinding *node)
|
||||
bool visit(AST::UiScriptBinding *node) override
|
||||
{
|
||||
if (m_insideObject) {
|
||||
QStringList stringList = textAt(node->qualifiedId->firstSourceLocation(),
|
||||
@@ -147,7 +147,7 @@ protected:
|
||||
return true;
|
||||
}
|
||||
|
||||
virtual bool visit(AST::IdentifierExpression *node)
|
||||
bool visit(AST::IdentifierExpression *node) override
|
||||
{
|
||||
if (node->name != m_typeName)
|
||||
return false;
|
||||
@@ -159,7 +159,7 @@ protected:
|
||||
return false;
|
||||
}
|
||||
|
||||
virtual bool visit(AST::FieldMemberExpression *node)
|
||||
bool visit(AST::FieldMemberExpression *node) override
|
||||
{
|
||||
if (node->name != m_typeName)
|
||||
return true;
|
||||
@@ -173,12 +173,12 @@ protected:
|
||||
return true;
|
||||
}
|
||||
|
||||
virtual bool visit(AST::FunctionDeclaration *node)
|
||||
bool visit(AST::FunctionDeclaration *node) override
|
||||
{
|
||||
return visit(static_cast<AST::FunctionExpression *>(node));
|
||||
}
|
||||
|
||||
virtual bool visit(AST::FunctionExpression *node)
|
||||
bool visit(AST::FunctionExpression *node) override
|
||||
{
|
||||
AST::Node::accept(node->formals, this);
|
||||
m_scopeBuilder.push(node);
|
||||
@@ -187,13 +187,13 @@ protected:
|
||||
return false;
|
||||
}
|
||||
|
||||
virtual bool visit(AST::VariableDeclaration *node)
|
||||
bool visit(AST::VariableDeclaration *node) override
|
||||
{
|
||||
AST::Node::accept(node->expression, this);
|
||||
return false;
|
||||
}
|
||||
|
||||
virtual bool visit(AST::UiImport *ast)
|
||||
bool visit(AST::UiImport *ast) override
|
||||
{
|
||||
if (ast && ast->importId == m_typeName) {
|
||||
const Imports *imp = m_context->imports(m_document.data());
|
||||
|
@@ -53,7 +53,7 @@ public:
|
||||
{}
|
||||
|
||||
protected:
|
||||
virtual bool visit(UiObjectBinding *ast)
|
||||
bool visit(UiObjectBinding *ast) override
|
||||
{
|
||||
if (didRewriting())
|
||||
return false;
|
||||
@@ -64,7 +64,7 @@ protected:
|
||||
return !didRewriting();
|
||||
}
|
||||
|
||||
virtual bool visit(UiObjectDefinition *ast)
|
||||
bool visit(UiObjectDefinition *ast) override
|
||||
{
|
||||
if (didRewriting())
|
||||
return false;
|
||||
|
@@ -84,9 +84,9 @@ class ItemLibrarySideBarItem : public Core::SideBarItem
|
||||
{
|
||||
public:
|
||||
explicit ItemLibrarySideBarItem(QWidget *widget, const QString &id);
|
||||
virtual ~ItemLibrarySideBarItem();
|
||||
~ItemLibrarySideBarItem() override;
|
||||
|
||||
virtual QList<QToolButton *> createToolBarWidgets();
|
||||
QList<QToolButton *> createToolBarWidgets() override;
|
||||
};
|
||||
|
||||
ItemLibrarySideBarItem::ItemLibrarySideBarItem(QWidget *widget, const QString &id) : Core::SideBarItem(widget, id) {}
|
||||
@@ -105,9 +105,9 @@ class DesignerSideBarItem : public Core::SideBarItem
|
||||
{
|
||||
public:
|
||||
explicit DesignerSideBarItem(QWidget *widget, WidgetInfo::ToolBarWidgetFactoryInterface *createToolBarWidgets, const QString &id);
|
||||
virtual ~DesignerSideBarItem();
|
||||
~DesignerSideBarItem() override;
|
||||
|
||||
virtual QList<QToolButton *> createToolBarWidgets();
|
||||
QList<QToolButton *> createToolBarWidgets() override;
|
||||
|
||||
private:
|
||||
WidgetInfo::ToolBarWidgetFactoryInterface *m_toolBarWidgetFactory;
|
||||
|
@@ -99,8 +99,8 @@ public:
|
||||
init();
|
||||
}
|
||||
|
||||
virtual void performChanges(QmlJSRefactoringFilePtr currentFile,
|
||||
const QmlJSRefactoringChanges &refactoring)
|
||||
void performChanges(QmlJSRefactoringFilePtr currentFile,
|
||||
const QmlJSRefactoringChanges &refactoring) override
|
||||
{
|
||||
QString componentName = m_componentName;
|
||||
|
||||
|
@@ -108,7 +108,7 @@ protected:
|
||||
using Visitor::visit;
|
||||
using Visitor::endVisit;
|
||||
|
||||
virtual bool visit(AST::UiScriptBinding *node)
|
||||
bool visit(AST::UiScriptBinding *node) override
|
||||
{
|
||||
if (asString(node->qualifiedId) == QLatin1String("id")) {
|
||||
if (AST::ExpressionStatement *stmt = AST::cast<AST::ExpressionStatement*>(node->statement)) {
|
||||
@@ -130,7 +130,7 @@ protected:
|
||||
return false;
|
||||
}
|
||||
|
||||
virtual bool visit(AST::IdentifierExpression *node)
|
||||
bool visit(AST::IdentifierExpression *node) override
|
||||
{
|
||||
if (!node->name.isEmpty()) {
|
||||
const QString &name = node->name.toString();
|
||||
@@ -205,7 +205,7 @@ protected:
|
||||
decl->endColumn = last.startColumn + last.length;
|
||||
}
|
||||
|
||||
virtual bool visit(AST::UiObjectDefinition *node)
|
||||
bool visit(AST::UiObjectDefinition *node) override
|
||||
{
|
||||
++_depth;
|
||||
|
||||
@@ -223,12 +223,12 @@ protected:
|
||||
return true; // search for more bindings
|
||||
}
|
||||
|
||||
virtual void endVisit(AST::UiObjectDefinition *)
|
||||
void endVisit(AST::UiObjectDefinition *) override
|
||||
{
|
||||
--_depth;
|
||||
}
|
||||
|
||||
virtual bool visit(AST::UiObjectBinding *node)
|
||||
bool visit(AST::UiObjectBinding *node) override
|
||||
{
|
||||
++_depth;
|
||||
|
||||
@@ -250,12 +250,12 @@ protected:
|
||||
return true; // search for more bindings
|
||||
}
|
||||
|
||||
virtual void endVisit(AST::UiObjectBinding *)
|
||||
void endVisit(AST::UiObjectBinding *) override
|
||||
{
|
||||
--_depth;
|
||||
}
|
||||
|
||||
virtual bool visit(AST::UiScriptBinding *)
|
||||
bool visit(AST::UiScriptBinding *) override
|
||||
{
|
||||
++_depth;
|
||||
|
||||
@@ -272,17 +272,17 @@ protected:
|
||||
return false; // more more bindings in this subtree.
|
||||
}
|
||||
|
||||
virtual void endVisit(AST::UiScriptBinding *)
|
||||
void endVisit(AST::UiScriptBinding *) override
|
||||
{
|
||||
--_depth;
|
||||
}
|
||||
|
||||
virtual bool visit(AST::FunctionExpression *)
|
||||
bool visit(AST::FunctionExpression *) override
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
virtual bool visit(AST::FunctionDeclaration *ast)
|
||||
bool visit(AST::FunctionDeclaration *ast) override
|
||||
{
|
||||
if (ast->name.isEmpty())
|
||||
return false;
|
||||
@@ -309,7 +309,7 @@ protected:
|
||||
return false;
|
||||
}
|
||||
|
||||
virtual bool visit(AST::VariableDeclaration *ast)
|
||||
bool visit(AST::VariableDeclaration *ast) override
|
||||
{
|
||||
if (ast->name.isEmpty())
|
||||
return false;
|
||||
@@ -376,27 +376,27 @@ public:
|
||||
protected:
|
||||
using AST::Visitor::visit;
|
||||
|
||||
virtual bool visit(AST::UiObjectBinding *ast)
|
||||
bool visit(AST::UiObjectBinding *ast) override
|
||||
{
|
||||
if (ast->initializer && ast->initializer->lbraceToken.length)
|
||||
_ranges.append(createRange(ast, ast->initializer));
|
||||
return true;
|
||||
}
|
||||
|
||||
virtual bool visit(AST::UiObjectDefinition *ast)
|
||||
bool visit(AST::UiObjectDefinition *ast) override
|
||||
{
|
||||
if (ast->initializer && ast->initializer->lbraceToken.length)
|
||||
_ranges.append(createRange(ast, ast->initializer));
|
||||
return true;
|
||||
}
|
||||
|
||||
virtual bool visit(AST::FunctionExpression *ast)
|
||||
bool visit(AST::FunctionExpression *ast) override
|
||||
{
|
||||
_ranges.append(createRange(ast));
|
||||
return true;
|
||||
}
|
||||
|
||||
virtual bool visit(AST::FunctionDeclaration *ast)
|
||||
bool visit(AST::FunctionDeclaration *ast) override
|
||||
{
|
||||
_ranges.append(createRange(ast));
|
||||
return true;
|
||||
@@ -412,7 +412,7 @@ protected:
|
||||
return true;
|
||||
}
|
||||
|
||||
virtual bool visit(AST::UiScriptBinding *ast)
|
||||
bool visit(AST::UiScriptBinding *ast) override
|
||||
{
|
||||
if (AST::Block *block = AST::cast<AST::Block *>(ast->statement))
|
||||
_ranges.append(createRange(ast, block));
|
||||
|
@@ -95,7 +95,7 @@ protected:
|
||||
|
||||
using Visitor::visit;
|
||||
|
||||
virtual bool visit(AST::UiPublicMember *node)
|
||||
bool visit(AST::UiPublicMember *node) override
|
||||
{
|
||||
if (node->name == _name
|
||||
&& _scopeChain.qmlScopeObjects().contains(_scope)) {
|
||||
@@ -110,7 +110,7 @@ protected:
|
||||
return true;
|
||||
}
|
||||
|
||||
virtual bool visit(AST::UiObjectDefinition *node)
|
||||
bool visit(AST::UiObjectDefinition *node) override
|
||||
{
|
||||
_builder.push(node);
|
||||
Node::accept(node->initializer, this);
|
||||
@@ -118,7 +118,7 @@ protected:
|
||||
return false;
|
||||
}
|
||||
|
||||
virtual bool visit(AST::UiObjectBinding *node)
|
||||
bool visit(AST::UiObjectBinding *node) override
|
||||
{
|
||||
if (node->qualifiedId
|
||||
&& !node->qualifiedId->next
|
||||
@@ -133,7 +133,7 @@ protected:
|
||||
return false;
|
||||
}
|
||||
|
||||
virtual bool visit(AST::UiScriptBinding *node)
|
||||
bool visit(AST::UiScriptBinding *node) override
|
||||
{
|
||||
if (node->qualifiedId
|
||||
&& !node->qualifiedId->next
|
||||
@@ -151,7 +151,7 @@ protected:
|
||||
return true;
|
||||
}
|
||||
|
||||
virtual bool visit(AST::UiArrayBinding *node)
|
||||
bool visit(AST::UiArrayBinding *node) override
|
||||
{
|
||||
if (node->qualifiedId
|
||||
&& !node->qualifiedId->next
|
||||
@@ -162,7 +162,7 @@ protected:
|
||||
return true;
|
||||
}
|
||||
|
||||
virtual bool visit(AST::IdentifierExpression *node)
|
||||
bool visit(AST::IdentifierExpression *node) override
|
||||
{
|
||||
if (node->name.isEmpty() || node->name != _name)
|
||||
return false;
|
||||
@@ -193,7 +193,7 @@ protected:
|
||||
return false;
|
||||
}
|
||||
|
||||
virtual bool visit(AST::FieldMemberExpression *node)
|
||||
bool visit(AST::FieldMemberExpression *node) override
|
||||
{
|
||||
if (node->name != _name)
|
||||
return true;
|
||||
@@ -209,12 +209,12 @@ protected:
|
||||
return true;
|
||||
}
|
||||
|
||||
virtual bool visit(AST::FunctionDeclaration *node)
|
||||
bool visit(AST::FunctionDeclaration *node) override
|
||||
{
|
||||
return visit(static_cast<FunctionExpression *>(node));
|
||||
}
|
||||
|
||||
virtual bool visit(AST::FunctionExpression *node)
|
||||
bool visit(AST::FunctionExpression *node) override
|
||||
{
|
||||
if (node->name == _name) {
|
||||
if (checkLookup())
|
||||
@@ -227,7 +227,7 @@ protected:
|
||||
return false;
|
||||
}
|
||||
|
||||
virtual bool visit(AST::VariableDeclaration *node)
|
||||
bool visit(AST::VariableDeclaration *node) override
|
||||
{
|
||||
if (node->name == _name) {
|
||||
if (checkLookup())
|
||||
@@ -320,7 +320,7 @@ protected:
|
||||
|
||||
using Visitor::visit;
|
||||
|
||||
virtual bool visit(AST::UiPublicMember *node)
|
||||
bool visit(AST::UiPublicMember *node) override
|
||||
{
|
||||
if (node->memberTypeName() == _name){
|
||||
const ObjectValue * tVal = _context->lookupType(_doc.data(), QStringList(_name));
|
||||
@@ -336,7 +336,7 @@ protected:
|
||||
return true;
|
||||
}
|
||||
|
||||
virtual bool visit(AST::UiObjectDefinition *node)
|
||||
bool visit(AST::UiObjectDefinition *node) override
|
||||
{
|
||||
checkTypeName(node->qualifiedTypeNameId);
|
||||
_builder.push(node);
|
||||
@@ -345,7 +345,7 @@ protected:
|
||||
return false;
|
||||
}
|
||||
|
||||
virtual bool visit(AST::UiObjectBinding *node)
|
||||
bool visit(AST::UiObjectBinding *node) override
|
||||
{
|
||||
checkTypeName(node->qualifiedTypeNameId);
|
||||
_builder.push(node);
|
||||
@@ -354,7 +354,7 @@ protected:
|
||||
return false;
|
||||
}
|
||||
|
||||
virtual bool visit(AST::UiScriptBinding *node)
|
||||
bool visit(AST::UiScriptBinding *node) override
|
||||
{
|
||||
if (AST::cast<Block *>(node->statement)) {
|
||||
Node::accept(node->qualifiedId, this);
|
||||
@@ -366,7 +366,7 @@ protected:
|
||||
return true;
|
||||
}
|
||||
|
||||
virtual bool visit(AST::IdentifierExpression *node)
|
||||
bool visit(AST::IdentifierExpression *node) override
|
||||
{
|
||||
if (node->name != _name)
|
||||
return false;
|
||||
@@ -378,7 +378,7 @@ protected:
|
||||
return false;
|
||||
}
|
||||
|
||||
virtual bool visit(AST::FieldMemberExpression *node)
|
||||
bool visit(AST::FieldMemberExpression *node) override
|
||||
{
|
||||
if (node->name != _name)
|
||||
return true;
|
||||
@@ -392,12 +392,12 @@ protected:
|
||||
return true;
|
||||
}
|
||||
|
||||
virtual bool visit(AST::FunctionDeclaration *node)
|
||||
bool visit(AST::FunctionDeclaration *node) override
|
||||
{
|
||||
return visit(static_cast<FunctionExpression *>(node));
|
||||
}
|
||||
|
||||
virtual bool visit(AST::FunctionExpression *node)
|
||||
bool visit(AST::FunctionExpression *node) override
|
||||
{
|
||||
Node::accept(node->formals, this);
|
||||
_builder.push(node);
|
||||
@@ -406,13 +406,13 @@ protected:
|
||||
return false;
|
||||
}
|
||||
|
||||
virtual bool visit(AST::VariableDeclaration *node)
|
||||
bool visit(AST::VariableDeclaration *node) override
|
||||
{
|
||||
Node::accept(node->expression, this);
|
||||
return false;
|
||||
}
|
||||
|
||||
virtual bool visit(UiImport *ast)
|
||||
bool visit(UiImport *ast) override
|
||||
{
|
||||
if (ast && ast->importId == _name) {
|
||||
const Imports *imp = _context->imports(_doc.data());
|
||||
@@ -499,7 +499,7 @@ protected:
|
||||
|
||||
using Visitor::visit;
|
||||
|
||||
virtual bool preVisit(Node *node)
|
||||
bool preVisit(Node *node) override
|
||||
{
|
||||
if (Statement *stmt = node->statementCast())
|
||||
return containsOffset(stmt->firstSourceLocation(), stmt->lastSourceLocation());
|
||||
@@ -510,7 +510,7 @@ protected:
|
||||
return true;
|
||||
}
|
||||
|
||||
virtual bool visit(IdentifierExpression *node)
|
||||
bool visit(IdentifierExpression *node) override
|
||||
{
|
||||
if (containsOffset(node->identifierToken)) {
|
||||
_name = node->name.toString();
|
||||
@@ -524,7 +524,7 @@ protected:
|
||||
return true;
|
||||
}
|
||||
|
||||
virtual bool visit(FieldMemberExpression *node)
|
||||
bool visit(FieldMemberExpression *node) override
|
||||
{
|
||||
if (containsOffset(node->identifierToken)) {
|
||||
setScope(node->base);
|
||||
@@ -547,17 +547,17 @@ protected:
|
||||
return true;
|
||||
}
|
||||
|
||||
virtual bool visit(UiScriptBinding *node)
|
||||
bool visit(UiScriptBinding *node) override
|
||||
{
|
||||
return !checkBindingName(node->qualifiedId);
|
||||
}
|
||||
|
||||
virtual bool visit(UiArrayBinding *node)
|
||||
bool visit(UiArrayBinding *node) override
|
||||
{
|
||||
return !checkBindingName(node->qualifiedId);
|
||||
}
|
||||
|
||||
virtual bool visit(UiObjectBinding *node)
|
||||
bool visit(UiObjectBinding *node) override
|
||||
{
|
||||
if ((!checkTypeName(node->qualifiedTypeNameId)) &&
|
||||
(!checkBindingName(node->qualifiedId))) {
|
||||
@@ -569,7 +569,7 @@ protected:
|
||||
return false;
|
||||
}
|
||||
|
||||
virtual bool visit(UiObjectDefinition *node)
|
||||
bool visit(UiObjectDefinition *node) override
|
||||
{
|
||||
if (!checkTypeName(node->qualifiedTypeNameId)) {
|
||||
Node *oldObjectNode = _objectNode;
|
||||
@@ -580,7 +580,7 @@ protected:
|
||||
return false;
|
||||
}
|
||||
|
||||
virtual bool visit(UiPublicMember *node)
|
||||
bool visit(UiPublicMember *node) override
|
||||
{
|
||||
if (containsOffset(node->typeToken)){
|
||||
if (node->isValid()) {
|
||||
@@ -598,12 +598,12 @@ protected:
|
||||
return true;
|
||||
}
|
||||
|
||||
virtual bool visit(FunctionDeclaration *node)
|
||||
bool visit(FunctionDeclaration *node) override
|
||||
{
|
||||
return visit(static_cast<FunctionExpression *>(node));
|
||||
}
|
||||
|
||||
virtual bool visit(FunctionExpression *node)
|
||||
bool visit(FunctionExpression *node) override
|
||||
{
|
||||
if (containsOffset(node->identifierToken)) {
|
||||
_name = node->name.toString();
|
||||
@@ -612,7 +612,7 @@ protected:
|
||||
return true;
|
||||
}
|
||||
|
||||
virtual bool visit(VariableDeclaration *node)
|
||||
bool visit(VariableDeclaration *node) override
|
||||
{
|
||||
if (containsOffset(node->identifierToken)) {
|
||||
_name = node->name.toString();
|
||||
|
@@ -138,8 +138,8 @@ public:
|
||||
setDescription(tr("Add a Comment to Suppress This Message"));
|
||||
}
|
||||
|
||||
virtual void performChanges(QmlJSRefactoringFilePtr currentFile,
|
||||
const QmlJSRefactoringChanges &)
|
||||
void performChanges(QmlJSRefactoringFilePtr currentFile,
|
||||
const QmlJSRefactoringChanges &) override
|
||||
{
|
||||
Utils::ChangeSet changes;
|
||||
const int insertLoc = _message.location.begin() - _message.location.startColumn + 1;
|
||||
|
@@ -62,7 +62,7 @@ public:
|
||||
}
|
||||
|
||||
protected:
|
||||
virtual bool visit(UiObjectInitializer *ast)
|
||||
bool visit(UiObjectInitializer *ast) override
|
||||
{
|
||||
UiScriptBinding *idBinding;
|
||||
QString id = idOfObject(ast, &idBinding);
|
||||
@@ -107,8 +107,8 @@ public:
|
||||
return tryName;
|
||||
}
|
||||
|
||||
virtual void performChanges(QmlJSRefactoringFilePtr currentFile,
|
||||
const QmlJSRefactoringChanges &)
|
||||
void performChanges(QmlJSRefactoringFilePtr currentFile,
|
||||
const QmlJSRefactoringChanges &) override
|
||||
{
|
||||
UiScriptBinding *idBinding;
|
||||
const QString id = idOfObject(m_objDef, &idBinding);
|
||||
|
@@ -46,9 +46,9 @@ public:
|
||||
, m_snapshot(snapshot)
|
||||
{}
|
||||
|
||||
virtual void indentSelection(const QTextCursor &selection,
|
||||
const QString &fileName,
|
||||
const TextEditor::TextDocument *textDocument) const
|
||||
void indentSelection(const QTextCursor &selection,
|
||||
const QString &fileName,
|
||||
const TextEditor::TextDocument *textDocument) const override
|
||||
{
|
||||
// ### shares code with QmlJSTextEditor::indent
|
||||
QTextDocument *doc = selection.document();
|
||||
@@ -70,9 +70,9 @@ public:
|
||||
} while (block.isValid() && block != end);
|
||||
}
|
||||
|
||||
virtual void reindentSelection(const QTextCursor &selection,
|
||||
const QString &fileName,
|
||||
const TextEditor::TextDocument *textDocument) const
|
||||
void reindentSelection(const QTextCursor &selection,
|
||||
const QString &fileName,
|
||||
const TextEditor::TextDocument *textDocument) const override
|
||||
{
|
||||
const TextEditor::TabSettings &tabSettings =
|
||||
ProjectExplorer::actualTabSettings(fileName, textDocument);
|
||||
@@ -81,7 +81,7 @@ public:
|
||||
indenter.reindent(selection.document(), selection, tabSettings);
|
||||
}
|
||||
|
||||
virtual void fileChanged(const QString &fileName)
|
||||
void fileChanged(const QString &fileName) override
|
||||
{
|
||||
m_modelManager->updateSourceFiles(QStringList(fileName), true);
|
||||
}
|
||||
|
@@ -86,7 +86,7 @@ protected:
|
||||
return handle(ast, ast->firstSourceLocation(), ast->lastSourceLocation(), addToPath);
|
||||
}
|
||||
|
||||
virtual bool preVisit(AST::Node *node)
|
||||
bool preVisit(AST::Node *node) override
|
||||
{
|
||||
if (Statement *stmt = node->statementCast())
|
||||
return handleLocationAst(stmt);
|
||||
@@ -97,7 +97,7 @@ protected:
|
||||
return true;
|
||||
}
|
||||
|
||||
virtual bool visit(AST::UiQualifiedId *ast)
|
||||
bool visit(AST::UiQualifiedId *ast) override
|
||||
{
|
||||
AST::SourceLocation first = ast->identifierToken;
|
||||
AST::SourceLocation last;
|
||||
@@ -108,19 +108,19 @@ protected:
|
||||
return false;
|
||||
}
|
||||
|
||||
virtual bool visit(AST::UiProgram *ast)
|
||||
bool visit(AST::UiProgram *ast) override
|
||||
{
|
||||
_path.append(ast);
|
||||
return true;
|
||||
}
|
||||
|
||||
virtual bool visit(AST::Program *ast)
|
||||
bool visit(AST::Program *ast) override
|
||||
{
|
||||
_path.append(ast);
|
||||
return true;
|
||||
}
|
||||
|
||||
virtual bool visit(AST::UiImport *ast)
|
||||
bool visit(AST::UiImport *ast) override
|
||||
{
|
||||
return handleLocationAst(ast);
|
||||
}
|
||||
|
@@ -295,12 +295,12 @@ class BindingLoopMaterialShader : public QSGMaterialShader
|
||||
public:
|
||||
BindingLoopMaterialShader();
|
||||
|
||||
virtual void updateState(const RenderState &state, QSGMaterial *newEffect,
|
||||
QSGMaterial *oldEffect);
|
||||
virtual char const *const *attributeNames() const;
|
||||
void updateState(const RenderState &state, QSGMaterial *newEffect,
|
||||
QSGMaterial *oldEffect) override;
|
||||
char const *const *attributeNames() const override;
|
||||
|
||||
private:
|
||||
virtual void initialize();
|
||||
void initialize() override;
|
||||
|
||||
int m_matrix_id = 0;
|
||||
int m_z_range_id = 0;
|
||||
|
@@ -84,7 +84,7 @@ public:
|
||||
void clearAbortedPosition();
|
||||
void updateFromCompletionSettings(const TextEditor::CompletionSettings &settings);
|
||||
|
||||
virtual bool eventFilter(QObject *o, QEvent *e);
|
||||
bool eventFilter(QObject *o, QEvent *e) override;
|
||||
|
||||
private:
|
||||
void processProposalItem(AssistProposalItemInterface *proposalItem);
|
||||
|
@@ -62,9 +62,9 @@ class FunctionGraphicsTextItem : public QAbstractGraphicsShapeItem
|
||||
public:
|
||||
FunctionGraphicsTextItem(const QString &text, QGraphicsItem *parent);
|
||||
|
||||
virtual void paint(QPainter *painter,
|
||||
const QStyleOptionGraphicsItem *option, QWidget *widget);
|
||||
virtual QRectF boundingRect() const;
|
||||
void paint(QPainter *painter,
|
||||
const QStyleOptionGraphicsItem *option, QWidget *widget) override;
|
||||
QRectF boundingRect() const override;
|
||||
|
||||
private:
|
||||
QString m_text;
|
||||
@@ -82,8 +82,8 @@ public:
|
||||
FunctionGraphicsItem(const QString &text, qreal x, qreal y,
|
||||
qreal width, qreal height, QGraphicsItem *parent = 0);
|
||||
|
||||
virtual void paint(QPainter *painter,
|
||||
const QStyleOptionGraphicsItem *option, QWidget *widget);
|
||||
void paint(QPainter *painter,
|
||||
const QStyleOptionGraphicsItem *option, QWidget *widget) override;
|
||||
FunctionGraphicsTextItem *textItem() const;
|
||||
|
||||
private:
|
||||
|
@@ -96,7 +96,7 @@ public:
|
||||
void appendLinesWithStyle(QString const& s, enum VcsOutputWindow::MessageStyle style, const QString &repository = QString());
|
||||
|
||||
protected:
|
||||
virtual void contextMenuEvent(QContextMenuEvent *event);
|
||||
void contextMenuEvent(QContextMenuEvent *event) override;
|
||||
|
||||
private:
|
||||
void setFormat(enum VcsOutputWindow::MessageStyle style);
|
||||
|
Reference in New Issue
Block a user