forked from qt-creator/qt-creator
Fix clang warnings about unwanted copies in range loops
Change-Id: I11ae3317fd251a463809ee48917d2daf0f8b43d1 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -1142,8 +1142,7 @@ ClassOrNamespace *ClassOrNamespace::nestedType(const Name *name,
|
|||||||
|
|
||||||
int maximumArgumentsMatched = 0;
|
int maximumArgumentsMatched = 0;
|
||||||
|
|
||||||
for (const std::pair<const TemplateNameId *, ClassOrNamespace *> &p :
|
for (const auto &p : specializations) {
|
||||||
specializations) {
|
|
||||||
const TemplateNameId *templateSpecialization = p.first;
|
const TemplateNameId *templateSpecialization = p.first;
|
||||||
ClassOrNamespace *specializationClassOrNamespace = p.second;
|
ClassOrNamespace *specializationClassOrNamespace = p.second;
|
||||||
|
|
||||||
|
|||||||
@@ -616,7 +616,7 @@ QVector<AndroidDeviceInfo> AndroidConfig::connectedDevices(const FilePath &adbTo
|
|||||||
if (adbDevs.empty())
|
if (adbDevs.empty())
|
||||||
return devices;
|
return devices;
|
||||||
|
|
||||||
for (const QString line : adbDevs) // remove the daemon logs
|
for (const QString &line : adbDevs) // remove the daemon logs
|
||||||
if (line.startsWith("* daemon"))
|
if (line.startsWith("* daemon"))
|
||||||
adbDevs.removeOne(line);
|
adbDevs.removeOne(line);
|
||||||
adbDevs.removeFirst(); // remove "List of devices attached" header line
|
adbDevs.removeFirst(); // remove "List of devices attached" header line
|
||||||
|
|||||||
@@ -206,7 +206,7 @@ AndroidDeviceInfoList AndroidToolManager::androidVirtualDevices(const Utils::Fil
|
|||||||
if (avds.empty())
|
if (avds.empty())
|
||||||
return devices;
|
return devices;
|
||||||
|
|
||||||
for (const QString line : avds) // remove the daemon logs
|
for (const QString &line : avds) // remove the daemon logs
|
||||||
if (line.startsWith("* daemon"))
|
if (line.startsWith("* daemon"))
|
||||||
avds.removeOne(line);
|
avds.removeOne(line);
|
||||||
|
|
||||||
|
|||||||
@@ -309,7 +309,7 @@ QWidget *ConnectionDelegate::createEditor(QWidget *parent, const QStyleOptionVie
|
|||||||
}
|
}
|
||||||
|
|
||||||
QStringList trigger = connectionModel->getflowActionTriggerForRow(index.row());
|
QStringList trigger = connectionModel->getflowActionTriggerForRow(index.row());
|
||||||
for (const QString action : trigger) {
|
for (const QString &action : trigger) {
|
||||||
connectionComboBox->addItem(tr("Activate FlowAction %1").arg(nameForAction(action)), action);
|
connectionComboBox->addItem(tr("Activate FlowAction %1").arg(nameForAction(action)), action);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user