QmlDesigner: Fix compile

Did not compile with GCC 5.3 because frames and frames()
are ambiguous.
The new function name is more descriptive.

Change-Id: I832a02fb56dbada07dc8622b566762fb32139d3f
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
Thomas Hartmann
2017-09-26 12:58:40 +02:00
parent f3afac128b
commit b81396c36e
2 changed files with 6 additions and 6 deletions

View File

@@ -56,7 +56,7 @@ public:
private: private:
void addFramesIfNotExists(const ModelNode &node, const PropertyName &propertyName); void addFramesIfNotExists(const ModelNode &node, const PropertyName &propertyName);
bool hasFrames(const ModelNode &node, const PropertyName &propertyName) const; bool hasFrames(const ModelNode &node, const PropertyName &propertyName) const;
QList<QmlTimelineFrames> frames() const; QList<QmlTimelineFrames> allTimelineFrames() const;
}; };
} //QmlDesigner } //QmlDesigner

View File

@@ -142,17 +142,17 @@ void QmlTimelineMutator::addFramesIfNotExists(const ModelNode &node, const Prope
bool QmlTimelineMutator::hasFrames(const ModelNode &node, const PropertyName &propertyName) const bool QmlTimelineMutator::hasFrames(const ModelNode &node, const PropertyName &propertyName) const
{ {
for (const QmlTimelineFrames &tFrames : frames()) { for (const QmlTimelineFrames &frames : allTimelineFrames()) {
if (tFrames.target().isValid() if (frames.target().isValid()
&& tFrames.target() == node && frames.target() == node
&& tFrames.propertyName() == propertyName) && frames.propertyName() == propertyName)
return true; return true;
} }
return false; return false;
} }
QList<QmlTimelineFrames> QmlTimelineMutator::frames() const QList<QmlTimelineFrames> QmlTimelineMutator::allTimelineFrames() const
{ {
QList<QmlTimelineFrames> returnList; QList<QmlTimelineFrames> returnList;