From 45e094f2f82ec00291615aa055fb08f6efffe838 Mon Sep 17 00:00:00 2001 From: Zack Rusin Date: Wed, 14 Sep 2011 17:36:53 -0400 Subject: [PATCH] Show number of calls per frame. --- gui/apitracecall.cpp | 20 +++++++++++--------- 1 file 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( + "Frame %1" + "   " + " " + "(%2 calls)") + .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( - "" - "Frame %1" + "%1" "" "    (%2MB)") - .arg(number) + .arg(richText) .arg(double(m_binaryDataSize / (1024.*1024.)), 0, 'g', 2); - } else { - richText = - QObject::tr( - "Frame %1") - .arg(number); } if (!m_staticText) @@ -1040,6 +1040,8 @@ void ApiTraceFrame::setCalls(const QVector &calls, m_calls = calls; m_binaryDataSize = binaryDataSize; m_loaded = true; + delete m_staticText; + m_staticText = 0; } bool ApiTraceFrame::loaded() const -- 2.43.0