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:
@@ -83,7 +83,7 @@ QColor QmlJS::toQColor(const QString &qmlColorString)
|
||||
QColor color;
|
||||
if (qmlColorString.size() == 9 && qmlColorString.at(0) == QLatin1Char('#')) {
|
||||
bool ok;
|
||||
const int alpha = qmlColorString.midRef(1, 2).toInt(&ok, 16);
|
||||
const int alpha = qmlColorString.mid(1, 2).toInt(&ok, 16);
|
||||
if (ok) {
|
||||
const QString name = qmlColorString.at(0) + qmlColorString.right(6);
|
||||
if (QColor::isValidColor(name)) {
|
||||
@@ -106,7 +106,7 @@ QString QmlJS::toString(UiQualifiedId *qualifiedId, QChar delimiter)
|
||||
if (iter != qualifiedId)
|
||||
result += delimiter;
|
||||
|
||||
result += iter->name;
|
||||
result += iter->name.toString();
|
||||
}
|
||||
|
||||
return result;
|
||||
|
||||
Reference in New Issue
Block a user