summaryrefslogtreecommitdiffstats
path: root/src/input
diff options
context:
space:
mode:
authorSean Harmer <sean.harmer@kdab.com>2017-02-07 11:07:26 +0000
committerSean Harmer <sean.harmer@kdab.com>2017-02-09 09:34:03 +0000
commitd1271dba68f03610c27e87963653bf1600b5f659 (patch)
tree0042fb0d2e013caa6de5972137cce5d5ef68e8f2 /src/input
parent601ee9146676ef78f6ad486420ba9849ac44c844 (diff)
Deliver all events by default unless marked as intermediate
This change inverts m_final flag on property change events so that now, all events are delivered by default. The animation aspect now marks intermediate calculated changes and these are not delivered unless the user subscribes to them. Change-Id: Ide6c30b29a91ed874d47c52d0ee1352f6680c3d8 Reviewed-by: Antti Määttä <antti.maatta@qt.io>
Diffstat (limited to 'src/input')
-rw-r--r--src/input/backend/action.cpp2
-rw-r--r--src/input/backend/axis.cpp2
-rw-r--r--src/input/backend/axisaccumulator.cpp3
-rw-r--r--src/input/backend/keyboardhandler.cpp3
-rw-r--r--src/input/backend/mousehandler.cpp3
-rw-r--r--src/input/backend/physicaldeviceproxy.cpp2
6 files changed, 0 insertions, 15 deletions
diff --git a/src/input/backend/action.cpp b/src/input/backend/action.cpp
index 2b8ada042..b7fa8740e 100644
--- a/src/input/backend/action.cpp
+++ b/src/input/backend/action.cpp
@@ -44,7 +44,6 @@
#include <Qt3DCore/qpropertyupdatedchange.h>
#include <Qt3DCore/qpropertynodeaddedchange.h>
#include <Qt3DCore/qpropertynoderemovedchange.h>
-#include <Qt3DCore/private/qpropertyupdatedchangebase_p.h>
QT_BEGIN_NAMESPACE
@@ -82,7 +81,6 @@ void Action::setActionTriggered(bool actionTriggered)
e->setDeliveryFlags(Qt3DCore::QSceneChange::DeliverToAll);
e->setPropertyName("active");
e->setValue(m_actionTriggered);
- Qt3DCore::QPropertyUpdatedChangeBasePrivate::get(e.data())->m_isFinal = true;
notifyObservers(e);
}
}
diff --git a/src/input/backend/axis.cpp b/src/input/backend/axis.cpp
index 579c9fe7d..4239749c1 100644
--- a/src/input/backend/axis.cpp
+++ b/src/input/backend/axis.cpp
@@ -44,7 +44,6 @@
#include <Qt3DCore/qpropertyupdatedchange.h>
#include <Qt3DCore/qpropertynodeaddedchange.h>
#include <Qt3DCore/qpropertynoderemovedchange.h>
-#include <Qt3DCore/private/qpropertyupdatedchangebase_p.h>
QT_BEGIN_NAMESPACE
@@ -82,7 +81,6 @@ void Axis::setAxisValue(float axisValue)
e->setDeliveryFlags(Qt3DCore::QSceneChange::DeliverToAll);
e->setPropertyName("value");
e->setValue(m_axisValue);
- Qt3DCore::QPropertyUpdatedChangeBasePrivate::get(e.data())->m_isFinal = true;
notifyObservers(e);
}
}
diff --git a/src/input/backend/axisaccumulator.cpp b/src/input/backend/axisaccumulator.cpp
index 815c25cb0..3b0423f47 100644
--- a/src/input/backend/axisaccumulator.cpp
+++ b/src/input/backend/axisaccumulator.cpp
@@ -41,7 +41,6 @@
#include <Qt3DInput/private/qaxisaccumulator_p.h>
#include <Qt3DInput/private/inputmanagers_p.h>
#include <Qt3DCore/qpropertyupdatedchange.h>
-#include <Qt3DCore/private/qpropertyupdatedchangebase_p.h>
QT_BEGIN_NAMESPACE
@@ -88,7 +87,6 @@ void AxisAccumulator::setValue(float value)
e->setDeliveryFlags(Qt3DCore::QSceneChange::DeliverToAll);
e->setPropertyName("value");
e->setValue(m_value);
- Qt3DCore::QPropertyUpdatedChangeBasePrivate::get(e.data())->m_isFinal = true;
notifyObservers(e);
}
}
@@ -103,7 +101,6 @@ void AxisAccumulator::setVelocity(float velocity)
e->setDeliveryFlags(Qt3DCore::QSceneChange::DeliverToAll);
e->setPropertyName("velocity");
e->setValue(m_velocity);
- Qt3DCore::QPropertyUpdatedChangeBasePrivate::get(e.data())->m_isFinal = true;
notifyObservers(e);
}
}
diff --git a/src/input/backend/keyboardhandler.cpp b/src/input/backend/keyboardhandler.cpp
index b674ac372..b96334e50 100644
--- a/src/input/backend/keyboardhandler.cpp
+++ b/src/input/backend/keyboardhandler.cpp
@@ -44,7 +44,6 @@
#include "inputhandler_p.h"
#include "inputmanagers_p.h"
#include <Qt3DCore/qpropertyupdatedchange.h>
-#include <Qt3DCore/private/qpropertyupdatedchangebase_p.h>
#include <QVariant>
QT_BEGIN_NAMESPACE
@@ -91,7 +90,6 @@ void KeyboardHandler::setFocus(bool focus)
e->setDeliveryFlags(Qt3DCore::QSceneChange::DeliverToAll);
e->setPropertyName("focus");
e->setValue(m_focus);
- Qt3DCore::QPropertyUpdatedChangeBasePrivate::get(e.data())->m_isFinal = true;
notifyObservers(e);
}
}
@@ -102,7 +100,6 @@ void KeyboardHandler::keyEvent(const QKeyEventPtr &event)
e->setDeliveryFlags(Qt3DCore::QSceneChange::DeliverToAll);
e->setPropertyName("event");
e->setValue(QVariant::fromValue(event));
- Qt3DCore::QPropertyUpdatedChangeBasePrivate::get(e.data())->m_isFinal = true;
notifyObservers(e);
}
diff --git a/src/input/backend/mousehandler.cpp b/src/input/backend/mousehandler.cpp
index 770c318e1..b7b748843 100644
--- a/src/input/backend/mousehandler.cpp
+++ b/src/input/backend/mousehandler.cpp
@@ -46,7 +46,6 @@
#include <Qt3DInput/private/qmousehandler_p.h>
#include <Qt3DInput/qmousedevice.h>
#include <Qt3DCore/qpropertyupdatedchange.h>
-#include <Qt3DCore/private/qpropertyupdatedchangebase_p.h>
QT_BEGIN_NAMESPACE
@@ -88,7 +87,6 @@ void MouseHandler::mouseEvent(const QMouseEventPtr &event)
e->setDeliveryFlags(Qt3DCore::QSceneChange::DeliverToAll);
e->setPropertyName("mouse");
e->setValue(QVariant::fromValue(event));
- Qt3DCore::QPropertyUpdatedChangeBasePrivate::get(e.data())->m_isFinal = true;
notifyObservers(e);
}
@@ -98,7 +96,6 @@ void MouseHandler::wheelEvent(const QWheelEventPtr &event)
e->setDeliveryFlags(Qt3DCore::QSceneChange::DeliverToAll);
e->setPropertyName("wheel");
e->setValue(QVariant::fromValue(event));
- Qt3DCore::QPropertyUpdatedChangeBasePrivate::get(e.data())->m_isFinal = true;
notifyObservers(e);
}
diff --git a/src/input/backend/physicaldeviceproxy.cpp b/src/input/backend/physicaldeviceproxy.cpp
index 083f2438a..2e46309fd 100644
--- a/src/input/backend/physicaldeviceproxy.cpp
+++ b/src/input/backend/physicaldeviceproxy.cpp
@@ -42,7 +42,6 @@
#include <Qt3DInput/qabstractphysicaldevice.h>
#include <Qt3DInput/private/qabstractphysicaldeviceproxy_p_p.h>
#include <Qt3DInput/private/inputmanagers_p.h>
-#include <Qt3DCore/private/qpropertyupdatedchangebase_p.h>
#include <QCoreApplication>
QT_BEGIN_NAMESPACE
@@ -93,7 +92,6 @@ void PhysicalDeviceProxy::setDevice(QAbstractPhysicalDevice *device)
e->setDeliveryFlags(Qt3DCore::QSceneChange::DeliverToAll);
e->setPropertyName("device");
e->setValue(QVariant::fromValue(device));
- Qt3DCore::QPropertyUpdatedChangeBasePrivate::get(e.data())->m_isFinal = true;
notifyObservers(e);
}