C++: check for header file without corresponding source file in quickfix.

Reviewed-by: Christian Kamm
This commit is contained in:
Erik Verbruggen
2010-10-07 15:22:32 +02:00
parent e57297f6ee
commit 4cebb668bf

View File

@@ -328,7 +328,9 @@ QList<InsertionLocation> InsertionPointLocator::methodDefinition(
QString target = declFileName;
if (!isSourceFile(declFileName)) {
Internal::CppToolsPlugin *cpptools = Internal::CppToolsPlugin::instance();
target = cpptools->correspondingHeaderOrSource(declFileName);
QString candidate = cpptools->correspondingHeaderOrSource(declFileName);
if (!candidate.isEmpty())
target = candidate;
}
Document::Ptr doc = m_refactoringChanges->file(target).cppDocument();