diff options
author | Nikolai Kosjar <nikolai.kosjar@digia.com> | 2013-10-23 10:54:18 +0200 |
---|---|---|
committer | Nikolai Kosjar <nikolai.kosjar@digia.com> | 2013-10-24 11:47:15 +0200 |
commit | 580791ff9f8457d7b40859bc030ed35fedd25c8b (patch) | |
tree | e19b7685e24124693c6597ce1b8039993f8194eb /src | |
parent | 5c28544a167dfcc86eb13072bfedd436843a870b (diff) | |
download | qt-creator-580791ff9f8457d7b40859bc030ed35fedd25c8b.tar.gz |
CppEditor: Do not return double entries in FunctionHelper::overrides()
Change-Id: I568cdb842fd823067514dd4b2e983e6bd19eebca
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/plugins/cppeditor/cppvirtualfunctionassistprovider.cpp | 3 | ||||
-rw-r--r-- | src/plugins/cppeditor/followsymbol_switchmethoddecldef_test.cpp | 3 |
2 files changed, 0 insertions, 6 deletions
diff --git a/src/plugins/cppeditor/cppvirtualfunctionassistprovider.cpp b/src/plugins/cppeditor/cppvirtualfunctionassistprovider.cpp index 5f44589885..a9668bc3fc 100644 --- a/src/plugins/cppeditor/cppvirtualfunctionassistprovider.cpp +++ b/src/plugins/cppeditor/cppvirtualfunctionassistprovider.cpp @@ -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); diff --git a/src/plugins/cppeditor/followsymbol_switchmethoddecldef_test.cpp b/src/plugins/cppeditor/followsymbol_switchmethoddecldef_test.cpp index 19f33336ae..6ad94d11b7 100644 --- a/src/plugins/cppeditor/followsymbol_switchmethoddecldef_test.cpp +++ b/src/plugins/cppeditor/followsymbol_switchmethoddecldef_test.cpp @@ -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"); @@ -1313,7 +1311,6 @@ void CppEditorPlugin::test_FollowSymbolUnderCursor_virtualFunctionCall_possibleO << QLatin1String("...searching overrides"); const QStringList finalResults = QStringList() << QLatin1String("B::f") - << QLatin1String("B::f") << QLatin1String("D::f"); TestCase test(TestCase::FollowSymbolUnderCursorAction, source, immediateResults, finalResults); |