diff options
author | Kevin Ottens <kevin.ottens@kdab.com> | 2014-10-15 08:07:03 +0200 |
---|---|---|
committer | Sean Harmer <sean.harmer@kdab.com> | 2014-10-15 19:37:44 +0200 |
commit | a4b9ce44ae244104a941981405742ee42d53ebe0 (patch) | |
tree | cd66ef6dd859f1faf26874af62ab65830ce35a09 /src/render/frontend/qscissortest.cpp | |
parent | 8fe8aa479905b486959d956fb5637d825b8f3b4c (diff) |
Automate the NodeUpdated notifications
Now, each time a signal known to be the notification of a property
change is emitted, we notify the observers automatically. Properties
for which no NOTIFY has been provided are ignored.
This change also allowed to drop quite some redundant code in QNode
subclasses.
Change-Id: Ib4fbeb8311148a6b8789f19ebe437fc7d413a599
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Diffstat (limited to 'src/render/frontend/qscissortest.cpp')
-rw-r--r-- | src/render/frontend/qscissortest.cpp | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/src/render/frontend/qscissortest.cpp b/src/render/frontend/qscissortest.cpp index 8babfe1c6..05f5be83c 100644 --- a/src/render/frontend/qscissortest.cpp +++ b/src/render/frontend/qscissortest.cpp @@ -98,12 +98,6 @@ void QScissorTest::setLeft(int left) if (d->m_left != left) { d->m_left = left; emit leftChanged(); - if (d->m_changeArbiter != Q_NULLPTR) { - QScenePropertyChangePtr propertyChange(new QScenePropertyChange(NodeUpdated, this)); - propertyChange->setPropertyName(QByteArrayLiteral("left")); - propertyChange->setValue(d->m_left); - d->notifyObservers(propertyChange); - } } } @@ -119,12 +113,6 @@ void QScissorTest::setBottom(int bottom) if (d->m_bottom != bottom) { d->m_bottom = bottom; emit bottomChanged(); - if (d->m_changeArbiter != Q_NULLPTR) { - QScenePropertyChangePtr propertyChange(new QScenePropertyChange(NodeUpdated, this)); - propertyChange->setPropertyName(QByteArrayLiteral("bottom")); - propertyChange->setValue(d->m_bottom); - d->notifyObservers(propertyChange); - } } } @@ -140,12 +128,6 @@ void QScissorTest::setWidth(int width) if (d->m_width != width) { d->m_width = width; emit widthChanged(); - if (d->m_changeArbiter != Q_NULLPTR) { - QScenePropertyChangePtr propertyChange(new QScenePropertyChange(NodeUpdated, this)); - propertyChange->setPropertyName(QByteArrayLiteral("width")); - propertyChange->setValue(d->m_width); - d->notifyObservers(propertyChange); - } } } @@ -161,12 +143,6 @@ void QScissorTest::setHeight(int height) if (d->m_height != height) { d->m_height = height; emit heightChanged(); - if (d->m_changeArbiter != Q_NULLPTR) { - QScenePropertyChangePtr propertyChange(new QScenePropertyChange(NodeUpdated, this)); - propertyChange->setPropertyName(QByteArrayLiteral("height")); - propertyChange->setValue(d->m_height); - d->notifyObservers(propertyChange); - } } } |