Help: Improve handling of results from index lookup

If help is only found by looking up in the index, show a selection
dialog to the user even if there is only one result. Otherwise we create
the impression that we really think that the help we find is the correct
one.

Also do not add the help text to the tool tip in this case.

Test case: struct Foo { static void objectCreated() {} };

Change-Id: I9579302843ea2923e06f56f4b646dd101f183b3f
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
Eike Ziller
2019-03-04 16:17:08 +01:00
parent 90bc1c91da
commit 71c6ad7f9e
3 changed files with 3 additions and 4 deletions

View File

@@ -654,7 +654,7 @@ void HelpPluginPrivate::showContextHelp(const HelpItem &contextHelp)
.arg(contextHelp.helpIds().join(", "))
.arg(HelpPlugin::tr("No documentation available.")));
}
} else if (links.size() == 1) {
} else if (links.size() == 1 && !contextHelp.isFuzzyMatch()) {
showHelpUrl(links.front().second, LocalHelpManager::contextHelpOption());
} else {
QMap<QString, QUrl> map;