diff options
author | Leandro Melo <leandro.melo@nokia.com> | 2012-01-23 16:08:01 +0100 |
---|---|---|
committer | Leandro Melo <leandro.melo@nokia.com> | 2012-01-23 17:17:00 +0100 |
commit | b97b45a341660edb49f1799f2c052c0f3df76368 (patch) | |
tree | 2ae7ba96218442c65e8c24c4bdde5e36be17dbe3 /src/plugins/cpptools/insertionpointlocator.cpp | |
parent | 17425c50f3689148a7b2f89f3b7bdd800de22f0b (diff) |
C++: Fix "reference" file in symbol finder
Througout the initial review the singleton was transformed into an
ordinary class, but a error was introduced: The "reference" file was
incorrectly assumed to be the editors file, which is wrong, since
it should be the declaration file.
Change-Id: Iad3e25a690fa8bd07a18184b24b10f8dea965332
Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
Diffstat (limited to 'src/plugins/cpptools/insertionpointlocator.cpp')
-rw-r--r-- | src/plugins/cpptools/insertionpointlocator.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/plugins/cpptools/insertionpointlocator.cpp b/src/plugins/cpptools/insertionpointlocator.cpp index baecd498c1..64ccb8ed4c 100644 --- a/src/plugins/cpptools/insertionpointlocator.cpp +++ b/src/plugins/cpptools/insertionpointlocator.cpp @@ -517,8 +517,7 @@ static InsertionLocation nextToSurroundingDefinitions(Declaration *declaration, } // find the declaration's definition - CppTools::SymbolFinder symbolFinder(surroundingFunctionDecl->fileName(), - surroundingFunctionDecl->fileNameLength()); + CppTools::SymbolFinder symbolFinder; Symbol *definition = symbolFinder.findMatchingDefinition(surroundingFunctionDecl, changes.snapshot()); if (!definition) @@ -559,7 +558,7 @@ QList<InsertionLocation> InsertionPointLocator::methodDefinition( if (!declaration) return result; - CppTools::SymbolFinder symbolFinder(declaration->fileName(), declaration->fileNameLength()); + CppTools::SymbolFinder symbolFinder; if (Symbol *s = symbolFinder.findMatchingDefinition(declaration, m_refactoringChanges.snapshot(), true)) { |