diff options
author | Roberto Raggi <roberto.raggi@nokia.com> | 2010-07-21 12:47:14 +0200 |
---|---|---|
committer | Roberto Raggi <roberto.raggi@nokia.com> | 2010-07-21 12:50:24 +0200 |
commit | b94821b6a9dc81ae4dc24356c33a14f23b669e31 (patch) | |
tree | 5bad10f7ee9df262c1c8dbb312297ba028d3fccd /src/libs/cplusplus/TypePrettyPrinter.cpp | |
parent | c969b6e1cc66e0a4174ee607f4f99f36134b4038 (diff) |
Get rid of the deprecated method Overview::setShowFullQualifiedNames().
Diffstat (limited to 'src/libs/cplusplus/TypePrettyPrinter.cpp')
-rw-r--r-- | src/libs/cplusplus/TypePrettyPrinter.cpp | 39 |
1 files changed, 2 insertions, 37 deletions
diff --git a/src/libs/cplusplus/TypePrettyPrinter.cpp b/src/libs/cplusplus/TypePrettyPrinter.cpp index e1277f2726..61e18f5e7e 100644 --- a/src/libs/cplusplus/TypePrettyPrinter.cpp +++ b/src/libs/cplusplus/TypePrettyPrinter.cpp @@ -41,35 +41,6 @@ using namespace CPlusPlus; -static QString fullyQualifiedName(Symbol *symbol, const Overview *overview) -{ - QStringList nestedNameSpecifier; - - for (Scope *scope = symbol->scope(); scope && scope->enclosingScope(); - scope = scope->enclosingScope()) - { - Symbol *owner = scope->owner(); - - if (! owner) { - qWarning() << "invalid scope."; // ### better message. - continue; - } - - if (! owner->name()) - nestedNameSpecifier.prepend(QLatin1String("$anonymous")); - - else { - const QString name = overview->prettyName(owner->name()); - - nestedNameSpecifier.prepend(name); - } - } - - nestedNameSpecifier.append(overview->prettyName(symbol->name())); - - return nestedNameSpecifier.join(QLatin1String("::")); -} - TypePrettyPrinter::TypePrettyPrinter(const Overview *overview) : _overview(overview) , _needsParens(false) @@ -171,20 +142,14 @@ void TypePrettyPrinter::visit(Namespace *type) void TypePrettyPrinter::visit(Class *classTy) { - if (overview()->showFullyQualifiedNames()) - _text.prepend(fullyQualifiedName(classTy, overview())); - else - _text.prepend(overview()->prettyName(classTy->name())); + _text.prepend(overview()->prettyName(classTy->name())); prependCv(_fullySpecifiedType); } void TypePrettyPrinter::visit(Enum *type) { - if (overview()->showFullyQualifiedNames()) - _text.prepend(fullyQualifiedName(type, overview())); - else - _text.prepend(overview()->prettyName(type->name())); + _text.prepend(overview()->prettyName(type->name())); prependCv(_fullySpecifiedType); } |