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
QVariantConstPointer Class Reference

Emulated const pointer to QVariant based on a pointer. More...

#include <qvariant.h>

+ Collaboration diagram for QVariantConstPointer:

Public Member Functions

 QVariantConstPointer (QVariant variant)
 Constructs a QVariantConstPointer from a variant.
 
QVariant operator* () const
 Dereferences the QVariantConstPointer to retrieve its internal QVariant.
 
const QVariantoperator-> () const
 Returns a const pointer to the QVariant, conforming to the conventions for operator->().
 

Detailed Description

Emulated const pointer to QVariant based on a pointer.

Since
6.0 \inmodule QtCore

QVariantConstPointer wraps a QVariant and returns it from its operator*(). This makes it suitable as replacement for an actual const pointer. We cannot return an actual const pointer from generic iterators as the iterators don't hold an actual QVariant.

Definition at line 858 of file qvariant.h.

Constructor & Destructor Documentation

◆ QVariantConstPointer()

QVariantConstPointer::QVariantConstPointer ( QVariant variant)
explicit

Constructs a QVariantConstPointer from a variant.

Definition at line 2978 of file qvariant.cpp.

Member Function Documentation

◆ operator*()

QVariant QVariantConstPointer::operator* ( ) const

Dereferences the QVariantConstPointer to retrieve its internal QVariant.

Definition at line 2986 of file qvariant.cpp.

◆ operator->()

const QVariant * QVariantConstPointer::operator-> ( ) const

Returns a const pointer to the QVariant, conforming to the conventions for operator->().

Definition at line 2995 of file qvariant.cpp.


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