Don't cache mapping between source and private header

When switching from a header to a source file, the source->header
mapping is cached. It's not the case anymore for private headers (_p).

Change-Id: I481c0613e29db0a3fb4e17f339626abb49ffa8e2
Reviewed-by: Leandro Melo <leandro.melo@nokia.com>
This commit is contained in:
Nicolas Arnaud-Cormos
2012-06-21 20:55:17 -07:00
committed by Leandro Melo
parent 96f5bc837f
commit 62a22e0aa3

View File

@@ -294,7 +294,8 @@ QString CppToolsPlugin::correspondingHeaderOrSourceI(const QString &fileName) co
const QFileInfo candidateFi(absoluteDir, candidateFileName); const QFileInfo candidateFi(absoluteDir, candidateFileName);
if (candidateFi.isFile()) { if (candidateFi.isFile()) {
m_headerSourceMapping[fi.absoluteFilePath()] = candidateFi.absoluteFilePath(); m_headerSourceMapping[fi.absoluteFilePath()] = candidateFi.absoluteFilePath();
m_headerSourceMapping[candidateFi.absoluteFilePath()] = fi.absoluteFilePath(); if (type != HeaderFile || !baseName.endsWith(privateHeaderSuffix))
m_headerSourceMapping[candidateFi.absoluteFilePath()] = fi.absoluteFilePath();
return candidateFi.absoluteFilePath(); return candidateFi.absoluteFilePath();
} }
} }