![]() |
Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
|
The QVariant::Reference acts as a non-const reference to a QVariant. More...
#include <qvariant.h>
Public Member Functions | |
| Reference (const Indirect &referred) noexcept(std::is_nothrow_copy_constructible_v< Indirect >) | |
| Creates a QVariant::Reference from a referred. | |
| Reference (Indirect &&referred) noexcept(std::is_nothrow_move_constructible_v< Indirect >) | |
| Creates a QVariant::Reference from a referred. | |
| Reference (const Reference &)=default | |
| Reference (Reference &&)=delete | |
| ~Reference ()=default | |
| Reference & | operator= (const Reference &value) noexcept(Indirect::CanNoexceptAssignQVariant) |
| Assigns a new value to the value referred to by this QVariant::Reference. | |
| Reference & | operator= (Reference &&value) noexcept(Indirect::CanNoexceptAssignQVariant) |
| Assigns a new value to the value referred to by this QVariant::Reference. | |
| Reference & | operator= (const ConstReference< Indirect > &value) noexcept(Indirect::CanNoexceptAssignQVariant) |
| Assigns a new value to the value referred to by this QVariant::Reference. | |
| Reference & | operator= (ConstReference< Indirect > &&value) noexcept(Indirect::CanNoexceptAssignQVariant) |
| Assigns a new value to the value referred to by this QVariant::Reference. | |
| operator QVariant () const noexcept(Indirect::CanNoexceptConvertToQVariant) | |
| Dereferences the reference to a QVariant. | |
| void | swap (Reference b) |
| Reference & | operator= (const QVariant &value) noexcept(Indirect::CanNoexceptAssignQVariant) |
| Assigns a new value to the value referred to by this QVariant::Reference. | |
| operator QVariant () const | |
| QVariant::Reference< QtMetaContainerPrivate::AssociativeIterator > & | operator= (const QVariant &value) |
| operator QVariant () const | |
| QVariant::Reference< QtMetaContainerPrivate::SequentialIterator > & | operator= (const QVariant &value) |
Friends | |
| class | ConstReference< Indirect > |
| void | swap (Reference a, Reference b) |
The QVariant::Reference acts as a non-const reference to a QVariant.
As the generic iterators don't actually instantiate a QVariant on each step, they cannot return a reference to one from operator*(). QVariant::Reference<Indirect> provides the same functionality as an actual reference to a QVariant would, but is backed by a referred-to value of type Indirect. The template is implemented for QMetaSequence::Iterator and QMetaAssociation::Iterator.
Definition at line 279 of file qvariant.h.
|
inlineexplicitnoexcept |
Creates a QVariant::Reference from a referred.
Definition at line 290 of file qvariant.h.
|
inlineexplicitnoexcept |
Creates a QVariant::Reference from a referred.
Definition at line 293 of file qvariant.h.
|
default |
|
delete |
|
default |
|
inline |
Definition at line 95 of file qmetaassociation.h.
|
inline |
Definition at line 67 of file qmetasequence.h.
|
inlinenoexcept |
Dereferences the reference to a QVariant.
By default this instantiates a temporary QVariant::ConstReference and calls dereferences that. In cases where instantiating a temporary ConstReference is expensive, this method should be specialized.
Definition at line 330 of file qvariant.h.
|
inlinenoexcept |
Assigns a new value to the value referred to by this QVariant::Reference.
Definition at line 318 of file qvariant.h.
|
inline |
Definition at line 102 of file qmetaassociation.h.
|
inline |
Definition at line 74 of file qmetasequence.h.
|
noexcept |
Assigns a new value to the value referred to by this QVariant::Reference.
This method needs to be specialized for each Indirect type. It is pre-defined for QMetaSequence::Iterator and QMetaAssociation::Iterator.
|
inlinenoexcept |
Assigns a new value to the value referred to by this QVariant::Reference.
Definition at line 306 of file qvariant.h.
|
inlinenoexcept |
Assigns a new value to the value referred to by this QVariant::Reference.
Definition at line 324 of file qvariant.h.
|
inlinenoexcept |
Assigns a new value to the value referred to by this QVariant::Reference.
Definition at line 312 of file qvariant.h.
|
inline |
Definition at line 335 of file qvariant.h.
|
friend |
Definition at line 275 of file qvariant.h.
Definition at line 285 of file qvariant.h.