Commit b94821b6 authored by Roberto Raggi's avatar Roberto Raggi
Browse files

Get rid of the deprecated method Overview::setShowFullQualifiedNames().

parent c969b6e1
......@@ -44,7 +44,6 @@ Overview::Overview()
_showArgumentNames(false),
_showReturnTypes(false),
_showFunctionSignatures(true),
_showFullyQualifiedNames(false),
_showDefaultArguments(true)
{ }
......@@ -111,16 +110,6 @@ void Overview::setShowFunctionSignatures(bool showFunctionSignatures)
_showFunctionSignatures = showFunctionSignatures;
}
bool Overview::showFullyQualifiedNames() const
{
return _showFullyQualifiedNames;
}
void Overview::setShowFullyQualifiedNamed(bool showFullyQualifiedNames)
{
_showFullyQualifiedNames = showFullyQualifiedNames;
}
bool Overview::showDefaultArguments() const
{
return _showDefaultArguments;
......
......@@ -53,9 +53,6 @@ public:
bool showFunctionSignatures() const;
void setShowFunctionSignatures(bool showFunctionSignatures);
bool showFullyQualifiedNames() const;
void setShowFullyQualifiedNamed(bool showFullyQualifiedNames);
bool showDefaultArguments() const;
void setShowDefaultArguments(bool showDefaultArguments);
......@@ -94,7 +91,6 @@ private:
bool _showArgumentNames: 1;
bool _showReturnTypes: 1;
bool _showFunctionSignatures: 1;
bool _showFullyQualifiedNames: 1;
bool _showDefaultArguments: 1;
};
......
......@@ -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);
}
......
......@@ -304,7 +304,6 @@ void CppHoverHandler::handleLookupItemMatch(const LookupItem &lookupItem,
Overview overview;
overview.setShowArgumentNames(true);
overview.setShowReturnTypes(true);
overview.setShowFullyQualifiedNamed(true);
if (!matchingDeclaration && assignTooltip) {
m_toolTip = overview.prettyType(matchingType, QString());
......@@ -356,7 +355,6 @@ void CppHoverHandler::handleLookupItemMatch(const LookupItem &lookupItem,
overview.setShowArgumentNames(false);
overview.setShowReturnTypes(false);
overview.setShowFunctionSignatures(false);
overview.setShowFullyQualifiedNamed(false);
const QString &simpleName = overview.prettyName(matchingDeclaration->name());
overview.setShowFunctionSignatures(true);
const QString &specifierId = overview.prettyType(matchingType, simpleName);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment