Commit a4e6c0aa authored by Friedrich W. H. Kossebau's avatar Friedrich W. H. Kossebau
Browse files

lldb: port foreach -> range-based for

parent 198a279f
......@@ -80,7 +80,7 @@ void LldbVariable::formatChanged()
{
if(childCount())
{
foreach(TreeItem* item, childItems) {
for (TreeItem* item : qAsConst(childItems)) {
Q_ASSERT(qobject_cast<MIVariable*>(item));
if (auto* var = qobject_cast<MIVariable*>(item)) {
var->setFormat(format());
......
......@@ -242,7 +242,8 @@ void DebugSession::configInferior(ILaunchConfiguration *cfg, IExecutePlugin *iex
if (breakOnStart) {
BreakpointModel* m = ICore::self()->debugController()->breakpointModel();
bool found = false;
foreach (Breakpoint *b, m->breakpoints()) {
const auto breakpoints = m->breakpoints();
for (Breakpoint* b : breakpoints) {
if (b->location() == QLatin1String("main")) {
found = true;
break;
......
......@@ -1828,7 +1828,8 @@ void LldbTest::testDebugInExternalTerminal()
{
TestLaunchConfiguration cfg;
foreach (const QString & console, QStringList() << "konsole" << "xterm" << "xfce4-terminal" << "gnome-terminal") {
const QStringList consoles { "konsole", "xterm", "xfce4-terminal", "gnome-terminal" };
for (const QString& console : consoles) {
if (QStandardPaths::findExecutable(console).isEmpty()) {
continue;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment