diff --git a/python/PyQt6/core/auto_generated/qgsmathutils.sip.in b/python/PyQt6/core/auto_generated/qgsmathutils.sip.in index 1bfec61a398..210957d48ec 100644 --- a/python/PyQt6/core/auto_generated/qgsmathutils.sip.in +++ b/python/PyQt6/core/auto_generated/qgsmathutils.sip.in @@ -20,6 +20,9 @@ Contains utility functions for mathematical operations. %TypeHeaderCode #include "qgsmathutils.h" %End + public: + static const QMetaObject staticMetaObject; + public: static void doubleToRational( double value, qlonglong &numerator /Out/, qlonglong &denominator /Out/, double tolerance = 1.0e-9, int maxIterations = 100 ); diff --git a/python/core/auto_generated/qgsmathutils.sip.in b/python/core/auto_generated/qgsmathutils.sip.in index 1bfec61a398..210957d48ec 100644 --- a/python/core/auto_generated/qgsmathutils.sip.in +++ b/python/core/auto_generated/qgsmathutils.sip.in @@ -20,6 +20,9 @@ Contains utility functions for mathematical operations. %TypeHeaderCode #include "qgsmathutils.h" %End + public: + static const QMetaObject staticMetaObject; + public: static void doubleToRational( double value, qlonglong &numerator /Out/, qlonglong &denominator /Out/, double tolerance = 1.0e-9, int maxIterations = 100 ); diff --git a/src/core/qgsmathutils.h b/src/core/qgsmathutils.h index bd1862adff0..8b28ddc6821 100644 --- a/src/core/qgsmathutils.h +++ b/src/core/qgsmathutils.h @@ -29,6 +29,8 @@ */ class CORE_EXPORT QgsMathUtils { + Q_GADGET + public: /** @@ -40,7 +42,7 @@ class CORE_EXPORT QgsMathUtils * \param tolerance desired precision. The returned fraction will be at within this tolerance of the original value. * \param maxIterations maximum number of iterations. Higher values result in better approximations, but at the cost of additional computation. */ - static void doubleToRational( double value, qlonglong &numerator SIP_OUT, qlonglong &denominator SIP_OUT, double tolerance = 1.0e-9, int maxIterations = 100 ); + Q_INVOKABLE static void doubleToRational( double value, qlonglong &numerator SIP_OUT, qlonglong &denominator SIP_OUT, double tolerance = 1.0e-9, int maxIterations = 100 ); };