FromBase64Result Class
class QByteArray::FromBase64ResultDie Klasse QByteArray::FromBase64Result enthält das Ergebnis eines Aufrufs von QByteArray::fromBase64Encoding. Mehr...
Öffentliche Funktionen
bool | operator bool() const |
const QByteArray & | operator*() const |
Öffentliche Variablen
QByteArray | decoded |
QByteArray::Base64DecodingStatus | decodingStatus |
Verwandte Nicht-Mitglieder
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) |
Detaillierte Beschreibung
Objekte dieser Klasse können verwendet werden, um zu prüfen, ob die Konvertierung erfolgreich war, und wenn ja, die dekodierte QByteArray abzurufen. Die für QByteArray::FromBase64Result definierten Konvertierungsoperatoren machen die Verwendung dieser Klasse sehr einfach:
void process(const QByteArray &); if (auto result = QByteArray::fromBase64Encoding(encodedData)) process(*result);
Alternativ ist es möglich, direkt auf den Konvertierungsstatus und die dekodierten Daten zuzugreifen:
auto result = QByteArray::fromBase64Encoding(encodedData); if (result.decodingStatus == QByteArray::Base64DecodingStatus::Ok) process(result.decoded);
Siehe auch QByteArray::fromBase64.
Dokumentation der Mitgliedsfunktionen
[explicit noexcept]
bool FromBase64Result::operator bool() const
Gibt zurück, ob die Dekodierung erfolgreich war. Dies entspricht der Prüfung, ob das Mitglied decodingStatus
gleich QByteArray::Base64DecodingStatus::Ok ist.
[noexcept]
const QByteArray &FromBase64Result::operator*() const
Gibt das dekodierte Byte-Array zurück.
Dokumentation der Mitgliedsvariablen
QByteArray FromBase64Result::decoded
Enthält das dekodierte Byte-Array.
QByteArray::Base64DecodingStatus FromBase64Result::decodingStatus
Enthält, ob die Dekodierung erfolgreich war, ausgedrückt als Wert vom Typ QByteArray::Base64DecodingStatus.
Verwandte Nicht-Mitglieder
[noexcept]
size_t qHash(const QByteArray::FromBase64Result &key, size_t seed = 0)
Gibt den Hash-Wert für key zurück, wobei seed als Startwert für die Berechnung verwendet wird.
[noexcept]
bool operator!=(const QByteArray::FromBase64Result &lhs, const QByteArray::FromBase64Result &rhs)
Gibt true
zurück, wenn lhs und rhs unterschiedlich sind, andernfalls false
.
[noexcept]
bool operator==(const QByteArray::FromBase64Result &lhs, const QByteArray::FromBase64Result &rhs)
Gibt true
zurück, wenn lhs und rhs gleich sind, andernfalls gibt es false
zurück.
lhs und rhs sind nur dann gleich, wenn sie denselben Dekodierungsstatus enthalten, und, wenn der Status QByteArray::Base64DecodingStatus::Ok ist, nur dann, wenn sie dieselben dekodierten Daten enthalten.
© 2025 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.