summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThorbjørn Lindeijer <thorbjorn.lindeijer@nokia.com>2009-02-06 14:47:30 +0100
committerThorbjørn Lindeijer <thorbjorn.lindeijer@nokia.com>2009-02-06 14:50:58 +0100
commit932845fc368cfd0556d463d7dd210b8f18f4ff96 (patch)
treef62e65fe6c2c32ed87e4f607afce5cf4ceac99f0
parent233502a79542006fe1800bc0865c0a2fdc52af86 (diff)
downloadqt-creator-932845fc368cfd0556d463d7dd210b8f18f4ff96.tar.gz
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
-rw-r--r--src/libs/cplusplus/TypePrettyPrinter.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libs/cplusplus/TypePrettyPrinter.cpp b/src/libs/cplusplus/TypePrettyPrinter.cpp
index 31bf658ad3..6fd6a2cf24 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;