aboutsummaryrefslogtreecommitdiffstats
path: root/tools/qmljs/qmljs.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tools/qmljs/qmljs.cpp')
-rw-r--r--tools/qmljs/qmljs.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/qmljs/qmljs.cpp b/tools/qmljs/qmljs.cpp
index 4f79546bcc..964afc265b 100644
--- a/tools/qmljs/qmljs.cpp
+++ b/tools/qmljs/qmljs.cpp
@@ -118,7 +118,7 @@ static void showException(QV4::ExecutionContext *ctx, const QV4::Value &exceptio
std::cerr << "Uncaught exception: " << qPrintable(message->toQStringNoThrow()) << std::endl;
}
- foreach (const QV4::StackFrame &frame, trace) {
+ for (const QV4::StackFrame &frame : trace) {
std::cerr << " at " << qPrintable(frame.function) << " (" << qPrintable(frame.source);
if (frame.line >= 0)
std::cerr << ':' << frame.line;
@@ -188,7 +188,7 @@ int main(int argc, char *argv[])
QV4::ScopedObject gc(scope, vm.memoryManager->allocObject<builtins::GC>(ctx));
vm.globalObject->put(QV4::ScopedString(scope, vm.newIdentifier(QStringLiteral("gc"))).getPointer(), gc);
- foreach (const QString &fn, args) {
+ for (const QString &fn : qAsConst(args)) {
QFile file(fn);
if (file.open(QFile::ReadOnly)) {
const QString code = QString::fromUtf8(file.readAll());