aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/plugins/baremetal/baremetaldebugsupport.cpp2
-rw-r--r--src/plugins/baremetal/gdbserverprovidermanager.cpp4
-rw-r--r--src/plugins/baremetal/gdbserverproviderssettingspage.cpp4
-rw-r--r--src/plugins/baremetal/openocdgdbserverprovider.cpp2
4 files changed, 6 insertions, 6 deletions
diff --git a/src/plugins/baremetal/baremetaldebugsupport.cpp b/src/plugins/baremetal/baremetaldebugsupport.cpp
index 3c1a6597038..c0fade472df 100644
--- a/src/plugins/baremetal/baremetaldebugsupport.cpp
+++ b/src/plugins/baremetal/baremetaldebugsupport.cpp
@@ -112,7 +112,7 @@ void BareMetalDebugSupport::start()
QString commands;
if (const BuildConfiguration *bc = target->activeBuildConfiguration()) {
if (BuildStepList *bsl = bc->stepList(BareMetalGdbCommandsDeployStep::stepId())) {
- foreach (const BareMetalGdbCommandsDeployStep *bs, bsl->allOfType<BareMetalGdbCommandsDeployStep>()) {
+ for (const BareMetalGdbCommandsDeployStep *bs : bsl->allOfType<BareMetalGdbCommandsDeployStep>()) {
if (!commands.endsWith("\n"))
commands.append("\n");
commands.append(bs->gdbCommands());
diff --git a/src/plugins/baremetal/gdbserverprovidermanager.cpp b/src/plugins/baremetal/gdbserverprovidermanager.cpp
index 1eea2d5955d..3a72942dd3b 100644
--- a/src/plugins/baremetal/gdbserverprovidermanager.cpp
+++ b/src/plugins/baremetal/gdbserverprovidermanager.cpp
@@ -105,7 +105,7 @@ void GdbServerProviderManager::restoreProviders()
const QVariantMap map = data.value(key).toMap();
bool restored = false;
- foreach (GdbServerProviderFactory *f, m_factories) {
+ for (GdbServerProviderFactory *f : qAsConst(m_factories)) {
if (f->canRestore(map)) {
if (GdbServerProvider *p = f->restore(map)) {
registerProvider(p);
@@ -129,7 +129,7 @@ void GdbServerProviderManager::saveProviders()
data.insert(QLatin1String(fileVersionKeyC), 1);
int count = 0;
- foreach (const GdbServerProvider *p, m_providers) {
+ for (const GdbServerProvider *p : qAsConst(m_providers)) {
if (p->isValid()) {
const QVariantMap tmp = p->toMap();
if (tmp.isEmpty())
diff --git a/src/plugins/baremetal/gdbserverproviderssettingspage.cpp b/src/plugins/baremetal/gdbserverproviderssettingspage.cpp
index 978cb0eafe3..93763e2650e 100644
--- a/src/plugins/baremetal/gdbserverproviderssettingspage.cpp
+++ b/src/plugins/baremetal/gdbserverproviderssettingspage.cpp
@@ -124,7 +124,7 @@ GdbServerProviderNode *GdbServerProviderModel::nodeForIndex(const QModelIndex &i
void GdbServerProviderModel::apply()
{
// Remove unused providers
- foreach (GdbServerProvider *provider, m_providersToRemove)
+ for (GdbServerProvider *provider : qAsConst(m_providersToRemove))
GdbServerProviderManager::deregisterProvider(provider);
QTC_ASSERT(m_providersToRemove.isEmpty(), m_providersToRemove.clear());
@@ -144,7 +144,7 @@ void GdbServerProviderModel::apply()
// Add new (and already updated) providers
QStringList skippedProviders;
- foreach (GdbServerProvider *provider, m_providersToAdd) {
+ for (GdbServerProvider *provider: qAsConst(m_providersToAdd)) {
if (!GdbServerProviderManager::registerProvider(provider))
skippedProviders << provider->displayName();
}
diff --git a/src/plugins/baremetal/openocdgdbserverprovider.cpp b/src/plugins/baremetal/openocdgdbserverprovider.cpp
index 0b9e767ed28..c751d9d24fc 100644
--- a/src/plugins/baremetal/openocdgdbserverprovider.cpp
+++ b/src/plugins/baremetal/openocdgdbserverprovider.cpp
@@ -95,7 +95,7 @@ QString OpenOcdGdbServerProvider::channel() const
QStringList args;
// In the pipe mode need to add quotes to each item of arguments;
// otherwise running will be stuck.
- foreach (const QString &a, arguments()) {
+ for (const QString &a : arguments()) {
if (a.startsWith(QLatin1Char('\"')) && a.endsWith(QLatin1Char('\"')))
continue;
args << (QLatin1Char('\"') + a + QLatin1Char('\"'));