summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSean Harmer <sean.harmer@kdab.com>2017-05-11 16:19:15 +0100
committerJani Heikkinen <jani.heikkinen@qt.io>2017-05-12 06:10:13 +0000
commitc85c89443d45368441d7bc8747dd73364df37306 (patch)
tree484820ae12f9de924d12c261b9967829c7bfe188
parent773402d482c5b478e9b4b73719fa7b76792344f7 (diff)
Fix SC break
Change-Id: If9bd9142dcfceedb8baefe0c8229e7eb7e1e6e50 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
-rw-r--r--src/render/frontend/qabstractfunctor.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/render/frontend/qabstractfunctor.h b/src/render/frontend/qabstractfunctor.h
index c05c04743..95f6aee51 100644
--- a/src/render/frontend/qabstractfunctor.h
+++ b/src/render/frontend/qabstractfunctor.h
@@ -80,6 +80,14 @@ public:
virtual ~QAbstractFunctor();
virtual qintptr id() const = 0;
+ // TODO: Remove when moving a copy of this to Qt3DCore
+ template<class T>
+ const T *functor_cast(const QAbstractFunctor *other) const
+ {
+ if (other->id() == functorTypeId<T>())
+ return static_cast<const T *>(other);
+ return nullptr;
+ }
private:
Q_DISABLE_COPY(QAbstractFunctor)
};