QEasingCurve: remove incorrect noexcept
The comparison operators cannot really be noexcept, because they call other non-noexcept getters, like QEasingCurve::amplitude(), QEasingCurve::period(), and QEasingCurve::overshoot(). Amends a4341827ac17c14541ea69c67c76aaae5a09ddcc. Found in 6.8 API reivew. Change-Id: I77c01792adbf7d9a7e36d7efec6defbea866b7d2 Reviewed-by: Marc Mutz <marc.mutz@qt.io> (cherry picked from commit 3cf7eff6265b4321e216f830b2ecf1ee4118fad4) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
f2bcf582dd
commit
9f06e0b1f8
@ -1159,7 +1159,7 @@ QEasingCurve::~QEasingCurve()
|
||||
equal; otherwise returns \c false.
|
||||
It will also compare the properties of the curves.
|
||||
*/
|
||||
bool comparesEqual(const QEasingCurve &lhs, const QEasingCurve &rhs) noexcept
|
||||
bool comparesEqual(const QEasingCurve &lhs, const QEasingCurve &rhs)
|
||||
{
|
||||
bool res = lhs.d_ptr->func == rhs.d_ptr->func
|
||||
&& lhs.d_ptr->type == rhs.d_ptr->type;
|
||||
|
@ -85,9 +85,9 @@ private:
|
||||
friend Q_CORE_EXPORT QDataStream &operator>>(QDataStream &, QEasingCurve &);
|
||||
#endif
|
||||
friend Q_CORE_EXPORT bool
|
||||
comparesEqual(const QEasingCurve &lhs, const QEasingCurve &rhs) noexcept;
|
||||
comparesEqual(const QEasingCurve &lhs, const QEasingCurve &rhs);
|
||||
#if !QT_CORE_REMOVED_SINCE(6, 8)
|
||||
Q_DECLARE_EQUALITY_COMPARABLE(QEasingCurve)
|
||||
Q_DECLARE_EQUALITY_COMPARABLE_NON_NOEXCEPT(QEasingCurve)
|
||||
#endif
|
||||
};
|
||||
Q_DECLARE_SHARED(QEasingCurve)
|
||||
|
Loading…
x
Reference in New Issue
Block a user