Commit c8b3d53f authored by Marco Bubke's avatar Marco Bubke
Browse files

QmlDesigner.MetaInfo: Hotfix last hotfix

Last fix don't work expected. Must be refactored back.
parent 0326454e
......@@ -128,37 +128,6 @@ private:
QList<PropertyInfo> m_properties;
};
class HasValueProcessor : public Interpreter::MemberProcessor
{
public:
HasValueProcessor(const Interpreter::Value *compareValue)
: MemberProcessor(),
m_compareValue(compareValue),
m_isInMembers(false)
{}
virtual bool processProperty(const QString &/*name*/, const Interpreter::Value *value)
{
if (value == m_compareValue) {
m_isInMembers = true;
return false;
}
return true;
}
bool hasValue() const
{
return m_isInMembers;
}
private:
const Interpreter::Value *m_compareValue;
bool m_isInMembers;
};
static inline bool isValueType(const QString &type)
{
QStringList objectValuesList;
......@@ -825,9 +794,7 @@ void NodeMetaInfoPrivate::setupPrototypes()
description.className = qmlValue->packageName() + "/" + description.className;
}
HasValueProcessor hasValueProcessor(ov);
lookupContext()->context()->typeEnvironment(document())->processMembers(&hasValueProcessor);
if (hasValueProcessor.hasValue())
if (lookupContext()->context()->lookupType(document(), QStringList() << ov->className()))
m_prototypes.append(description);
}
}
......
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