Merge remote-tracking branch 'origin/5.0' into 6.0

Change-Id: I35236948503b2a15a56766018d3ba1c4d2530c83
This commit is contained in:
Eike Ziller
2021-11-01 09:29:51 +01:00
2 changed files with 8 additions and 2 deletions

View File

@@ -298,7 +298,8 @@ static const HelpItem::Links getBestLink(const HelpItem::Links &links)
// documentation, that we only return the Qt5 link even though the Qt5 and Qt4 URLs look // documentation, that we only return the Qt5 link even though the Qt5 and Qt4 URLs look
// different. // different.
QVersionNumber highestVersion; QVersionNumber highestVersion;
HelpItem::Link bestLink; // Default to first link if version extraction failed, possibly because it is not a Qt doc link
HelpItem::Link bestLink = links.front();
for (const HelpItem::Link &link : links) { for (const HelpItem::Link &link : links) {
const QVersionNumber version = extractVersion(link.second).second; const QVersionNumber version = extractVersion(link.second).second;
if (version > highestVersion) { if (version > highestVersion) {

View File

@@ -316,7 +316,12 @@ QList<ModelNode> filteredList(const NodeListProperty &property, bool filter, boo
if (filter) { if (filter) {
list.append(Utils::filtered(property.toModelNodeList(), [] (const ModelNode &arg) { list.append(Utils::filtered(property.toModelNodeList(), [] (const ModelNode &arg) {
return QmlItemNode::isValidQmlItemNode(arg) || NodeHints::fromModelNode(arg).visibleInNavigator(); const char auxProp[] = "showInNavigator@Internal";
if (arg.hasAuxiliaryData(auxProp))
return arg.auxiliaryData(auxProp).toBool();
const bool value = QmlItemNode::isValidQmlItemNode(arg) || NodeHints::fromModelNode(arg).visibleInNavigator();
arg.setAuxiliaryData(auxProp, value);
return value;
})); }));
} else { } else {
list = property.toModelNodeList(); list = property.toModelNodeList();