From: Zack Rusin Date: Wed, 14 Sep 2011 21:36:53 +0000 (-0400) Subject: Show number of calls per frame. X-Git-Url: https://git.cworth.org/git?a=commitdiff_plain;h=45e094f2f82ec00291615aa055fb08f6efffe838;p=apitrace Show number of calls per frame. --- 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