forked from qt-creator/qt-creator
Core: Do not use QStringRef
It is gone in Qt6. QXmlStreamReader changed return values from QStringRef to QStringView, so use auto there. Task-number: QTCREATORBUG-24098 Change-Id: I806f01c20574721bfaa4b100747ef0bba75874a0 Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -825,14 +825,14 @@ QString DocumentManager::getSaveFileName(const QString &title, const QString &pa
|
||||
const QRegularExpressionMatch match = matchIt.next();
|
||||
QString caption = match.captured(1);
|
||||
caption.remove(QLatin1Char('*'));
|
||||
const QVector<QStringRef> suffixes = caption.splitRef(QLatin1Char(' '));
|
||||
for (const QStringRef &suffix : suffixes)
|
||||
const QStringList suffixes = caption.split(QLatin1Char(' '));
|
||||
for (const QString &suffix : suffixes)
|
||||
if (fileName.endsWith(suffix)) {
|
||||
suffixOk = true;
|
||||
break;
|
||||
}
|
||||
if (!suffixOk && !suffixes.isEmpty())
|
||||
fileName.append(suffixes.at(0).toString());
|
||||
fileName.append(suffixes.at(0));
|
||||
}
|
||||
}
|
||||
if (QFile::exists(fileName)) {
|
||||
|
||||
Reference in New Issue
Block a user