diff options
author | Eike Ziller <eike.ziller@qt.io> | 2019-01-28 13:00:03 +0100 |
---|---|---|
committer | Eike Ziller <eike.ziller@qt.io> | 2019-02-01 11:28:02 +0000 |
commit | 443931c1daa7e1cc6ddb74f53e04a2e35c6fecb0 (patch) | |
tree | 02e343211287557730d849214f3befee3e386985 /src/plugins/clangcodemodel | |
parent | 1f4b733cc1e079ccb9eaf11d13a65c20a19d882d (diff) |
Help: Move resolution of help from multiple candidate IDs to HelpItem
No need for code duplication.
Change-Id: I3d2c795d072b8de5818e1844b8126e526339c0da
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
Diffstat (limited to 'src/plugins/clangcodemodel')
-rw-r--r-- | src/plugins/clangcodemodel/clanghoverhandler.cpp | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/src/plugins/clangcodemodel/clanghoverhandler.cpp b/src/plugins/clangcodemodel/clanghoverhandler.cpp index 446b436325..da9f974adb 100644 --- a/src/plugins/clangcodemodel/clanghoverhandler.cpp +++ b/src/plugins/clangcodemodel/clanghoverhandler.cpp @@ -258,19 +258,11 @@ void ClangHoverHandler::processToolTipInfo(const CppTools::ToolTipInfo &info) if (!info.briefComment.isEmpty()) text.append("\n\n" + info.briefComment); - for (const QString &qdocIdCandidate : info.qDocIdCandidates) { - qCDebug(hoverLog) << "Querying help manager with" - << qdocIdCandidate - << info.qDocMark - << helpItemCategoryAsString(info.qDocCategory); - const QMap<QString, QUrl> helpLinks = Core::HelpManager::linksForIdentifier(qdocIdCandidate); - if (!helpLinks.isEmpty()) { - qCDebug(hoverLog) << " Match!"; - setLastHelpItemIdentified( - Core::HelpItem(qdocIdCandidate, info.qDocMark, info.qDocCategory, helpLinks)); - break; - } - } + qCDebug(hoverLog) << "Querying help manager with" + << info.qDocIdCandidates + << info.qDocMark + << helpItemCategoryAsString(info.qDocCategory); + setLastHelpItemIdentified({info.qDocIdCandidates, info.qDocMark, info.qDocCategory}); if (!info.sizeInBytes.isEmpty()) text.append("\n\n" + tr("%1 bytes").arg(info.sizeInBytes)); |