Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
QVariantRef< Pointer > Class Template Reference

The QVariantRef acts as a non-const reference to a QVariant. More...

#include <qvariant.h>

+ Collaboration diagram for QVariantRef< Pointer >:

Public Member Functions

 QVariantRef (const Pointer *reference)
 Creates a QVariantRef from an pointer.
 
 QVariantRef (const QVariantRef &)=default
 
 QVariantRef (QVariantRef &&)=default
 
 ~QVariantRef ()=default
 
 operator QVariant () const
 Resolves the QVariantRef to an actual QVariant.
 
QVariantRefoperator= (const QVariant &value)
 Assigns a new value to the value pointed to by the pointer this QVariantRef refers to.
 
QVariantRefoperator= (const QVariantRef &value)
 Assigns a new value to the value pointed to by the pointer this QVariantRef refers to.
 
QVariantRefoperator= (QVariantRef &&value)
 Assigns a new value to the value pointed to by the pointer this QVariantRef refers to.
 
 operator QVariant () const
 
QVariantRef< QAssociativeIterator > & operator= (const QVariant &value)
 
 operator QVariant () const
 
QVariantRef< QSequentialIterator > & operator= (const QVariant &value)
 

Friends

void swap (QVariantRef a, QVariantRef b)
 

Detailed Description

template<typename Pointer>
class QVariantRef< Pointer >

The QVariantRef acts as a non-const reference to a QVariant.

Since
6.0 \inmodule QtCore

As the generic iterators don't actually instantiate a QVariant on each step, they cannot return a reference to one from operator*(). QVariantRef provides the same functionality as an actual reference to a QVariant would, but is backed by a pointer given as template parameter. The template is implemented for pointers of type QSequentialIterator and QAssociativeIterator.

Definition at line 834 of file qvariant.h.

Constructor & Destructor Documentation

◆ QVariantRef() [1/3]

template<typename Pointer >
template< typename Pointer > QVariantRef< Pointer >::QVariantRef ( const Pointer * reference)
inlineexplicit

Creates a QVariantRef from an pointer.

Definition at line 840 of file qvariant.h.

◆ QVariantRef() [2/3]

template<typename Pointer >
QVariantRef< Pointer >::QVariantRef ( const QVariantRef< Pointer > & )
default

◆ QVariantRef() [3/3]

template<typename Pointer >
QVariantRef< Pointer >::QVariantRef ( QVariantRef< Pointer > && )
default

◆ ~QVariantRef()

template<typename Pointer >
QVariantRef< Pointer >::~QVariantRef ( )
default

Member Function Documentation

◆ operator QVariant() [1/3]

QVariantRef< QAssociativeIterator >::operator QVariant ( ) const
inline

Definition at line 133 of file qassociativeiterable.h.

References QMetaType::isValid().

+ Here is the call graph for this function:

◆ operator QVariant() [2/3]

QVariantRef< QSequentialIterator >::operator QVariant ( ) const
inline

Definition at line 124 of file qsequentialiterable.h.

◆ operator QVariant() [3/3]

template<typename Pointer >
template< typename Pointer > QVariantRef< Pointer >::operator QVariant ( ) const

Resolves the QVariantRef to an actual QVariant.

◆ operator=() [1/5]

QVariantRef< QAssociativeIterator > & QVariantRef< QAssociativeIterator >::operator= ( const QVariant & value)
inline

Definition at line 150 of file qassociativeiterable.h.

References QMetaType::isValid().

+ Here is the call graph for this function:

◆ operator=() [2/5]

QVariantRef< QSequentialIterator > & QVariantRef< QSequentialIterator >::operator= ( const QVariant & value)
inline

Definition at line 136 of file qsequentialiterable.h.

◆ operator=() [3/5]

template<typename Pointer >
template< typename Pointer > QVariantRef< Pointer > & QVariantRef< Pointer >::operator= ( const QVariant & value)

Assigns a new value to the value pointed to by the pointer this QVariantRef refers to.

◆ operator=() [4/5]

template<typename Pointer >
template< typename Pointer > QVariantRef< Pointer > & QVariantRef< Pointer >::operator= ( const QVariantRef< Pointer > & value)
inline

Assigns a new value to the value pointed to by the pointer this QVariantRef refers to.

Definition at line 847 of file qvariant.h.

References QVariantRef< Pointer >::operator=().

Referenced by QVariantRef< Pointer >::operator=().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ operator=() [5/5]

template<typename Pointer >
template< typename Pointer > QVariantRef< Pointer > & QVariantRef< Pointer >::operator= ( QVariantRef< Pointer > && value)
inline

Assigns a new value to the value pointed to by the pointer this QVariantRef refers to.

Definition at line 848 of file qvariant.h.

References QVariantRef< Pointer >::operator=().

Referenced by QVariantRef< Pointer >::operator=().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Friends And Related Symbol Documentation

◆ swap

template<typename Pointer >
void swap ( QVariantRef< Pointer > a,
QVariantRef< Pointer > b )
friend

Definition at line 850 of file qvariant.h.


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