forked from qt-creator/qt-creator
Fix Qt 6 build of ProjectExplorer and targets & build systems
QStringRef is gone. qsizetype vs int. QMultiHash::insertMulti is gone. QXmlStreamWriter writes UTF-8 by default. Task-number: QTCREATORBUG-24098 Change-Id: Id217e40a1f17993a84fc725976e9cb84618b0580 Reviewed-by: hjk <hjk@qt.io> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -79,7 +79,7 @@ static inline QString xmlFromClassName(const QString &name)
|
||||
if (!name.isEmpty()) {
|
||||
rc += name.left(1).toLower();
|
||||
if (name.size() > 1)
|
||||
rc += name.midRef(1);
|
||||
rc += name.mid(1);
|
||||
}
|
||||
rc += QLatin1String("\">\n</widget>\n");
|
||||
return rc;
|
||||
|
||||
@@ -782,7 +782,10 @@ QPair<ProFile *, QStringList> QmakePriFile::readProFile()
|
||||
QMakeVfs vfs;
|
||||
QtSupport::ProMessageHandler handler;
|
||||
QMakeParser parser(nullptr, &vfs, &handler);
|
||||
includeFile = parser.parsedProBlock(QStringRef(&contents), 0, filePath().toString(), 1);
|
||||
includeFile = parser.parsedProBlock(Utils::make_stringview(contents),
|
||||
0,
|
||||
filePath().toString(),
|
||||
1);
|
||||
}
|
||||
return qMakePair(includeFile, lines);
|
||||
}
|
||||
@@ -828,13 +831,11 @@ bool QmakePriFile::renameFile(const QString &oldName, const QString &newName, Ch
|
||||
|
||||
// Reparse necessary due to changed contents.
|
||||
QMakeParser parser(nullptr, nullptr, nullptr);
|
||||
ProFile * const proFile = parser.parsedProBlock(
|
||||
QStringRef(¤tContents),
|
||||
0,
|
||||
filePath().toString(),
|
||||
1,
|
||||
QMakeParser::FullGrammar
|
||||
);
|
||||
ProFile *const proFile = parser.parsedProBlock(Utils::make_stringview(currentContents),
|
||||
0,
|
||||
filePath().toString(),
|
||||
1,
|
||||
QMakeParser::FullGrammar);
|
||||
QTC_ASSERT(proFile, return); // The file should still be valid after what we did.
|
||||
|
||||
ProWriter::addFiles(proFile, ¤tLines, {newName}, loc.first, continuationIndent());
|
||||
|
||||
Reference in New Issue
Block a user