QByteArray::FromBase64Result Class
The QByteArray::FromBase64Result class holds the result of QByteArray::fromBase64Encoding(). More…
| Header | #include <QByteArray> |
|---|---|
| CMake | target_link_libraries(app PRIVATE Nt::Core) |
| Module | Nt Core C++ Classes |
| Since | 5.15 |
| Nested in | QByteArray |
List of all members, including inherited members
Public Functions
| void | swap(FromBase64Result &other) |
| operator bool() const | |
| QByteArray & | operator*() & |
| const QByteArray & | operator*() const & |
Public Variables
Detailed Description
The result converts to true when the data was decoded, and * gives the decoded bytes:
if (auto result = QByteArray::fromBase64Encoding(text, QByteArray::AbortOnBase64DecodingErrors))
process(*result);
else
qWarning() << "bad Base64:" << int(result.decodingStatus);
See also QByteArray::fromBase64Encoding().
Differences from Qt
None.
Member Function Documentation
QByteArray::FromBase64Result::operator bool() const
Returns true if the data was decoded.
QByteArray & QByteArray::FromBase64Result::operator*() &
Returns the decoded bytes.
const QByteArray & QByteArray::FromBase64Result::operator*() const &
This is an overloaded function.
void QByteArray::FromBase64Result::swap(FromBase64Result &other)
Swaps this result with other.
Member Variable Documentation
QByteArray QByteArray::FromBase64Result::decoded
The decoded bytes; empty if decoding failed.
QByteArray::Base64DecodingStatus QByteArray::FromBase64Result::decodingStatus
Whether decoding succeeded, and if not, why.