From 62a22e0aa376589746f29e25078ef38809010c4c Mon Sep 17 00:00:00 2001 From: Nicolas Arnaud-Cormos Date: Thu, 21 Jun 2012 20:55:17 -0700 Subject: 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 --- src/plugins/cpptools/cpptoolsplugin.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/plugins/cpptools/cpptoolsplugin.cpp') diff --git a/src/plugins/cpptools/cpptoolsplugin.cpp b/src/plugins/cpptools/cpptoolsplugin.cpp index 377264c52f..9a0e04bfc0 100644 --- a/src/plugins/cpptools/cpptoolsplugin.cpp +++ b/src/plugins/cpptools/cpptoolsplugin.cpp @@ -294,7 +294,8 @@ QString CppToolsPlugin::correspondingHeaderOrSourceI(const QString &fileName) co const QFileInfo candidateFi(absoluteDir, candidateFileName); if (candidateFi.isFile()) { 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(); } } -- cgit v1.2.1