forked from qt-creator/qt-creator
Help: Avoid ambiguity of help ID being interpreted as URL
Users know if they have a URL or not, we should not guess (and then even guess differently at different places) Change-Id: Iaaf69a94baadbee0ff427a2bc9065b714dcf8478 Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -657,12 +657,9 @@ void HelpPluginPrivate::requestContextHelp()
|
||||
|
||||
void HelpPluginPrivate::showContextHelp(const HelpItem &contextHelp)
|
||||
{
|
||||
QMap<QString, QUrl> links = contextHelp.links();
|
||||
// Maybe the id is already an URL
|
||||
if (links.isEmpty() && LocalHelpManager::isValidUrl(contextHelp.helpId()))
|
||||
links.insert(contextHelp.helpId(), contextHelp.helpId());
|
||||
const QMap<QString, QUrl> &links = contextHelp.links();
|
||||
|
||||
QUrl source = findBestLink(links);
|
||||
const QUrl source = findBestLink(links);
|
||||
if (!source.isValid()) {
|
||||
// No link found or no context object
|
||||
HelpViewer *viewer = showHelpUrl(QUrl(Help::Constants::AboutBlank),
|
||||
|
||||
Reference in New Issue
Block a user