path: root/src/gui/math3d/math3d.pri
diff options
authorGiuseppe D'Angelo <>2020-02-06 00:58:22 +0100
committerLars Knoll <>2020-11-19 12:28:45 +0100
commit5a61c88e1fee77db5c99837bf2d59630777b671a (patch)
treebcf98c37a00d69c3c1f0084115bf9094f23f9998 /src/gui/math3d/math3d.pri
parentb4c17476129e07dd3bf52c6aac8a51cf30c2dd3a (diff)
Clean up QVector2D/3D/4D
In random order: * Remove code marked for removal in Qt 6. * Inline as much as possible. This should give us a massive speed boost in some simple operations where the function call overhead as much as the cost of body of the function itself (lengthSquared, dotProduct, etc.). * Plaster constexpr and noexcept, as much as possible; follow Lakos' rule. * Unexport the classes; selectively export only the symbols still defined out of line. * Add [[nodiscard]] to any non-trivial mathematical operation (e.g. calculate the length). * To avoid circular dependencies, centralize their implementation in one file. Leave the existing headers for compatibility with existing #include statements. * Change all the signatures of the classes' members to take QVectorND, QPointF, etc. objects by value, not by const ref. Usage in other classes (e.g. QMatrix4x4) has not been adjusted. Change-Id: Iaf5a4b5289fcdf704e77656793390b8e772e94a5 Reviewed-by: Andy Nichols <>
Diffstat (limited to 'src/gui/math3d/math3d.pri')
1 files changed, 3 insertions, 4 deletions
diff --git a/src/gui/math3d/math3d.pri b/src/gui/math3d/math3d.pri
index e4dd53a68e..0cbc3db0e1 100644
--- a/src/gui/math3d/math3d.pri
+++ b/src/gui/math3d/math3d.pri
@@ -4,12 +4,11 @@ HEADERS += \
math3d/qquaternion.h \
math3d/qvector2d.h \
math3d/qvector3d.h \
- math3d/qvector4d.h
+ math3d/qvector4d.h \
+ math3d/qvectornd.h \
math3d/qgenericmatrix.cpp \
math3d/qmatrix4x4.cpp \
math3d/qquaternion.cpp \
- math3d/qvector2d.cpp \
- math3d/qvector3d.cpp \
- math3d/qvector4d.cpp
+ math3d/qvectornd.cpp \