From b5193881e54ec3f3fe496654d23584eb5f96b692 Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Fri, 24 Jan 2020 15:05:46 +0100 Subject: Make QMatrix4x4::projectedRotate public The function is used by QGraphicsRotation, which is in widgets. QGraphicsRotation is marked as a friend, so that it can access the private method. QtQuick needs access to the same method, so internally it declares a "fake" QGraphicsRotation class, just so that it can private access. This breaks now that QtQuick needs to do QT += opengl, which implies widgets and thus ends up including the header file that also declares QGraphicsRotation. So instead of these hacks, let's make the function public, but remain \internal in terms of docs. Change-Id: I671f68c9d7ab0aac985e0b583f63f3ee962567dc Reviewed-by: Jarek Kobus Reviewed-by: Laszlo Agocs --- src/gui/math3d/qmatrix4x4.h | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/gui/math3d/qmatrix4x4.h b/src/gui/math3d/qmatrix4x4.h index 1439bfac59..4ad6cceaea 100644 --- a/src/gui/math3d/qmatrix4x4.h +++ b/src/gui/math3d/qmatrix4x4.h @@ -187,6 +187,7 @@ public: friend Q_GUI_EXPORT QDebug operator<<(QDebug dbg, const QMatrix4x4 &m); #endif + void projectedRotate(float angle, float x, float y, float z); private: float m[4][4]; // Column-major order to match OpenGL. int flagBits; // Flag bits from the enum below. @@ -206,10 +207,6 @@ private: explicit QMatrix4x4(int) { } QMatrix4x4 orthonormalInverse() const; - - void projectedRotate(float angle, float x, float y, float z); - - friend class QGraphicsRotation; }; QT_WARNING_PUSH -- cgit v1.2.3