summaryrefslogtreecommitdiffstats
path: root/src/quick3d/quick3d/qt3dquickvaluetypes.cpp
diff options
context:
space:
mode:
authorSean Harmer <sean.harmer@kdab.com>2014-12-30 13:00:39 +0000
committerSean Harmer <sean.harmer@kdab.com>2014-12-30 19:01:49 +0100
commit1675b5968365b927e795e239a322c1351fcc5677 (patch)
tree23861696bfea1f8067cb78b79e004a13058eacbd /src/quick3d/quick3d/qt3dquickvaluetypes.cpp
parent6306fc6a75481334c9fb1cbc7a81f4303ecddc59 (diff)
Fix compilation of Qt3D following fa3cf15e in qtdecalrative
The commit fa3cf15e0577fe382ac577456422ad78325a3977 in qtdeclarative changed the way QML value types are implemented. This commit fixes compilation of Qt3D by using the new approach for value types. Also fixed omission of Digia copyright (copy/paste error when originally adding these files). Change-Id: I9c186b792f8d2dca6cf48e619a57d50b8705ade6 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/quick3d/quick3d/qt3dquickvaluetypes.cpp')
-rw-r--r--src/quick3d/quick3d/qt3dquickvaluetypes.cpp67
1 files changed, 1 insertions, 66 deletions
diff --git a/src/quick3d/quick3d/qt3dquickvaluetypes.cpp b/src/quick3d/quick3d/qt3dquickvaluetypes.cpp
index 9a6c15432..300359929 100644
--- a/src/quick3d/quick3d/qt3dquickvaluetypes.cpp
+++ b/src/quick3d/quick3d/qt3dquickvaluetypes.cpp
@@ -1,5 +1,6 @@
/****************************************************************************
**
+** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
** Copyright (C) 2014 Klaralvdalens Datakonsult AB (KDAB).
** Contact: http://www.qt-project.org/legal
**
@@ -54,11 +55,6 @@ namespace Quick3DValueTypes {
}
}
-Quick3DColorValueType::Quick3DColorValueType(QObject *parent)
- : QQmlValueTypeBase<QColor>(QMetaType::QColor, parent)
-{
-}
-
QString Quick3DColorValueType::toString() const
{
// to maintain behaviour with QtQuick 1.0, we just output normal toString() value.
@@ -106,25 +102,11 @@ void Quick3DColorValueType::setA(qreal a)
}
-Quick3DVector2DValueType::Quick3DVector2DValueType(QObject *parent)
- : QQmlValueTypeBase<QVector2D>(QMetaType::QVector2D, parent)
-{
-}
-
QString Quick3DVector2DValueType::toString() const
{
return QString(QLatin1String("QVector2D(%1, %2)")).arg(v.x()).arg(v.y());
}
-bool Quick3DVector2DValueType::isEqual(const QVariant &other) const
-{
- if (other.userType() != QMetaType::QVector2D)
- return false;
-
- QVector2D otherVector = other.value<QVector2D>();
- return (v == otherVector);
-}
-
qreal Quick3DVector2DValueType::x() const
{
return v.x();
@@ -206,25 +188,11 @@ bool Quick3DVector2DValueType::fuzzyEquals(const QVector2D &vec) const
}
-Quick3DVector3DValueType::Quick3DVector3DValueType(QObject *parent)
- : QQmlValueTypeBase<QVector3D>(QMetaType::QVector3D, parent)
-{
-}
-
QString Quick3DVector3DValueType::toString() const
{
return QString(QLatin1String("QVector3D(%1, %2, %3)")).arg(v.x()).arg(v.y()).arg(v.z());
}
-bool Quick3DVector3DValueType::isEqual(const QVariant &other) const
-{
- if (other.userType() != QMetaType::QVector3D)
- return false;
-
- QVector3D otherVector = other.value<QVector3D>();
- return (v == otherVector);
-}
-
qreal Quick3DVector3DValueType::x() const
{
return v.x();
@@ -328,25 +296,11 @@ bool Quick3DVector3DValueType::fuzzyEquals(const QVector3D &vec) const
}
-Quick3DVector4DValueType::Quick3DVector4DValueType(QObject *parent)
- : QQmlValueTypeBase<QVector4D>(QMetaType::QVector4D, parent)
-{
-}
-
QString Quick3DVector4DValueType::toString() const
{
return QString(QLatin1String("QVector4D(%1, %2, %3, %4)")).arg(v.x()).arg(v.y()).arg(v.z()).arg(v.w());
}
-bool Quick3DVector4DValueType::isEqual(const QVariant &other) const
-{
- if (other.userType() != QMetaType::QVector4D)
- return false;
-
- QVector4D otherVector = other.value<QVector4D>();
- return (v == otherVector);
-}
-
qreal Quick3DVector4DValueType::x() const
{
return v.x();
@@ -456,10 +410,6 @@ bool Quick3DVector4DValueType::fuzzyEquals(const QVector4D &vec) const
return qFuzzyCompare(v, vec);
}
-Quick3DQuaternionValueType::Quick3DQuaternionValueType(QObject *parent)
- : QQmlValueTypeBase<QQuaternion>(QMetaType::QQuaternion, parent)
-{
-}
QString Quick3DQuaternionValueType::toString() const
{
@@ -507,11 +457,6 @@ void Quick3DQuaternionValueType::setZ(qreal z)
}
-Quick3DMatrix4x4ValueType::Quick3DMatrix4x4ValueType(QObject *parent)
- : QQmlValueTypeBase<QMatrix4x4>(QMetaType::QMatrix4x4, parent)
-{
-}
-
QMatrix4x4 Quick3DMatrix4x4ValueType::times(const QMatrix4x4 &m) const
{
return v * m;
@@ -594,16 +539,6 @@ QString Quick3DMatrix4x4ValueType::toString() const
.arg(v(3, 0)).arg(v(3, 1)).arg(v(3, 2)).arg(v(3, 3));
}
-bool Quick3DMatrix4x4ValueType::isEqual(const QVariant &other) const
-{
- if (other.userType() != qMetaTypeId<QMatrix4x4>())
- return false;
-
- QMatrix4x4 otherMatrix = other.value<QMatrix4x4>();
- return (v == otherMatrix);
-
-}
-
} // Quick
} // Qt3D