Index shouldn't be bold, plus don't newline after index in tooltips
authorZack Rusin <zack@kde.org>
Sun, 3 Apr 2011 21:22:11 +0000 (17:22 -0400)
committerZack Rusin <zack@kde.org>
Sun, 3 Apr 2011 21:22:11 +0000 (17:22 -0400)
gui/apitracecall.cpp
gui/apitracemodel.cpp

index 26d3102..4817eb3 100644 (file)
@@ -279,7 +279,9 @@ QString ApiTraceCall::toHtml() const
     if (!m_richText.isEmpty())
         return m_richText;
 
-    m_richText = QString::fromLatin1("<span style=\"font-weight:bold\">%1</span>(").arg(name);
+    m_richText = QString::fromLatin1("%1) <span style=\"font-weight:bold\">%2</span>(")
+                 .arg(index)
+                 .arg(name);
     for (int i = 0; i < argNames.count(); ++i) {
         m_richText += argNames[i];
         m_richText += QString::fromLatin1(" = ");
index acc4452..63e54cf 100644 (file)
@@ -43,9 +43,12 @@ QVariant ApiTraceModel::data(const QModelIndex &index, int role) const
         if (itm->type() == ApiTraceEvent::Call) {
             ApiTraceCall *call = static_cast<ApiTraceCall*>(itm);
             if (call->state().isEmpty())
-                return QString::fromLatin1("<b>%1</b>").arg(call->name);
+                return QString::fromLatin1("%1)&nbsp;<b>%2</b>")
+                    .arg(call->index)
+                    .arg(call->name);
             else
-                return QString::fromLatin1("<b>%1</b><br/>%2")
+                return QString::fromLatin1("%1)&nbsp;<b>%2</b><br/>%3")
+                    .arg(call->index)
                     .arg(call->name)
                     .arg(stateText);
         } else {