path: root/src
diff options
authorSimon Hausmann <>2020-01-24 15:05:46 +0100
committerSimon Hausmann <>2020-01-24 15:20:54 +0100
commitb5193881e54ec3f3fe496654d23584eb5f96b692 (patch)
tree677bd96af61735fa85dd8bdb521939dcb61510d3 /src
parent2344e5cc3104b7d599f4d2a96bbfd8530223a08e (diff)
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 <>
Diffstat (limited to 'src')
1 files changed, 1 insertions, 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);
+ void projectedRotate(float angle, float x, float y, float z);
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;