![]() |
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 Referred &referred) noexcept(std::is_nothrow_copy_constructible_v< Referred >) | |
| Creates a QVariant::Reference from a referred. | |
| Reference (Referred &&referred) noexcept(std::is_nothrow_move_constructible_v< Referred >) | |
| Creates a QVariant::Reference from a referred. | |
| Reference (const Reference &)=default | |
| Reference (Reference &&)=default | |
| ~Reference ()=default | |
| Reference & | operator= (const Reference &value) noexcept(Referred::canNoexceptAssignQVariant) |
| Assigns a new value to the value referred to by this QVariant::Reference. | |
| Reference & | operator= (Reference &&value) noexcept(Referred::canNoexceptAssignQVariant) |
| Assigns a new value to the value referred to by this QVariant::Reference. | |
| operator QVariant () const noexcept(Referred::canNoexceptConvertToQVariant) | |
| Dereferences the reference to a QVariant. | |
| void | swap (Reference b) |
| Reference & | operator= (const QVariant &value) noexcept(Referred::canNoexceptAssignQVariant) |
| Assigns a new value to the value referred to by this QVariant::Reference. | |
Friends | |
| 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 provides the same functionality as an actual reference to a QVariant would, but is backed a referred-to value given as template parameter. The template is implemented for QMetaSequence::Iterator and QMetaAssociation::Iterator.
Definition at line 270 of file qvariant.h.
|
inlineexplicitnoexcept |
Creates a QVariant::Reference from a referred.
Definition at line 280 of file qvariant.h.
|
inlineexplicitnoexcept |
Creates a QVariant::Reference from a referred.
Definition at line 283 of file qvariant.h.
|
default |
|
default |
|
default |
|
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 302 of file qvariant.h.
|
noexcept |
Assigns a new value to the value referred to by this QVariant::Reference.
This method needs to be specialized for each Referred 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 290 of file qvariant.h.
|
inlinenoexcept |
Assigns a new value to the value referred to by this QVariant::Reference.
Definition at line 296 of file qvariant.h.
|
inline |
Definition at line 307 of file qvariant.h.
Definition at line 275 of file qvariant.h.