forked from qt-creator/qt-creator
C++: check for header file without corresponding source file in quickfix.
Reviewed-by: Christian Kamm
This commit is contained in:
@@ -328,7 +328,9 @@ QList<InsertionLocation> InsertionPointLocator::methodDefinition(
|
|||||||
QString target = declFileName;
|
QString target = declFileName;
|
||||||
if (!isSourceFile(declFileName)) {
|
if (!isSourceFile(declFileName)) {
|
||||||
Internal::CppToolsPlugin *cpptools = Internal::CppToolsPlugin::instance();
|
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();
|
Document::Ptr doc = m_refactoringChanges->file(target).cppDocument();
|
||||||
|
|||||||
Reference in New Issue
Block a user