Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
History providers should be QObjects
  • Loading branch information
nyalldawson committed Apr 23, 2023
1 parent 8958af7 commit 8795bd9
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
4 changes: 2 additions & 2 deletions python/gui/auto_generated/history/qgshistoryprovider.sip.in
Expand Up @@ -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).
Expand All @@ -24,7 +24,7 @@ Abstract base class for objects which track user history (i.e. operations perfor
public:

%ConvertToSubClassCode
if ( dynamic_cast<QgsProcessingHistoryProvider *>( sipCpp ) )
if ( qobject_cast<QgsProcessingHistoryProvider *>( sipCpp ) )
sipType = sipType_QgsProcessingHistoryProvider;
else
sipType = nullptr;
Expand Down
6 changes: 4 additions & 2 deletions src/gui/history/qgshistoryprovider.h
Expand Up @@ -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<QgsProcessingHistoryProvider *>( sipCpp ) )
if ( qobject_cast<QgsProcessingHistoryProvider *>( sipCpp ) )
sipType = sipType_QgsProcessingHistoryProvider;
else
sipType = nullptr;
Expand Down
2 changes: 2 additions & 0 deletions src/gui/processing/qgsprocessinghistoryprovider.h
Expand Up @@ -29,6 +29,8 @@
*/
class GUI_EXPORT QgsProcessingHistoryProvider : public QgsAbstractHistoryProvider
{
Q_OBJECT

public:

QgsProcessingHistoryProvider();
Expand Down

0 comments on commit 8795bd9

Please sign in to comment.