QtBase  v6.3.1
Classes | Macros | Functions
qpointer.h File Reference
#include <QtCore/qsharedpointer.h>
#include <QtCore/qtypeinfo.h>
Include dependency graph for qpointer.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  QPointer< T >
 The QPointer class is a template class that provides guarded pointers to QObject. More...
 

Macros

#define DECLARE_COMPARE_SET(T1, A1, T2, A2)
 
#define DECLARE_TEMPLATE_COMPARE_SET(T1, A1, T2, A2)
 

Functions

template<class T >
 Q_DECLARE_TYPEINFO_BODY (QPointer< T >, Q_RELOCATABLE_TYPE)
 
template<typename T >
QPointer< TqPointerFromVariant (const QVariant &variant)
 
template<class T >
void swap (QPointer< T > &p1, QPointer< T > &p2) noexcept
 

Macro Definition Documentation

◆ DECLARE_COMPARE_SET

#define DECLARE_COMPARE_SET (   T1,
  A1,
  T2,
  A2 
)
Value:
friend bool operator==(T1, T2) \
{ return A1 == A2; } \
friend bool operator!=(T1, T2) \
{ return A1 != A2; }
template< typename Enum > bool operator!=(Enum lhs, QFlags< Enum > rhs)
template< typename Enum > bool operator==(Enum lhs, QFlags< Enum > rhs)

Definition at line 93 of file qpointer.h.

◆ DECLARE_TEMPLATE_COMPARE_SET

#define DECLARE_TEMPLATE_COMPARE_SET (   T1,
  A1,
  T2,
  A2 
)
Value:
template <typename X> \
friend bool operator==(T1, T2) noexcept \
{ return A1 == A2; } \
template <typename X> \
friend bool operator!=(T1, T2) noexcept \
{ return A1 != A2; }

Definition at line 99 of file qpointer.h.

Function Documentation

◆ Q_DECLARE_TYPEINFO_BODY()

template<class T >
Q_DECLARE_TYPEINFO_BODY ( QPointer< T ,
Q_RELOCATABLE_TYPE   
)

◆ qPointerFromVariant()

template<typename T >
template< typename T > QPointer< T > qPointerFromVariant ( const QVariant variant)

Definition at line 119 of file qpointer.h.

Here is the call graph for this function:

◆ swap()

template<class T >
void swap ( QPointer< T > &  p1,
QPointer< T > &  p2 
)
inlinenoexcept

Definition at line 126 of file qpointer.h.

Here is the call graph for this function: