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

QmlDesigner: Test compiles again

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