diff options
author | Nicolas Arnaud-Cormos <nicolas@kdab.com> | 2012-06-21 20:55:17 -0700 |
---|---|---|
committer | Leandro Melo <leandro.melo@nokia.com> | 2012-06-28 17:14:50 +0200 |
commit | 62a22e0aa376589746f29e25078ef38809010c4c (patch) | |
tree | 533f4921c5becf836b8fb036924e2fbae822f562 /src/plugins/cpptools/cpptoolsplugin.cpp | |
parent | 96f5bc837f3449ee3b901638ca47bff9529c9b1c (diff) | |
download | qt-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.cpp | 3 |
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(); } } |