diff options
author | Alex Blasche <alexander.blasche@digia.com> | 2014-03-07 12:33:32 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-03-08 11:44:46 +0100 |
commit | d42b8a22ff8e201166ea3c3ac0bb3e43a615a5d3 (patch) | |
tree | 4af67ca331dbd1d8cd2a863fbb8f0d747df751e6 /src/gui | |
parent | 2f63d04ff1e9c28f5c5c6465306f6e19ba781287 (diff) |
Make QVector* compile on Win/static
Task-number: QTBUG-37122
Change-Id: Ib2283e8c27da7af2bdc08eee3b7cc542fbe55d71
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/math3d/qvector2d.cpp | 2 | ||||
-rw-r--r-- | src/gui/math3d/qvector2d.h | 2 | ||||
-rw-r--r-- | src/gui/math3d/qvector3d.cpp | 4 | ||||
-rw-r--r-- | src/gui/math3d/qvector3d.h | 2 | ||||
-rw-r--r-- | src/gui/math3d/qvector4d.cpp | 2 | ||||
-rw-r--r-- | src/gui/math3d/qvector4d.h | 2 |
6 files changed, 11 insertions, 3 deletions
diff --git a/src/gui/math3d/qvector2d.cpp b/src/gui/math3d/qvector2d.cpp index a56e23eb72..73999f1fca 100644 --- a/src/gui/math3d/qvector2d.cpp +++ b/src/gui/math3d/qvector2d.cpp @@ -326,10 +326,12 @@ float QVector2D::distanceToLine /*! Returns the dot product of \a v1 and \a v2. */ +#if defined(QT_BUILD_GUI_LIB) && !defined(QT_STATIC) float QVector2D::dotProduct(const QVector2D& v1, const QVector2D& v2) { return v1.xp * v2.xp + v1.yp * v2.yp; } +#endif /*! \fn bool operator==(const QVector2D &v1, const QVector2D &v2) diff --git a/src/gui/math3d/qvector2d.h b/src/gui/math3d/qvector2d.h index 649d45d477..0098c119ec 100644 --- a/src/gui/math3d/qvector2d.h +++ b/src/gui/math3d/qvector2d.h @@ -99,7 +99,7 @@ public: QVector2D &operator*=(const QVector2D &vector); QVector2D &operator/=(float divisor); -#ifdef QT_BUILD_GUI_LIB +#if defined(QT_BUILD_GUI_LIB) && !defined(QT_STATIC) static float dotProduct(const QVector2D& v1, const QVector2D& v2); #else Q_DECL_CONSTEXPR inline static float dotProduct(const QVector2D& v1, const QVector2D& v2) diff --git a/src/gui/math3d/qvector3d.cpp b/src/gui/math3d/qvector3d.cpp index 7e3ed7c61b..1cb73a1fa2 100644 --- a/src/gui/math3d/qvector3d.cpp +++ b/src/gui/math3d/qvector3d.cpp @@ -316,10 +316,12 @@ void QVector3D::normalize() /*! Returns the dot product of \a v1 and \a v2. */ +#if defined(QT_BUILD_GUI_LIB) && !defined(QT_STATIC) float QVector3D::dotProduct(const QVector3D& v1, const QVector3D& v2) { return v1.xp * v2.xp + v1.yp * v2.yp + v1.zp * v2.zp; } +#endif /*! Returns the cross-product of vectors \a v1 and \a v2, which corresponds @@ -327,12 +329,14 @@ float QVector3D::dotProduct(const QVector3D& v1, const QVector3D& v2) \sa normal() */ +#if defined(QT_BUILD_GUI_LIB) && !defined(QT_STATIC) QVector3D QVector3D::crossProduct(const QVector3D& v1, const QVector3D& v2) { return QVector3D(v1.yp * v2.zp - v1.zp * v2.yp, v1.zp * v2.xp - v1.xp * v2.zp, v1.xp * v2.yp - v1.yp * v2.xp); } +#endif /*! Returns the normal vector of a plane defined by vectors \a v1 and \a v2, diff --git a/src/gui/math3d/qvector3d.h b/src/gui/math3d/qvector3d.h index c5506bf1ac..64f8e34704 100644 --- a/src/gui/math3d/qvector3d.h +++ b/src/gui/math3d/qvector3d.h @@ -95,7 +95,7 @@ public: QVector3D &operator*=(const QVector3D& vector); QVector3D &operator/=(float divisor); -#ifdef QT_BUILD_GUI_LIB +#if defined(QT_BUILD_GUI_LIB) && !defined(QT_STATIC) static float dotProduct(const QVector3D& v1, const QVector3D& v2); static QVector3D crossProduct(const QVector3D& v1, const QVector3D& v2); #else diff --git a/src/gui/math3d/qvector4d.cpp b/src/gui/math3d/qvector4d.cpp index 691551367f..b3db610d9a 100644 --- a/src/gui/math3d/qvector4d.cpp +++ b/src/gui/math3d/qvector4d.cpp @@ -369,10 +369,12 @@ void QVector4D::normalize() /*! Returns the dot product of \a v1 and \a v2. */ +#if defined(QT_BUILD_GUI_LIB) && !defined(QT_STATIC) float QVector4D::dotProduct(const QVector4D& v1, const QVector4D& v2) { return v1.xp * v2.xp + v1.yp * v2.yp + v1.zp * v2.zp + v1.wp * v2.wp; } +#endif /*! \fn bool operator==(const QVector4D &v1, const QVector4D &v2) diff --git a/src/gui/math3d/qvector4d.h b/src/gui/math3d/qvector4d.h index 1256f384a0..2bc5b79c14 100644 --- a/src/gui/math3d/qvector4d.h +++ b/src/gui/math3d/qvector4d.h @@ -102,7 +102,7 @@ public: QVector4D &operator*=(const QVector4D &vector); QVector4D &operator/=(float divisor); -#ifdef QT_BUILD_GUI_LIB +#if defined(QT_BUILD_GUI_LIB) && !defined(QT_STATIC) static float dotProduct(const QVector4D& v1, const QVector4D& v2); #else static float dotProduct(const QVector4D& v1, const QVector4D& v2) |