chore: change qt version

This commit is contained in:
arm64v8a
2022-11-26 16:41:31 +09:00
parent 09d37fa898
commit b2ebd0e432
20 changed files with 408 additions and 177 deletions

47
3rdparty/base64.h vendored Normal file
View File

@@ -0,0 +1,47 @@
#include <QByteArray>
namespace Qt515Base64 {
enum Base64Option {
Base64Encoding = 0,
Base64UrlEncoding = 1,
KeepTrailingEquals = 0,
OmitTrailingEquals = 2,
IgnoreBase64DecodingErrors = 0,
AbortOnBase64DecodingErrors = 4,
};
Q_DECLARE_FLAGS(Base64Options, Base64Option)
Q_DECLARE_OPERATORS_FOR_FLAGS(Base64Options)
enum class Base64DecodingStatus {
Ok,
IllegalInputLength,
IllegalCharacter,
IllegalPadding,
};
class FromBase64Result {
public:
QByteArray decoded;
Base64DecodingStatus decodingStatus;
void swap(FromBase64Result &other) noexcept {
qSwap(decoded, other.decoded);
qSwap(decodingStatus, other.decodingStatus);
}
explicit operator bool() const noexcept { return decodingStatus == Base64DecodingStatus::Ok; }
#if defined(Q_COMPILER_REF_QUALIFIERS) && !defined(Q_QDOC)
QByteArray &operator*() &noexcept { return decoded; }
const QByteArray &operator*() const &noexcept { return decoded; }
QByteArray &&operator*() &&noexcept { return std::move(decoded); }
#else
QByteArray &operator*() noexcept { return decoded; }
const QByteArray &operator*() const noexcept { return decoded; }
#endif
};
FromBase64Result QByteArray_fromBase64Encoding(const QByteArray &base64, Base64Options options);
} // namespace Qt515Base64