forked from qt-creator/qt-creator
Use Qt 5's QStringList::join(QChar)
Less typing and less cycles than join(QString) where appropriate Change-Id: I6ebc0e17e4d7fd9845864dd95b7de4ba4dad6906 Reviewed-by: Eike Ziller <eike.ziller@digia.com>
This commit is contained in:
@@ -158,13 +158,13 @@ bool HoverHandler::setQmlTypeHelp(const ScopeChain &scopeChain, const Document::
|
||||
QStringList helpIdPieces(qName);
|
||||
helpIdPieces.prepend(moduleName);
|
||||
helpIdPieces.prepend(QLatin1String("QML"));
|
||||
helpId = helpIdPieces.join(QLatin1String("."));
|
||||
helpId = helpIdPieces.join(QLatin1Char('.'));
|
||||
if (!HelpManager::linksForIdentifier(helpId).isEmpty())
|
||||
break;
|
||||
if (helpIdPieces.size() > 3) {
|
||||
QString lm = helpIdPieces.value(2);
|
||||
helpIdPieces.removeAt(2);
|
||||
helpId = helpIdPieces.join(QLatin1String("."));
|
||||
helpId = helpIdPieces.join(QLatin1Char('.'));
|
||||
if (!HelpManager::linksForIdentifier(helpId).isEmpty())
|
||||
break;
|
||||
helpIdPieces.replace(1, lm);
|
||||
@@ -172,12 +172,12 @@ bool HoverHandler::setQmlTypeHelp(const ScopeChain &scopeChain, const Document::
|
||||
break;
|
||||
}
|
||||
helpIdPieces.removeAt(1);
|
||||
helpId = helpIdPieces.join(QLatin1String("."));
|
||||
helpId = helpIdPieces.join(QLatin1Char('.'));
|
||||
if (!HelpManager::linksForIdentifier(helpId).isEmpty())
|
||||
break;
|
||||
return false;
|
||||
} while (0);
|
||||
setLastHelpItemIdentified(TextEditor::HelpItem(helpId, qName.join(QLatin1String(".")),
|
||||
setLastHelpItemIdentified(TextEditor::HelpItem(helpId, qName.join(QLatin1Char('.')),
|
||||
TextEditor::HelpItem::QmlComponent));
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user