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:
@@ -2531,7 +2531,7 @@ void WatchHandler::addDumpers(const GdbMi &dumpers)
|
||||
DisplayFormats formats;
|
||||
formats.append(RawFormat);
|
||||
QString reportedFormats = dumper["formats"].data();
|
||||
foreach (const QString &format, reportedFormats.split(',')) {
|
||||
foreach (const QStringRef &format, reportedFormats.splitRef(',')) {
|
||||
if (int f = format.toInt())
|
||||
formats.append(DisplayFormat(f));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user