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
QByteArray::FromBase64Result Class Reference

\inmodule QtCore More...

#include <qbytearray.h>

+ Collaboration diagram for QByteArray::FromBase64Result:

Public Member Functions

void swap (QByteArray::FromBase64Result &other) noexcept
 
 operator bool () const noexcept
 \variable QByteArray::FromBase64Result::decoded
 
QByteArrayoperator* () noexcept
 
const QByteArrayoperator* () const noexcept
 Returns the decoded byte array.
 

Public Attributes

QByteArray decoded
 
QByteArray::Base64DecodingStatus decodingStatus
 

Friends

bool operator== (const QByteArray::FromBase64Result &lhs, const QByteArray::FromBase64Result &rhs) noexcept
 Returns true if lhs and rhs are equal, otherwise returns false.
 
bool operator!= (const QByteArray::FromBase64Result &lhs, const QByteArray::FromBase64Result &rhs) noexcept
 Returns true if lhs and rhs are different, otherwise returns false.
 

Related Symbols

(Note that these are not member symbols.)

size_t qHash (const QByteArray::FromBase64Result &key, size_t seed) noexcept
 Returns the hash value for key, using seed to seed the calculation.
 

Detailed Description

\inmodule QtCore

Since
5.15

The QByteArray::FromBase64Result class holds the result of a call to QByteArray::fromBase64Encoding.

Objects of this class can be used to check whether the conversion was successful, and if so, retrieve the decoded QByteArray. The conversion operators defined for QByteArray::FromBase64Result make its usage straightforward:

void process(const QByteArray &);
if (auto result = QByteArray::fromBase64Encoding(encodedData))
process(*result);

Alternatively, it is possible to access the conversion status and the decoded data directly:

process(result.decoded);
See also
QByteArray::fromBase64

Definition at line 736 of file qbytearray.h.

Member Function Documentation

◆ operator bool()

QByteArray::FromBase64Result::operator bool ( ) const
inlineexplicitnoexcept

\variable QByteArray::FromBase64Result::decoded

Contains the decoded byte array.

\variable QByteArray::FromBase64Result::decodingStatus

Contains whether the decoding was successful, expressed as a value of type QByteArray::Base64DecodingStatus.

Returns whether the decoding was successful. This is equivalent to checking whether the {decodingStatus} member is equal to QByteArray::Base64DecodingStatus::Ok.

Definition at line 748 of file qbytearray.h.

References QByteArray::Ok.

◆ operator*() [1/2]

QByteArray & QByteArray::FromBase64Result::operator* ( ) const
inlinenoexcept

Returns the decoded byte array.

Definition at line 756 of file qbytearray.h.

◆ operator*() [2/2]

QByteArray & QByteArray::FromBase64Result::operator* ( )
inlinenoexcept

Definition at line 755 of file qbytearray.h.

◆ swap()

void QByteArray::FromBase64Result::swap ( QByteArray::FromBase64Result & other)
inlinenoexcept

Definition at line 742 of file qbytearray.h.

References other(), and QByteArray::swap().

+ Here is the call graph for this function:

Friends And Related Symbol Documentation

◆ operator!=

bool QByteArray::FromBase64Result::operator!= ( const QByteArray::FromBase64Result & lhs,
const QByteArray::FromBase64Result & rhs )
friend

Returns true if lhs and rhs are different, otherwise returns false.

Definition at line 770 of file qbytearray.h.

◆ operator==

bool QByteArray::FromBase64Result::operator== ( const QByteArray::FromBase64Result & lhs,
const QByteArray::FromBase64Result & rhs )
friend

Returns true if lhs and rhs are equal, otherwise returns false.

lhs and rhs are equal if and only if they contain the same decoding status and, if the status is QByteArray::Base64DecodingStatus::Ok, if and only if they contain the same decoded data.

Definition at line 759 of file qbytearray.h.

◆ qHash()

size_t qHash ( const QByteArray::FromBase64Result & key,
size_t seed )
related

Returns the hash value for key, using seed to seed the calculation.

Definition at line 5182 of file qbytearray.cpp.

References qHashMulti(), and seed.

+ Here is the call graph for this function:

Member Data Documentation

◆ decoded

QByteArray QByteArray::FromBase64Result::decoded

Definition at line 739 of file qbytearray.h.

◆ decodingStatus

QByteArray::Base64DecodingStatus QByteArray::FromBase64Result::decodingStatus

Definition at line 740 of file qbytearray.h.


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