From 1a560ffc0bc0082ef0c9814d17db6e090fc865be Mon Sep 17 00:00:00 2001
From: Sebastião Guerra <sebastiao.luiz.guerra@gmail.com>
Date: Fri, 14 Aug 2026 07:38:22 -0300
Subject: tdecachegrind: fix incorrect c-format detection in call graph labels
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Signed-off-by: Sebastião Guerra <sebastiao.luiz.guerra@gmail.com>
---
 tdecachegrind/tdecachegrind/callgraphview.cpp | 37 +++++++++++++++++----------
 1 file changed, 24 insertions(+), 13 deletions(-)

diff --git a/tdecachegrind/tdecachegrind/callgraphview.cpp b/tdecachegrind/tdecachegrind/callgraphview.cpp
index 2b785c9a..f61c09f7 100644
--- a/tdecachegrind/tdecachegrind/callgraphview.cpp
+++ b/tdecachegrind/tdecachegrind/callgraphview.cpp
@@ -1061,7 +1061,7 @@ CanvasNode::CanvasNode(CallGraphView* v, GraphNode* n,
     double total = totalCost->subCost(_view->costType());
     double inclP  = 100.0 * n->incl / total;
     if (_view->topLevel()->showPercentage())
-	setText(1, TQString("%1 %")
+	setText(1, TQString("%1%")
 		.arg(inclP, 0, 'f', Configuration::percentPrecision()));
     else
 	setText(1, SubCost(n->incl).pretty());
@@ -1141,7 +1141,7 @@ CanvasEdgeLabel::CanvasEdgeLabel(CallGraphView* v, CanvasEdge* ce,
     double total = totalCost->subCost(_view->costType());
     double inclP  = 100.0 * e->cost / total;
     if (_view->topLevel()->showPercentage())
-        setText(0, TQString("%1 %")
+        setText(0, TQString("%1%")
 		.arg(inclP, 0, 'f', Configuration::percentPrecision()));
     else
         setText(0, SubCost(e->cost).pretty());
@@ -2490,14 +2490,22 @@ void CallGraphView::contentsContextMenuEvent(TQContextMenuEvent* e)
   gpopup3.setItemEnabled(120,
                          (_maxCallerDepth>=0) && (_maxCallingDepth>=0));
   gpopup3.insertSeparator();
-  gpopup3.insertItem(i18n("50 %"), 121);
-  gpopup3.insertItem(i18n("20 %"), 122);
-  gpopup3.insertItem(i18n("10 %"), 123);
-  gpopup3.insertItem(i18n("5 %"), 124);
-  gpopup3.insertItem(i18n("3 %"), 125);
-  gpopup3.insertItem(i18n("2 %"), 126);
-  gpopup3.insertItem(i18n("1.5 %"), 127);
-  gpopup3.insertItem(i18n("1 %"), 128);
+  // xgettext:no-c-format
+  gpopup3.insertItem(i18n("50%"), 121);
+  // xgettext:no-c-format
+  gpopup3.insertItem(i18n("20%"), 122);
+  // xgettext:no-c-format
+  gpopup3.insertItem(i18n("10%"), 123);
+  // xgettext:no-c-format
+  gpopup3.insertItem(i18n("5%"), 124);
+  // xgettext:no-c-format
+  gpopup3.insertItem(i18n("3%"), 125);
+  // xgettext:no-c-format
+  gpopup3.insertItem(i18n("2%"), 126);
+  // xgettext:no-c-format
+  gpopup3.insertItem(i18n("1.5%"), 127);
+  // xgettext:no-c-format
+  gpopup3.insertItem(i18n("1%"), 128);
   if (_funcLimit<0) _funcLimit = DEFAULT_FUNCLIMIT;
   if (_funcLimit>.5) _funcLimit = .5;
   if (_funcLimit == 0.0) gpopup3.setItemChecked(120,true);
@@ -2514,9 +2522,12 @@ void CallGraphView::contentsContextMenuEvent(TQContextMenuEvent* e)
   TQPopupMenu gpopup4;
   gpopup4.setCheckable(true);
   gpopup4.insertItem(i18n("Same as Node"), 160);
-  gpopup4.insertItem(i18n("50 % of Node"), 161);
-  gpopup4.insertItem(i18n("20 % of Node"), 162);
-  gpopup4.insertItem(i18n("10 % of Node"), 163);
+  // xgettext:no-c-format
+  gpopup4.insertItem(i18n("50% of Node"), 161);
+  // xgettext:no-c-format
+  gpopup4.insertItem(i18n("20% of Node"), 162);
+  // xgettext:no-c-format
+  gpopup4.insertItem(i18n("10% of Node"), 163);
   if (_callLimit<0) _callLimit = DEFAULT_CALLLIMIT;
   if (_callLimit >= _funcLimit) _callLimit = _funcLimit;
   if (_callLimit == _funcLimit) gpopup4.setItemChecked(160,true);
-- 
cgit v1.2.3

