Commit 580791ff authored by Nikolai Kosjar's avatar Nikolai Kosjar

CppEditor: Do not return double entries in FunctionHelper::overrides()

Change-Id: I568cdb842fd823067514dd4b2e983e6bd19eebca
Reviewed-by: default avatarErik Verbruggen <erik.verbruggen@digia.com>
parent 5c28544a
......@@ -263,9 +263,6 @@ QList<Symbol *> FunctionHelper::overrides(Class *startClass, Function *function,
const Name *referenceName = function->name();
QTC_ASSERT(referenceName && referenceType.isValid(), return result);
// Add itself
result << function;
// Find overrides
CppEditor::Internal::CppClass cppClass = CppClass(startClass);
cppClass.lookupDerived(startClass, snapshot);
......
......@@ -1243,7 +1243,6 @@ void CppEditorPlugin::test_FollowSymbolUnderCursor_virtualFunctionCall_allOverri
<< QLatin1String("...searching overrides");
const QStringList finalResults = QStringList()
<< QLatin1String("A::virt")
<< QLatin1String("A::virt") // TODO: Double entry
<< QLatin1String("B::virt")
<< QLatin1String("C::virt")
<< QLatin1String("CD1::virt")
......@@ -1283,7 +1282,6 @@ void CppEditorPlugin::test_FollowSymbolUnderCursor_virtualFunctionCall_possibleO
<< QLatin1String("...searching overrides");
const QStringList finalResults = QStringList()
<< QLatin1String("B::virt")
<< QLatin1String("B::virt") // Double entry
<< QLatin1String("C::virt")
<< QLatin1String("CD1::virt")
<< QLatin1String("CD2::virt");
......@@ -1312,7 +1310,6 @@ void CppEditorPlugin::test_FollowSymbolUnderCursor_virtualFunctionCall_possibleO
<< QLatin1String("B::f")
<< QLatin1String("...searching overrides");
const QStringList finalResults = QStringList()
<< QLatin1String("B::f")
<< QLatin1String("B::f")
<< QLatin1String("D::f");
......
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