diff options
author | Lars Knoll <lars.knoll@qt.io> | 2018-09-07 11:47:51 +0200 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2018-09-07 10:32:15 +0000 |
commit | e99c203b77743fe7554663c12a98960d8514fb6b (patch) | |
tree | ff1d36effac6e7efc255f418fb2f418aea56baf4 /src/qml/jsruntime/qv4runtime.cpp | |
parent | e45eca9058bd475060637143188a4466faf487d9 (diff) |
Use the correct enum value instead of hard coded ints
Change-Id: I2d65fe6fb3d9f299f5aeff1542c7dc1d2db8b012
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/jsruntime/qv4runtime.cpp')
-rw-r--r-- | src/qml/jsruntime/qv4runtime.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/qml/jsruntime/qv4runtime.cpp b/src/qml/jsruntime/qv4runtime.cpp index 4e1993d45f..39a451e941 100644 --- a/src/qml/jsruntime/qv4runtime.cpp +++ b/src/qml/jsruntime/qv4runtime.cpp @@ -731,7 +731,7 @@ ReturnedValue Runtime::method_getIterator(ExecutionEngine *engine, const Value & o = in.toObject(engine); if (engine->hasException) return Encode::undefined(); - if (iterator) { + if (iterator == static_cast<int>(QQmlJS::AST::ForEachType::Of)) { if (!o) return engine->throwTypeError(); ScopedFunctionObject f(scope, o->get(engine->symbol_iterator())); |