qmljs: fix compilation for qt4

QStringList::join only accepts strings, not chars in qt4

Change-Id: I8ad89420d618904e53d0bb08bb1c497995a744c4
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
This commit is contained in:
Fawzi Mohamed
2013-02-12 12:19:54 +01:00
committed by Thomas Hartmann
parent 33ee1dbe9f
commit c2f52e97e4

View File

@@ -151,13 +151,13 @@ bool HoverHandler::setQmlTypeHelp(const ScopeChain &scopeChain, const Document::
QStringList helpIdPieces(qName); QStringList helpIdPieces(qName);
helpIdPieces.prepend(moduleName); helpIdPieces.prepend(moduleName);
helpIdPieces.prepend(QLatin1String("QML")); helpIdPieces.prepend(QLatin1String("QML"));
helpId = helpIdPieces.join(QLatin1Char('.')); helpId = helpIdPieces.join(QLatin1String("."));
if (!Core::HelpManager::instance()->linksForIdentifier(helpId).isEmpty()) if (!Core::HelpManager::instance()->linksForIdentifier(helpId).isEmpty())
break; break;
if (helpIdPieces.size() > 3) { if (helpIdPieces.size() > 3) {
QString lm = helpIdPieces.value(2); QString lm = helpIdPieces.value(2);
helpIdPieces.removeAt(2); helpIdPieces.removeAt(2);
helpId = helpIdPieces.join(QLatin1Char('.')); helpId = helpIdPieces.join(QLatin1String("."));
if (!Core::HelpManager::instance()->linksForIdentifier(helpId).isEmpty()) if (!Core::HelpManager::instance()->linksForIdentifier(helpId).isEmpty())
break; break;
helpIdPieces.replace(1, lm); helpIdPieces.replace(1, lm);
@@ -165,12 +165,12 @@ bool HoverHandler::setQmlTypeHelp(const ScopeChain &scopeChain, const Document::
break; break;
} }
helpIdPieces.removeAt(1); helpIdPieces.removeAt(1);
helpId = helpIdPieces.join(QLatin1Char('.')); helpId = helpIdPieces.join(QLatin1String("."));
if (!Core::HelpManager::instance()->linksForIdentifier(helpId).isEmpty()) if (!Core::HelpManager::instance()->linksForIdentifier(helpId).isEmpty())
break; break;
return false; return false;
} while (0); } while (0);
setLastHelpItemIdentified(TextEditor::HelpItem(helpId, qName.join(QLatin1Char('.')), setLastHelpItemIdentified(TextEditor::HelpItem(helpId, qName.join(QLatin1String(".")),
TextEditor::HelpItem::QmlComponent)); TextEditor::HelpItem::QmlComponent));
return true; return true;
} }