diff --git a/qrenderdoc/Code/Interface/PersistantConfig.cpp b/qrenderdoc/Code/Interface/PersistantConfig.cpp index 9c32c5ab3..b7ea762ea 100644 --- a/qrenderdoc/Code/Interface/PersistantConfig.cpp +++ b/qrenderdoc/Code/Interface/PersistantConfig.cpp @@ -30,6 +30,19 @@ #include "Styles/StyleData.h" #include "QRDInterface.h" +template <> +std::string DoStringise(const TimeUnit &el) +{ + BEGIN_ENUM_STRINGISE(TimeUnit) + { + STRINGISE_ENUM_CLASS(Seconds); + STRINGISE_ENUM_CLASS(Milliseconds); + STRINGISE_ENUM_CLASS(Microseconds); + STRINGISE_ENUM_CLASS(Nanoseconds); + } + END_ENUM_STRINGISE(); +} + #define JSON_ID "rdocConfigData" #define JSON_VER 1 diff --git a/qrenderdoc/Code/Interface/PersistantConfig.h b/qrenderdoc/Code/Interface/PersistantConfig.h index ff994c314..5060213f4 100644 --- a/qrenderdoc/Code/Interface/PersistantConfig.h +++ b/qrenderdoc/Code/Interface/PersistantConfig.h @@ -389,6 +389,8 @@ enum class TimeUnit : int Count, }; +DECLARE_REFLECTION_ENUM(TimeUnit); + DOCUMENT(R"(Gets the suffix for a time unit. :return: The one or two character suffix. diff --git a/qrenderdoc/Windows/EventBrowser.cpp b/qrenderdoc/Windows/EventBrowser.cpp index ec62c0722..0a2908130 100644 --- a/qrenderdoc/Windows/EventBrowser.cpp +++ b/qrenderdoc/Windows/EventBrowser.cpp @@ -690,7 +690,7 @@ void EventBrowser::on_exportDraws_clicked() if(!m_Times.empty()) { - line += QFormatStr(" | %1").arg(ui->events->headerText(COL_DURATION)); + line += QFormatStr(" | %1 (%2)").arg(tr("Duration")).arg(ToQStr(m_TimeUnit)); } stream << line << "\n";