diff options
author | Zack Rusin <zack@kde.org> | 2011-09-14 17:36:53 -0400 |
---|---|---|
committer | Zack Rusin <zack@kde.org> | 2011-09-14 17:36:53 -0400 |
commit | 45e094f2f82ec00291615aa055fb08f6efffe838 (patch) | |
tree | 74251f769393cb19e2ea948045aa309f63ab7344 /gui | |
parent | 10fd477dcd2a7a8a7710712f353137986660e370 (diff) |
Show number of calls per frame.
Diffstat (limited to 'gui')
-rw-r--r-- | gui/apitracecall.cpp | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/gui/apitracecall.cpp b/gui/apitracecall.cpp index 43ec636..c917662 100644 --- a/gui/apitracecall.cpp +++ b/gui/apitracecall.cpp @@ -943,23 +943,23 @@ QStaticText ApiTraceFrame::staticText() const if (m_staticText && !m_staticText->text().isEmpty()) return *m_staticText; - QString richText; + QString richText = QObject::tr( + "<span style=\"font-weight:bold\">Frame %1</span>" + " " + "<span style=\"font-style:italic;font-size:small;font-weight:lighter;\"> " + "(%2 calls)</span>") + .arg(number) + .arg(m_loaded ? m_calls.count() : m_callsToLoad); //mark the frame if it uploads more than a meg a frame if (m_binaryDataSize > (1024*1024)) { richText = QObject::tr( - "<span style=\"font-weight:bold;\">" - "Frame %1</span>" + "%1" "<span style=\"font-style:italic;\">" " (%2MB)</span>") - .arg(number) + .arg(richText) .arg(double(m_binaryDataSize / (1024.*1024.)), 0, 'g', 2); - } else { - richText = - QObject::tr( - "<span style=\"font-weight:bold\">Frame %1</span>") - .arg(number); } if (!m_staticText) @@ -1040,6 +1040,8 @@ void ApiTraceFrame::setCalls(const QVector<ApiTraceCall*> &calls, m_calls = calls; m_binaryDataSize = binaryDataSize; m_loaded = true; + delete m_staticText; + m_staticText = 0; } bool ApiTraceFrame::loaded() const |