From 932845fc368cfd0556d463d7dd210b8f18f4ff96 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Thorbj=C3=B8rn=20Lindeijer?= <thorbjorn.lindeijer@nokia.com>
Date: Fri, 6 Feb 2009 14:47:30 +0100
Subject: [PATCH] Don't use the name twice, though

We shouldn't append the name in cases where the text was not empty but
_name was.

Reviewed-by: Roberto
---
 src/libs/cplusplus/TypePrettyPrinter.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/libs/cplusplus/TypePrettyPrinter.cpp b/src/libs/cplusplus/TypePrettyPrinter.cpp
index 31bf658ad36..6fd6a2cf245 100644
--- a/src/libs/cplusplus/TypePrettyPrinter.cpp
+++ b/src/libs/cplusplus/TypePrettyPrinter.cpp
@@ -92,8 +92,8 @@ QString TypePrettyPrinter::operator()(const FullySpecifiedType &type, const QStr
         if (ch.isLetterOrNumber() || ch == QLatin1Char('_'))
             text += QLatin1Char(' ');
         text += _name;
-    } else {
-        text += name;
+    } else if (text.isEmpty()) {
+        text = name;
     }
     (void) switchName(previousName);
     return text;
-- 
GitLab