summaryrefslogtreecommitdiff
path: root/src/plugins/cpptools/cpptoolsplugin.cpp
diff options
context:
space:
mode:
authorNicolas Arnaud-Cormos <nicolas@kdab.com>2012-06-21 20:55:17 -0700
committerLeandro Melo <leandro.melo@nokia.com>2012-06-28 17:14:50 +0200
commit62a22e0aa376589746f29e25078ef38809010c4c (patch)
tree533f4921c5becf836b8fb036924e2fbae822f562 /src/plugins/cpptools/cpptoolsplugin.cpp
parent96f5bc837f3449ee3b901638ca47bff9529c9b1c (diff)
downloadqt-creator-62a22e0aa376589746f29e25078ef38809010c4c.tar.gz
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>
Diffstat (limited to 'src/plugins/cpptools/cpptoolsplugin.cpp')
-rw-r--r--src/plugins/cpptools/cpptoolsplugin.cpp3
1 files changed, 2 insertions, 1 deletions
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();
}
}