The QByteArray::FromBase64Result 类保持调用结果为 QByteArray::fromBase64Encoding . 更多...
bool | operator bool () const |
const QByteArray & | operator* () const |
QByteArray | decoded |
QByteArray::Base64DecodingStatus | decodingStatus |
size_t | qHash (const QByteArray::FromBase64Result & key , size_t seed = 0) |
bool | operator!= (const QByteArray::FromBase64Result & lhs , const QByteArray::FromBase64Result & rhs ) |
bool | operator== (const QByteArray::FromBase64Result & lhs , const QByteArray::FromBase64Result & rhs ) |
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:
auto result = QByteArray::fromBase64Encoding(encodedData); if (result.decodingStatus == QByteArray::Base64DecodingStatus::Ok) process(result.decoded);
另请参阅 QByteArray::fromBase64 .
[explicit noexcept]
bool
FromBase64Result::
operator bool
() const
Returns whether the decoding was successful. This is equivalent to checking whether the
decodingStatus
member is equal to QByteArray::Base64DecodingStatus::Ok.
[noexcept]
const
QByteArray
&FromBase64Result::
operator*
() const
返回解码字节数组。
包含解码字节数组。
Contains whether the decoding was successful, expressed as a value of type QByteArray::Base64DecodingStatus.
[noexcept]
size_t
qHash
(const
QByteArray::FromBase64Result
&
key
,
size_t
seed
= 0)
返回哈希值为 key ,使用 seed 做计算种子。
[noexcept]
bool
operator!=
(const
QByteArray::FromBase64Result
&
lhs
, const
QByteArray::FromBase64Result
&
rhs
)
返回
true
if
lhs
and
rhs
不同,否则返回
false
.
[noexcept]
bool
operator==
(const
QByteArray::FromBase64Result
&
lhs
, const
QByteArray::FromBase64Result
&
rhs
)
返回
true
if
lhs
and
rhs
相等,否则返回
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.