diff options
author | Paul Lemire <paul.lemire@kdab.com> | 2015-02-25 15:38:42 +0100 |
---|---|---|
committer | Sean Harmer <sean.harmer@kdab.com> | 2015-02-28 16:28:54 +0000 |
commit | 66fc1e35db664ecaf0b37c855eea7391c0576773 (patch) | |
tree | cb805d9a294c40fb9a08cc985ee41366e962f20e /src/input | |
parent | 653ff3d4d5f992b64c4949e9741f4213a81a9f42 (diff) |
ChangeArbiter/SceneChange: use id as change subject
Instead of having a QNode* or QObservable as the subject of a change, we use
it's unique NodeId instead. That will prevent the ChangeArbiter from trying to
distribute changes by looking at a QNode/QObservable id when the
QNode/QObservable might have been destroyed in the meantime.
Change-Id: Ia419d5b841434fd65522c8c65de552089cfe97cf
Task-number: QTBUG-44628
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Diffstat (limited to 'src/input')
-rw-r--r-- | src/input/keyboardinput.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/input/keyboardinput.cpp b/src/input/keyboardinput.cpp index 23edf1a89..1f0b80e5d 100644 --- a/src/input/keyboardinput.cpp +++ b/src/input/keyboardinput.cpp @@ -83,7 +83,7 @@ void KeyboardInput::setFocus(bool focus) { if (focus != m_focus) { m_focus = focus; - QBackendScenePropertyChangePtr e(new QBackendScenePropertyChange(NodeUpdated, this)); + QBackendScenePropertyChangePtr e(new QBackendScenePropertyChange(NodeUpdated, peerUuid())); e->setTargetNode(peerUuid()); e->setPropertyName("focus"); e->setValue(m_focus); @@ -93,7 +93,7 @@ void KeyboardInput::setFocus(bool focus) void KeyboardInput::keyEvent(const Q3DKeyEventPtr &event) { - QBackendScenePropertyChangePtr e(new QBackendScenePropertyChange(NodeUpdated, this)); + QBackendScenePropertyChangePtr e(new QBackendScenePropertyChange(NodeUpdated, peerUuid())); e->setTargetNode(peerUuid()); e->setPropertyName("event"); e->setValue(QVariant::fromValue(event)); |