diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2019-04-24 18:05:46 +0200 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2021-06-30 11:23:08 +0200 |
commit | 8635e5b300298c01ada7dc51bfca76c3f02bfc14 (patch) | |
tree | f7e797d9ab242c82659258ff4829a7e2a65ee1ed /src/qml/jsruntime/qv4value.cpp | |
parent | 88e2b6316effd0a570b49e7e9f6f6378078c12a4 (diff) |
Use QV4::Scope::hasException() where applicable
It is shorter and encapsulates the exception handling a bit.
Change-Id: I8e2dc0eb3b930e222b8cb4852b73d99ca18a0379
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src/qml/jsruntime/qv4value.cpp')
-rw-r--r-- | src/qml/jsruntime/qv4value.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/qml/jsruntime/qv4value.cpp b/src/qml/jsruntime/qv4value.cpp index 6913a49f9c..f6d07d17d5 100644 --- a/src/qml/jsruntime/qv4value.cpp +++ b/src/qml/jsruntime/qv4value.cpp @@ -109,7 +109,7 @@ double Value::toNumberImpl(Value val) Scope scope(val.objectValue()->engine()); ScopedValue protectThis(scope, val); ScopedValue prim(scope, RuntimeHelpers::toPrimitive(val, NUMBER_HINT)); - if (scope.engine->hasException) + if (scope.hasException()) return 0; return prim->toNumber(); } |