diff options
author | Marc Mutz <marc.mutz@kdab.com> | 2016-02-10 15:43:15 +0100 |
---|---|---|
committer | Marc Mutz <marc.mutz@kdab.com> | 2016-02-11 19:26:05 +0000 |
commit | 4bc923b6281dcbdc610133f1c47523999ef8c153 (patch) | |
tree | dbdfc34e6a79d3824d094c62a29544b725b2b952 /src/gui/painting/qmatrix.cpp | |
parent | d55b685d237be7a6bd01b52600bcc9ffcee4e2a5 (diff) |
QMatrix, QTransform: restore nothrow move special members
The user-defined copy assignment and (on QMatrix) copy
constructors inhibit the move special member functions.
We cannot do something about it in Qt 5, because these
classes are exported (which they shouldn't be), and
because making them trivially copyable might change
how they are passed to functions by value, so we need
to supply all the missing member functions manually.
Change-Id: I59e480d7ba02cac7e3d654cb3345f541e0701f4c
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
Diffstat (limited to 'src/gui/painting/qmatrix.cpp')
-rw-r--r-- | src/gui/painting/qmatrix.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/gui/painting/qmatrix.cpp b/src/gui/painting/qmatrix.cpp index 80a8f361d9..681490e347 100644 --- a/src/gui/painting/qmatrix.cpp +++ b/src/gui/painting/qmatrix.cpp @@ -244,11 +244,11 @@ QMatrix::QMatrix(qreal m11, qreal m12, qreal m21, qreal m22, qreal dx, qreal dy) { } - +#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) /*! Constructs a matrix that is a copy of the given \a matrix. */ -QMatrix::QMatrix(const QMatrix &matrix) +QMatrix::QMatrix(const QMatrix &matrix) Q_DECL_NOTHROW : _m11(matrix._m11) , _m12(matrix._m12) , _m21(matrix._m21) @@ -257,6 +257,7 @@ QMatrix::QMatrix(const QMatrix &matrix) , _dy(matrix._dy) { } +#endif /*! Sets the matrix elements to the specified values, \a m11, \a m12, @@ -1063,10 +1064,11 @@ QMatrix QMatrix::operator *(const QMatrix &m) const return QMatrix(tm11, tm12, tm21, tm22, tdx, tdy, true); } +#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) /*! Assigns the given \a matrix's values to this matrix. */ -QMatrix &QMatrix::operator=(const QMatrix &matrix) +QMatrix &QMatrix::operator=(const QMatrix &matrix) Q_DECL_NOTHROW { _m11 = matrix._m11; _m12 = matrix._m12; @@ -1076,6 +1078,7 @@ QMatrix &QMatrix::operator=(const QMatrix &matrix) _dy = matrix._dy; return *this; } +#endif /*! \since 4.2 |