summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarc Mutz <[email protected]>2025-06-27 12:31:02 +0200
committerMarc Mutz <[email protected]>2025-07-15 12:17:28 +0200
commitb27e79ec0c4f07838bab6a8bcee31795883decb4 (patch)
tree14826b64395f0210c35c13f7c8c2ec1dfd4b7543
parent7e20f9a56cd55af822ee96d82f7157f05b6300a8 (diff)
qmatrix4x4.h: don't include qquaternion.h
It's only used as an argument of an out-of-line function, so a forward declaration suffices. Found while wondering why a change to qquaternion.h recompiles most of Qt ;-) [ChangeLog][Potentially Source-Incompatible Changes][QtGui] The qmatrix4x4.h header no longer includes qquaternion.h. A backwards-compatible fix is to not rely on transitive includes and include what you need explicitly. Pick-to: 6.10 Change-Id: Ic0e28155efa0342f22b08da28776819694fddcb5 Reviewed-by: Fabian Kosmale <[email protected]> Reviewed-by: Volker Hilsheimer <[email protected]>
-rw-r--r--src/gui/math3d/qmatrix4x4.cpp2
-rw-r--r--src/gui/math3d/qmatrix4x4.h4
2 files changed, 5 insertions, 1 deletions
diff --git a/src/gui/math3d/qmatrix4x4.cpp b/src/gui/math3d/qmatrix4x4.cpp
index 1703fa5b0fe..1e0f9295110 100644
--- a/src/gui/math3d/qmatrix4x4.cpp
+++ b/src/gui/math3d/qmatrix4x4.cpp
@@ -4,6 +4,8 @@
#include "qmatrix4x4.h"
#include <QtCore/qmath.h>
#include <QtCore/qvariant.h>
+
+#include <QtGui/qquaternion.h>
#include <QtGui/qtransform.h>
#include <cmath>
diff --git a/src/gui/math3d/qmatrix4x4.h b/src/gui/math3d/qmatrix4x4.h
index 80ba62ca36f..2ba274d4517 100644
--- a/src/gui/math3d/qmatrix4x4.h
+++ b/src/gui/math3d/qmatrix4x4.h
@@ -7,7 +7,6 @@
#include <QtGui/qtguiglobal.h>
#include <QtGui/qvector3d.h>
#include <QtGui/qvector4d.h>
-#include <QtGui/qquaternion.h>
#include <QtGui/qgenericmatrix.h>
#include <QtCore/qrect.h>
@@ -15,6 +14,9 @@ class tst_QMatrixNxN;
QT_BEGIN_NAMESPACE
+#ifndef QT_NO_QUATERNION
+class QQuaternion;
+#endif
#ifndef QT_NO_MATRIX4X4