diff --git a/qrenderdoc/Code/QRDUtils.h b/qrenderdoc/Code/QRDUtils.h index 29ac95a05..9ddb98d77 100644 --- a/qrenderdoc/Code/QRDUtils.h +++ b/qrenderdoc/Code/QRDUtils.h @@ -140,11 +140,18 @@ struct ToStr // QString everywhere. template -QString ToQStr(const T &el) +inline QString ToQStr(const T &el) { return QString::fromStdString(ToStr::Get(el)); } +// overload for rdctype::str +template <> +inline QString ToQStr(const rdctype::str &el) +{ + return QString::fromUtf8(el.elems, el.count); +} + // overload for a couple of things that need to know the pipeline type when converting QString ToQStr(const ResourceUsage usage, const GraphicsAPI apitype);