Skip to content

Commit

Permalink
Disable copy of QgsScopedProxyProgressTask
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Apr 14, 2023
1 parent a87908d commit b118ce2
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
4 changes: 4 additions & 0 deletions python/core/auto_generated/qgsproxyprogresstask.sip.in
Expand Up @@ -87,13 +87,17 @@ when it goes out of scope.
Constructor for QgsScopedProxyProgressTask, with the specified ``description``.
%End


~QgsScopedProxyProgressTask();

void setProgress( double progress );
%Docstring
Sets the ``progress`` (from 0 to 100) for the proxied operation.
%End

private:
//! QgsScopedProxyProgressTask cannot be copied
QgsScopedProxyProgressTask( const QgsScopedProxyProgressTask &other );
};

/************************************************************************
Expand Down
10 changes: 10 additions & 0 deletions src/core/qgsproxyprogresstask.h
Expand Up @@ -105,6 +105,11 @@ class CORE_EXPORT QgsScopedProxyProgressTask
*/
QgsScopedProxyProgressTask( const QString &description );

//! QgsScopedProxyProgressTask cannot be copied
QgsScopedProxyProgressTask( const QgsScopedProxyProgressTask &other ) = delete;
//! QgsScopedProxyProgressTask cannot be copied
QgsScopedProxyProgressTask &operator=( const QgsScopedProxyProgressTask &other ) = delete;

~QgsScopedProxyProgressTask();

/**
Expand All @@ -116,6 +121,11 @@ class CORE_EXPORT QgsScopedProxyProgressTask

QgsProxyProgressTask *mTask = nullptr;

#ifdef SIP_RUN
//! QgsScopedProxyProgressTask cannot be copied
QgsScopedProxyProgressTask( const QgsScopedProxyProgressTask &other );
#endif

// SIP generates .cpp code that doesn't compile if commenting out the legit following line.
// Q_DISABLE_COPY( QgsScopedProxyProgressTask )
};
Expand Down

0 comments on commit b118ce2

Please sign in to comment.