Fix build of Clang code model and CppEditor with Qt 6

QStringRef gone.
QSharedPointer is no longer auto-converted to bool.
Small things.

Task-number: QTCREATORBUG-24098
Change-Id: I3a2a55459b905118d1ca81ec015d741ab273471d
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Eike Ziller
2020-09-18 12:39:32 +02:00
parent f8ae051816
commit 830a829b2e
10 changed files with 29 additions and 21 deletions

View File

@@ -1807,7 +1807,7 @@ void ConvertNumericLiteral::match(const CppQuickFixInterface &interface, QuickFi
ulong value = 0;
const QString x = QString::fromUtf8(spell).left(numberLength);
if (x.startsWith("0b", Qt::CaseInsensitive))
value = x.midRef(2).toULong(&valid, 2);
value = x.mid(2).toULong(&valid, 2);
else
value = x.toULong(&valid, 0);