forked from qt-creator/qt-creator
Make QmlJS(Tools) build with Qt5 & Qt6
Port from QStringRef to QStringView Change-Id: I472d16f20e40ca52b8e5d481850a6bd8a1a38f3b Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -89,7 +89,7 @@ protected:
|
||||
QString text;
|
||||
for (; id; id = id->next) {
|
||||
if (!id->name.isEmpty())
|
||||
text += id->name;
|
||||
text += id->name.toString();
|
||||
else
|
||||
text += QLatin1Char('?');
|
||||
|
||||
@@ -174,7 +174,7 @@ protected:
|
||||
QString text;
|
||||
for (; id; id = id->next) {
|
||||
if (!id->name.isEmpty())
|
||||
text += id->name;
|
||||
text += id->name.toString();
|
||||
else
|
||||
text += QLatin1Char('?');
|
||||
|
||||
@@ -294,12 +294,12 @@ protected:
|
||||
init(&decl, ast);
|
||||
|
||||
decl.text.fill(QLatin1Char(' '), _depth);
|
||||
decl.text += ast->name;
|
||||
decl.text += ast->name.toString();
|
||||
|
||||
decl.text += QLatin1Char('(');
|
||||
for (FormalParameterList *it = ast->formals; it; it = it->next) {
|
||||
if (!it->element->bindingIdentifier.isEmpty())
|
||||
decl.text += it->element->bindingIdentifier;
|
||||
decl.text += it->element->bindingIdentifier.toString();
|
||||
|
||||
if (it->next)
|
||||
decl.text += QLatin1String(", ");
|
||||
@@ -319,7 +319,7 @@ protected:
|
||||
|
||||
Declaration decl;
|
||||
decl.text.fill(QLatin1Char(' '), _depth);
|
||||
decl.text += ast->bindingIdentifier;
|
||||
decl.text += ast->bindingIdentifier.toString();
|
||||
|
||||
const SourceLocation first = ast->identifierToken;
|
||||
decl.startLine = first.startLine;
|
||||
@@ -342,12 +342,12 @@ protected:
|
||||
init(&decl, ast);
|
||||
|
||||
decl.text.fill(QLatin1Char(' '), _depth);
|
||||
decl.text += field->name;
|
||||
decl.text += field->name.toString();
|
||||
|
||||
decl.text += QLatin1Char('(');
|
||||
for (FormalParameterList *it = funcExpr->formals; it; it = it->next) {
|
||||
if (!it->element->bindingIdentifier.isEmpty())
|
||||
decl.text += it->element->bindingIdentifier;
|
||||
decl.text += it->element->bindingIdentifier.toString();
|
||||
|
||||
if (it->next)
|
||||
decl.text += QLatin1String(", ");
|
||||
|
||||
Reference in New Issue
Block a user