summaryrefslogtreecommitdiffstats
path: root/examples/quick/embeddedinwidgets/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'examples/quick/embeddedinwidgets/main.cpp')
-rw-r--r--examples/quick/embeddedinwidgets/main.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/examples/quick/embeddedinwidgets/main.cpp b/examples/quick/embeddedinwidgets/main.cpp
index 96b0df7e13..91147772ba 100644
--- a/examples/quick/embeddedinwidgets/main.cpp
+++ b/examples/quick/embeddedinwidgets/main.cpp
@@ -103,7 +103,8 @@ void MainWindow::quickViewStatusChanged(QQuickView::Status status)
{
if (status == QQuickView::Error) {
QStringList errors;
- foreach (const QQmlError &error, m_quickView->errors())
+ const auto viewErrors = m_quickView->errors();
+ for (const QQmlError &error : viewErrors)
errors.append(error.toString());
statusBar()->showMessage(errors.join(QStringLiteral(", ")));
}