forked from qt-creator/qt-creator
Use QString::splitRef() instead of QString::split()
Avoid string allocation where it seems feasible. Change-Id: I61b23d4ef8a459f5aa77727a75f4e1d2b140da3b Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This commit is contained in:
@@ -2071,7 +2071,7 @@ void CdbEngine::ensureUsing32BitStackInWow64(const DebuggerResponse &response, c
|
||||
{
|
||||
// Parsing the header of the stack output to check which bitness
|
||||
// the cdb is currently using.
|
||||
foreach (const QString &line, response.data.data().split('\n')) {
|
||||
foreach (const QStringRef &line, response.data.data().splitRef(QLatin1Char('\n'))) {
|
||||
if (!line.startsWith("Child"))
|
||||
continue;
|
||||
if (line.startsWith("ChildEBP")) {
|
||||
@@ -2909,7 +2909,8 @@ void CdbEngine::setupScripting(const DebuggerResponse &response)
|
||||
return;
|
||||
}
|
||||
const QString &verOutput = data.data();
|
||||
const QStringList pythonVersion = verOutput.split(' ').first().split('.');
|
||||
const QVector<QStringRef> pythonVersion =
|
||||
verOutput.split(QLatin1Char(' ')).constFirst().splitRef(QLatin1Char('.'));
|
||||
|
||||
bool ok = false;
|
||||
if (pythonVersion.size() == 3) {
|
||||
|
||||
Reference in New Issue
Block a user