[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [kcachegrind] libviews: One line for function name in call maps
From:       Josef Weidendorfer <Josef.Weidendorfer () gmx ! de>
Date:       2016-07-06 16:56:59
Message-ID: E1bKq8B-0000pX-EB () code ! kde ! org
[Download RAW message or body]

Git commit e4282d38db3a7b34dba4e449e38dda9c5ae64d8b by Josef Weidendorfer.
Committed on 06/07/2016 at 15:44.
Pushed by weidendo into branch 'master'.

One line for function name in call maps

M  +17   -0    libviews/callmapview.cpp
M  +3    -0    libviews/callmapview.h

http://commits.kde.org/kcachegrind/e4282d38db3a7b34dba4e449e38dda9c5ae64d8b

diff --git a/libviews/callmapview.cpp b/libviews/callmapview.cpp
index 8a0eee6..5bf2461 100644
--- a/libviews/callmapview.cpp
+++ b/libviews/callmapview.cpp
@@ -628,6 +628,12 @@ QString CallMapBaseItem::text(int textNo) const
   return _f->inclusive()->prettySubCost(ct);
 }
 
+int CallMapBaseItem::maxLines(int i) const
+{
+    if (i == 0) return 1; // one line for function name
+    return 0; // no limit
+}
+
 QPixmap CallMapBaseItem::pixmap(int i) const
 {
     if ((i != 1) || !_f) return QPixmap();
@@ -760,6 +766,12 @@ QString CallMapCallingItem::text(int textNo) const
   return val.pretty();
 }
 
+int CallMapCallingItem::maxLines(int i) const
+{
+    if (i == 0) return 1; // one line for function name
+    return 0; // no limit
+}
+
 QPixmap CallMapCallingItem::pixmap(int i) const
 {
     if (i != 1) return QPixmap();
@@ -874,6 +886,11 @@ QString CallMapCallerItem::text(int textNo) const
   return val.pretty();
 }
 
+int CallMapCallerItem::maxLines(int i) const
+{
+    if (i == 0) return 1; // one line for function name
+    return 0; // no limit
+}
 
 QPixmap CallMapCallerItem::pixmap(int i) const
 {
diff --git a/libviews/callmapview.h b/libviews/callmapview.h
index a5191b8..6a9460e 100644
--- a/libviews/callmapview.h
+++ b/libviews/callmapview.h
@@ -96,6 +96,7 @@ public:
   double value() const ;
   bool isMarked(int) const;
   QString text(int) const;
+  int maxLines(int) const;
   QPixmap pixmap(int) const;
   TreeMapItemList* children();
   QColor backColor() const;
@@ -117,6 +118,7 @@ public:
   double sum() const;
   bool isMarked(int) const;
   QString text(int) const;
+  int maxLines(int) const;
   QPixmap pixmap(int) const;
   TreeMapItemList* children();
   QColor backColor() const;
@@ -136,6 +138,7 @@ public:
   double value() const;
   bool isMarked(int) const;
   QString text(int) const;
+  int maxLines(int) const;
   QPixmap pixmap(int) const;
   TreeMapItemList* children();
   QColor backColor() const;

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic