From: Milian Wolff Date: Sat, 9 Apr 2016 11:16:23 +0000 (+0200) Subject: Use monospace font for function labels in description. X-Git-Tag: submit/tizen/20180620.112952^2~185 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d0781b5fefdd2dc4a33f9428164bb03216a16960;p=sdk%2Ftools%2Fheaptrack.git Use monospace font for function labels in description. Note: uses the wrong font, afaik that got fixed for 5.6.1 or 5.7. --- diff --git a/gui/flamegraph.cpp b/gui/flamegraph.cpp index d010514..e5c940f 100644 --- a/gui/flamegraph.cpp +++ b/gui/flamegraph.cpp @@ -161,26 +161,27 @@ QString FrameGraphicsItem::description() const totalCost = item->cost(); } const auto fraction = QString::number(double(m_cost) * 100. / totalCost, 'g', 3); + const auto function = QString(QLatin1String("") + m_function.toHtmlEscaped() + QLatin1String("")); switch (m_costType) { case Allocations: tooltip = i18nc("%1: number of allocations, %2: relative number, %3: function label", - "%1 (%2%) allocations in %3 and below.", m_cost, fraction, m_function); + "%1 (%2%) allocations in %3 and below.", m_cost, fraction, function); break; case Temporary: tooltip = i18nc("%1: number of temporary allocations, %2: relative number, %3 function label", - "%1 (%2%) temporary allocations in %3 and below.", m_cost, fraction, m_function); + "%1 (%2%) temporary allocations in %3 and below.", m_cost, fraction, function); break; case Peak: tooltip = i18nc("%1: peak consumption in bytes, %2: relative number, %3: function label", - "%1 (%2%) peak consumption in %3 and below.", format.formatByteSize(m_cost), fraction, m_function); + "%1 (%2%) peak consumption in %3 and below.", format.formatByteSize(m_cost), fraction, function); break; case Leaked: tooltip = i18nc("%1: leaked bytes, %2: relative number, %3: function label", - "%1 (%2%) leaked in %3 and below.", format.formatByteSize(m_cost), fraction, m_function); + "%1 (%2%) leaked in %3 and below.", format.formatByteSize(m_cost), fraction, function); break; case Allocated: tooltip = i18nc("%1: allocated bytes, %2: relative number, %3: function label", - "%1 (%2%) allocated in %3 and below.", format.formatByteSize(m_cost), fraction, m_function); + "%1 (%2%) allocated in %3 and below.", format.formatByteSize(m_cost), fraction, function); break; }