From: Zack Rusin Date: Thu, 17 Nov 2011 04:52:15 +0000 (-0500) Subject: Make the details view a bit clearer. X-Git-Url: https://git.cworth.org/git?a=commitdiff_plain;h=5a74d3c2ca0386eb7b24141bbd94097d3942892e;p=apitrace Make the details view a bit clearer. most importantly show the frame number --- diff --git a/gui/apitracecall.cpp b/gui/apitracecall.cpp index 26f20ba..356ef9c 100644 --- a/gui/apitracecall.cpp +++ b/gui/apitracecall.cpp @@ -16,7 +16,7 @@ const char * const styleSheet = " font-weight:bold;\n" // text shadow looks great but doesn't work well in qtwebkit 4.7 " /*text-shadow: 0px 2px 3px #555;*/\n" - " font-size: 1.2em;\n" + " font-size: 1.1em;\n" "}\n" ".arg-name {\n" " border: 1px solid rgb(238,206,0);\n" @@ -845,18 +845,28 @@ QString ApiTraceCall::toHtml() const if (!m_richText.isEmpty()) return m_richText; - m_richText = QLatin1String("
"); + m_richText += QLatin1String("
"); + + m_richText += + QString::fromLatin1("%1) ") + .arg(m_index); + QString parentTip; + if (m_parentFrame) { + parentTip = + QString::fromLatin1("Frame %1") + .arg(m_parentFrame->number); + } QUrl helpUrl = m_signature->helpUrl(); if (helpUrl.isEmpty()) { m_richText += QString::fromLatin1( - "%1) %2(") - .arg(m_index) + "%2(") + .arg(parentTip) .arg(m_signature->name()); } else { m_richText += QString::fromLatin1( - "%1) %3(") - .arg(m_index) + "%3(") + .arg(parentTip) .arg(helpUrl.toString()) .arg(m_signature->name()); } diff --git a/gui/mainwindow.cpp b/gui/mainwindow.cpp index f1678a8..13ff529 100644 --- a/gui/mainwindow.cpp +++ b/gui/mainwindow.cpp @@ -97,6 +97,10 @@ void MainWindow::callItemSelected(const QModelIndex &index) if (event && event->type() == ApiTraceEvent::Call) { ApiTraceCall *call = static_cast(event); + m_ui.detailsDock->setWindowTitle( + tr("Details View. Frame %1, Call %2") + .arg(call->parentFrame() ? call->parentFrame()->number : 0) + .arg(call->index())); m_ui.detailsWebView->setHtml(call->toHtml()); m_ui.detailsDock->show(); if (call->hasBinaryData()) {