diff options
| author | Glenn Smith <glenn@vector35.com> | 2024-01-11 17:20:06 -0500 |
|---|---|---|
| committer | Glenn Smith <glenn@vector35.com> | 2024-01-12 14:39:54 -0500 |
| commit | 8650691983556336705759325037086143587037 (patch) | |
| tree | 274bd83851fdc4636aa412db34f3b39099230299 | |
| parent | 2b7ccb218c08d091216fee539938f8df29ff9324 (diff) | |
Add fmt::format for QString
| -rw-r--r-- | ui/util.h | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -44,6 +44,15 @@ namespace fmt } } +template<> struct fmt::formatter<QString> +{ + 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(); } +}; + /*! @} */ |
