Commit 4dc17bc1 authored by Marco Bubke's avatar Marco Bubke

QmlDesigner: Test compiles again

But not linking
parent 0a8af172
......@@ -95,6 +95,7 @@ public:
const MetaInfo metaInfo() const;
MetaInfo metaInfo();
NodeMetaInfo metaInfo(const QString &typeName, int majorVersion = -1, int minorVersion = -1);
bool hasNodeMetaInfo(const QString &typeName, int majorVersion = -1, int minorVersion = -1);
void setMetaInfo(const MetaInfo &metaInfo);
void attachView(AbstractView *view);
......
......@@ -82,6 +82,7 @@ public:
QString instanceType(const QString &name) const;
qint32 parentId() const;
qint32 instanceId() const;
protected:
void setProperty(const QString &name, const QVariant &value);
......@@ -93,12 +94,13 @@ protected:
void setParentId(qint32 instanceId);
void setRenderImage(const QImage &image);
NodeInstance(ProxyNodeInstanceData *d);
qint32 instanceId() const;
private:
QSharedPointer<ProxyNodeInstanceData> d;
};
bool operator ==(const NodeInstance &first, const NodeInstance &second);
}
#endif // PROXYNODEINSTANCE_H
......@@ -342,4 +342,9 @@ void NodeInstance::setInformation(InformationName name, const QVariant &informat
}
}
bool operator ==(const NodeInstance &first, const NodeInstance &second)
{
return first.instanceId() >= 0 && first.instanceId() == second.instanceId();
}
}
......@@ -1566,6 +1566,11 @@ const MetaInfo Model::metaInfo() const
return m_d->metaInfo();
}
bool Model::hasNodeMetaInfo(const QString &typeName, int majorVersion, int minorVersion)
{
return NodeMetaInfo(this, typeName, majorVersion, minorVersion).isValid();
}
NodeMetaInfo Model::metaInfo(const QString &typeName, int majorVersion, int minorVersion)
{
return NodeMetaInfo(this, typeName, majorVersion, minorVersion);
......
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