QGIS API Documentation 3.99.0-Master (2fe06baccd8)
Loading...
Searching...
No Matches
QgsScopedAssignObjectToCurrentThread Class Reference

Temporarily moves a QObject to the current thread, then resets it back to nullptr thread on destruction. More...

#include <qgsthreadingutils.h>

Public Member Functions

 QgsScopedAssignObjectToCurrentThread (const QgsScopedAssignObjectToCurrentThread &other)=delete
 QgsScopedAssignObjectToCurrentThread (QObject *object)
 Assigns object to the current thread.
 ~QgsScopedAssignObjectToCurrentThread ()
QgsScopedAssignObjectToCurrentThreadoperator= (const QgsScopedAssignObjectToCurrentThread &)=delete

Detailed Description

Temporarily moves a QObject to the current thread, then resets it back to nullptr thread on destruction.

Since
QGIS 3.32

Definition at line 151 of file qgsthreadingutils.h.

Constructor & Destructor Documentation

◆ QgsScopedAssignObjectToCurrentThread() [1/2]

QgsScopedAssignObjectToCurrentThread::QgsScopedAssignObjectToCurrentThread ( QObject * object)
inline

Assigns object to the current thread.

If object is already assigned to the current thread, no action will be taken.

Warning
object must be assigned to the nullptr thread or the current thread, or this class will assert.

Definition at line 162 of file qgsthreadingutils.h.

◆ ~QgsScopedAssignObjectToCurrentThread()

QgsScopedAssignObjectToCurrentThread::~QgsScopedAssignObjectToCurrentThread ( )
inline

Definition at line 170 of file qgsthreadingutils.h.

◆ QgsScopedAssignObjectToCurrentThread() [2/2]

QgsScopedAssignObjectToCurrentThread::QgsScopedAssignObjectToCurrentThread ( const QgsScopedAssignObjectToCurrentThread & other)
delete

Member Function Documentation

◆ operator=()

QgsScopedAssignObjectToCurrentThread & QgsScopedAssignObjectToCurrentThread::operator= ( const QgsScopedAssignObjectToCurrentThread & )
delete

The documentation for this class was generated from the following file: