QGIS API Documentation 3.37.0-Master (fdefdf9c27f)
Public Member Functions | List of all members
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 cannot be copied. More...
 
 QgsScopedAssignObjectToCurrentThread (QObject *object)
 Assigns object to the current thread. More...
 
 ~QgsScopedAssignObjectToCurrentThread ()
 
QgsScopedAssignObjectToCurrentThreadoperator= (const QgsScopedAssignObjectToCurrentThread &)=delete
 QgsScopedAssignObjectToCurrentThread cannot be copied. More...
 

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 72 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 83 of file qgsthreadingutils.h.

◆ ~QgsScopedAssignObjectToCurrentThread()

QgsScopedAssignObjectToCurrentThread::~QgsScopedAssignObjectToCurrentThread ( )
inline

Definition at line 91 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: