31 #include <spdlog/spdlog.h>
36 struct fmt::formatter<QString> {
38 constexpr
auto parse(format_parse_context& ctx) -> decltype(ctx.begin()) {
43 template <
typename FormatContext>
44 auto format(
const QString& qstr, FormatContext& ctx)
const
45 -> decltype(ctx.out()) {
48 QByteArray utf8_array = qstr.toUtf8();
49 return fmt::format_to(ctx.out(),
"{}", utf8_array.constData());
54 struct fmt::formatter<QByteArray> {
56 constexpr
auto parse(format_parse_context& ctx) -> decltype(ctx.begin()) {
61 template <
typename FormatContext>
62 auto format(
const QByteArray& qarray, FormatContext& ctx)
const
63 -> decltype(ctx.out()) {
66 return fmt::format_to(ctx.out(),
"{}", qarray.constData());