forked from qt-creator/qt-creator
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>
This commit is contained in:
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user