QGIS API Documentation 3.40.0-Bratislava (b56115d8743)
Loading...
Searching...
No Matches
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 (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 82 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 93 of file qgsthreadingutils.h.

◆ ~QgsScopedAssignObjectToCurrentThread()

QgsScopedAssignObjectToCurrentThread::~QgsScopedAssignObjectToCurrentThread ( )
inline

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