diff options
author | J-P Nurmi <jpnurmi@theqtcompany.com> | 2016-01-06 20:49:18 +0100 |
---|---|---|
committer | J-P Nurmi <jpnurmi@theqtcompany.com> | 2016-01-06 20:49:23 +0100 |
commit | 4c7a8894562de4d69ea439cc62a02502a2d27be0 (patch) | |
tree | cfc8f8b8bf62b4562ecb409b4550d9dbfbeebace /src/imports/controls/material | |
parent | 719dd0dd2721739f51f0cc711f42f176e74e8529 (diff) | |
parent | a757e8ca0a6f7bb628ac7a57cafa9f0ba5167d51 (diff) |
Merge remote-tracking branch 'origin/5.6' into dev
Change-Id: I5ae6ebe2ed09fc9c22833a8f8da929257c18714e
Diffstat (limited to 'src/imports/controls/material')
-rw-r--r-- | src/imports/controls/material/qmldir | 1 | ||||
-rw-r--r-- | src/imports/controls/material/qquickmaterialprogressring.cpp | 20 |
2 files changed, 15 insertions, 6 deletions
diff --git a/src/imports/controls/material/qmldir b/src/imports/controls/material/qmldir index 19f71b4a..d90e75d8 100644 --- a/src/imports/controls/material/qmldir +++ b/src/imports/controls/material/qmldir @@ -2,3 +2,4 @@ module Qt.labs.controls.material plugin qtlabsmaterialstyleplugin classname QtLabsMaterialStylePlugin depends Qt.labs.controls 1.0 +depends QtGraphicalEffects 1.0 diff --git a/src/imports/controls/material/qquickmaterialprogressring.cpp b/src/imports/controls/material/qquickmaterialprogressring.cpp index 7f7ed114..54728686 100644 --- a/src/imports/controls/material/qquickmaterialprogressring.cpp +++ b/src/imports/controls/material/qquickmaterialprogressring.cpp @@ -71,9 +71,10 @@ public: void updateCurrentTime(int time) Q_DECL_OVERRIDE; void writeBack() Q_DECL_OVERRIDE; void nodeWasDestroyed() Q_DECL_OVERRIDE; + void afterNodeSync() Q_DECL_OVERRIDE; private: - QSGNode *m_itemNode; + QSGNode *m_containerNode; QQuickWindow *m_window; }; @@ -164,7 +165,7 @@ QQuickAnimatorJob *QQuickMaterialRingAnimator::createJob() const } QQuickMaterialRingAnimatorJob::QQuickMaterialRingAnimatorJob() : - m_itemNode(Q_NULLPTR), + m_containerNode(Q_NULLPTR), m_window(Q_NULLPTR) { } @@ -176,14 +177,16 @@ QQuickMaterialRingAnimatorJob::~QQuickMaterialRingAnimatorJob() void QQuickMaterialRingAnimatorJob::initialize(QQuickAnimatorController *controller) { QQuickAnimatorJob::initialize(controller); - m_itemNode = QQuickItemPrivate::get(m_target)->itemNode(); + m_containerNode = QQuickItemPrivate::get(m_target)->childContainerNode(); m_window = m_target->window(); } void QQuickMaterialRingAnimatorJob::updateCurrentTime(int time) { - QSGNode *childContainerNode = QQuickItemPrivate::get(m_target)->childContainerNode(); - QSGSimpleRectNode *rectNode = static_cast<QSGSimpleRectNode*>(childContainerNode->firstChild()); + if (!m_containerNode) + return; + + QSGSimpleRectNode *rectNode = static_cast<QSGSimpleRectNode*>(m_containerNode->firstChild()); if (!rectNode) return; @@ -252,10 +255,15 @@ void QQuickMaterialRingAnimatorJob::writeBack() void QQuickMaterialRingAnimatorJob::nodeWasDestroyed() { - m_itemNode = Q_NULLPTR; + m_containerNode = Q_NULLPTR; m_window = Q_NULLPTR; } +void QQuickMaterialRingAnimatorJob::afterNodeSync() +{ + m_containerNode = QQuickItemPrivate::get(m_target)->childContainerNode(); +} + QQuickMaterialRingTexture::QQuickMaterialRingTexture() { } |