forked from qt-creator/qt-creator
Show e.g. 'anchors' again in the Outline
This reverts commit 62b83fcfd, which was about filtering 'ghost'
elements out like "Rectangle { id }", where id was parsed as a
UiObjectDefinition. Unfortunately, "anchors" also is represented as
an ObjectDefinition ... Anyhow, the original problem does not
occur any more, so we can just revert this.
This commit is contained in:
@@ -88,10 +88,6 @@ private:
|
||||
typedef QPair<QString,QString> ElementType;
|
||||
bool visit(AST::UiObjectDefinition *objDef)
|
||||
{
|
||||
if (!validElement(objDef)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
AST::SourceLocation location = getLocation(objDef);
|
||||
|
||||
const QString typeName = asString(objDef->qualifiedTypeNameId);
|
||||
@@ -107,11 +103,8 @@ private:
|
||||
return true;
|
||||
}
|
||||
|
||||
void endVisit(AST::UiObjectDefinition *objDef)
|
||||
void endVisit(AST::UiObjectDefinition * /*objDef*/)
|
||||
{
|
||||
if (!validElement(objDef)) {
|
||||
return;
|
||||
}
|
||||
m_model->leaveElement();
|
||||
}
|
||||
|
||||
@@ -144,11 +137,6 @@ private:
|
||||
m_model->leaveProperty();
|
||||
}
|
||||
|
||||
bool validElement(AST::UiObjectDefinition *objDef) {
|
||||
// For 'Rectangle { id }', id is parsed as UiObjectDefinition ... Filter this out.
|
||||
return objDef->qualifiedTypeNameId->name->asString().at(0).isUpper();
|
||||
}
|
||||
|
||||
QIcon getIcon(AST::UiObjectDefinition *objDef) {
|
||||
const QmlJS::Interpreter::Value *value = m_context->evaluate(objDef->qualifiedTypeNameId);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user