diff options
author | Sean Harmer <sean.harmer@kdab.com> | 2017-03-27 11:23:35 +0100 |
---|---|---|
committer | Sean Harmer <sean.harmer@kdab.com> | 2017-03-30 08:48:35 +0000 |
commit | 0258a5593dab0ee885824fd026031ef6d0fe3ac1 (patch) | |
tree | c7f4e51808a33327b67ca0c3b2fc64d69df2dbc6 /src | |
parent | a28735696cc09c2462a7490b77ccf4a8e7053ea6 (diff) |
Use [setL|l]oopCount in C++ for QAbstractClipAnimator
Keep the property name as loops for consistency with Qt Quick. Avoids
ambiguity in function name meaning.
Change-Id: Icf35f30d3020e77aba9db878c9dbc6e890c898ff
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/animation/frontend/qabstractclipanimator.cpp | 6 | ||||
-rw-r--r-- | src/animation/frontend/qabstractclipanimator.h | 8 |
2 files changed, 7 insertions, 7 deletions
diff --git a/src/animation/frontend/qabstractclipanimator.cpp b/src/animation/frontend/qabstractclipanimator.cpp index 439737601..307f2d2f3 100644 --- a/src/animation/frontend/qabstractclipanimator.cpp +++ b/src/animation/frontend/qabstractclipanimator.cpp @@ -79,7 +79,7 @@ QChannelMapper *QAbstractClipAnimator::channelMapper() const return d->m_mapper; } -int QAbstractClipAnimator::loops() const +int QAbstractClipAnimator::loopCount() const { Q_D(const QAbstractClipAnimator); return d->m_loops; @@ -114,14 +114,14 @@ void QAbstractClipAnimator::setChannelMapper(QChannelMapper *mapping) emit channelMapperChanged(mapping); } -void QAbstractClipAnimator::setLoops(int loops) +void QAbstractClipAnimator::setLoopCount(int loops) { Q_D(QAbstractClipAnimator); if (d->m_loops == loops) return; d->m_loops = loops; - emit loopsChanged(loops); + emit loopCountChanged(loops); } } // namespace Qt3DAnimation diff --git a/src/animation/frontend/qabstractclipanimator.h b/src/animation/frontend/qabstractclipanimator.h index e106bae74..805fcb2b3 100644 --- a/src/animation/frontend/qabstractclipanimator.h +++ b/src/animation/frontend/qabstractclipanimator.h @@ -55,7 +55,7 @@ class QT3DANIMATIONSHARED_EXPORT QAbstractClipAnimator : public Qt3DCore::QCompo { Q_OBJECT Q_PROPERTY(bool running READ isRunning WRITE setRunning NOTIFY runningChanged) - Q_PROPERTY(int loops READ loops WRITE setLoops NOTIFY loopsChanged) + Q_PROPERTY(int loops READ loopCount WRITE setLoopCount NOTIFY loopCountChanged) Q_PROPERTY(Qt3DAnimation::QChannelMapper *channelMapper READ channelMapper WRITE setChannelMapper NOTIFY channelMapperChanged) public: @@ -66,17 +66,17 @@ public: bool isRunning() const; Qt3DAnimation::QChannelMapper *channelMapper() const; - int loops() const; + int loopCount() const; public Q_SLOTS: void setRunning(bool running); void setChannelMapper(Qt3DAnimation::QChannelMapper *channelMapper); - void setLoops(int loops); + void setLoopCount(int loops); Q_SIGNALS: void runningChanged(bool running); void channelMapperChanged(Qt3DAnimation::QChannelMapper *channelMapper); - void loopsChanged(int loops); + void loopCountChanged(int loops); protected: explicit QAbstractClipAnimator(Qt3DCore::QNode *parent = nullptr); |