diff --git a/python/gui/auto_generated/history/qgshistoryprovider.sip.in b/python/gui/auto_generated/history/qgshistoryprovider.sip.in index b74b615dddb..4c27b675922 100644 --- a/python/gui/auto_generated/history/qgshistoryprovider.sip.in +++ b/python/gui/auto_generated/history/qgshistoryprovider.sip.in @@ -8,7 +8,7 @@ -class QgsAbstractHistoryProvider +class QgsAbstractHistoryProvider : QObject { %Docstring(signature="appended") Abstract base class for objects which track user history (i.e. operations performed through the GUI). @@ -24,7 +24,7 @@ Abstract base class for objects which track user history (i.e. operations perfor public: %ConvertToSubClassCode - if ( dynamic_cast( sipCpp ) ) + if ( qobject_cast( sipCpp ) ) sipType = sipType_QgsProcessingHistoryProvider; else sipType = nullptr; diff --git a/src/gui/history/qgshistoryprovider.h b/src/gui/history/qgshistoryprovider.h index 5d59031c4f2..1e05d5ebef2 100644 --- a/src/gui/history/qgshistoryprovider.h +++ b/src/gui/history/qgshistoryprovider.h @@ -33,13 +33,15 @@ class QgsHistoryWidgetContext; * \ingroup gui * \since QGIS 3.24 */ -class GUI_EXPORT QgsAbstractHistoryProvider +class GUI_EXPORT QgsAbstractHistoryProvider : public QObject { + Q_OBJECT + public: #ifdef SIP_RUN SIP_CONVERT_TO_SUBCLASS_CODE - if ( dynamic_cast( sipCpp ) ) + if ( qobject_cast( sipCpp ) ) sipType = sipType_QgsProcessingHistoryProvider; else sipType = nullptr; diff --git a/src/gui/processing/qgsprocessinghistoryprovider.h b/src/gui/processing/qgsprocessinghistoryprovider.h index f67d254d468..d430bd79686 100644 --- a/src/gui/processing/qgsprocessinghistoryprovider.h +++ b/src/gui/processing/qgsprocessinghistoryprovider.h @@ -29,6 +29,8 @@ */ class GUI_EXPORT QgsProcessingHistoryProvider : public QgsAbstractHistoryProvider { + Q_OBJECT + public: QgsProcessingHistoryProvider();