forked from qt-creator/qt-creator
Proparser/QtSupport: Fix build with Qt6
Pulls in some QStringView related updates to proparser: f5d8ad61a4c85a656a7332c43d0c42f5eaf43593 "qmake: use new QString::arg(QStringView) overload" 52f3a7d9d40d3bf835bb0716ad201ee56731b980 "Build qmake with QT_USE_STRINGBUILDER" c49728eb27be0f3f2eaaa77b0ed573f5d8705af1 "Port qmake from QStringRef to QStringView" But do it in a way compatible with Qt5. Since some QStringView API is not available in Qt5 (see QTBUG-86516), this means using a StringView typedef that is either QStringRef (Qt5) or QStringView (Qt6) Task-number: QTCREATORBUG-24098 Change-Id: Ic9a73ca450543f3fdd5fcf9d686c4b773a48854c Reviewed-by: Christian Kandeler <christian.kandeler@qt.io> Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -207,7 +207,7 @@ static bool restoreQtVersions()
|
||||
if (!key.startsWith(keyPrefix))
|
||||
continue;
|
||||
bool ok;
|
||||
int count = key.midRef(keyPrefix.count()).toInt(&ok);
|
||||
int count = key.mid(keyPrefix.count()).toInt(&ok);
|
||||
if (!ok || count < 0)
|
||||
continue;
|
||||
|
||||
@@ -281,7 +281,7 @@ void QtVersionManager::updateFromInstaller(bool emitSignal)
|
||||
if (!key.startsWith(keyPrefix))
|
||||
continue;
|
||||
bool ok;
|
||||
int count = key.midRef(keyPrefix.count()).toInt(&ok);
|
||||
int count = key.mid(keyPrefix.count()).toInt(&ok);
|
||||
if (!ok || count < 0)
|
||||
continue;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user