From 8650691983556336705759325037086143587037 Mon Sep 17 00:00:00 2001 From: Glenn Smith Date: Thu, 11 Jan 2024 17:20:06 -0500 Subject: Add fmt::format for QString --- ui/util.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/ui/util.h b/ui/util.h index e6b6fdb2..a49fc007 100644 --- a/ui/util.h +++ b/ui/util.h @@ -44,6 +44,15 @@ namespace fmt } } +template<> struct fmt::formatter +{ + format_context::iterator format(const QString& obj, format_context& ctx) const + { + return fmt::format_to(ctx.out(), "{}", obj.toStdString()); + } + constexpr auto parse(format_parse_context& ctx) -> format_parse_context::iterator { return ctx.begin(); } +}; + /*! @} */ -- cgit v1.3.1