diff options
author | Simon Hausmann <simon.hausmann@qt.io> | 2018-07-11 14:55:08 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@qt.io> | 2018-07-17 06:55:51 +0000 |
commit | 6b53e7e16df0a2451d2b7948ad35485301c564b6 (patch) | |
tree | 4d6e6beb9cc335c570335e7afa1407e1c23f6090 /src/qml/jsruntime/qv4script.cpp | |
parent | e732e5c969b8ee3ddfb7ae33761ddc105e0af4cb (diff) |
Get rid of TemporaryAssignment
We can use QScopedValueRollback from QtCore for the same purpose.
Change-Id: I5ca37a52bde5469cdb76928913835140241d42b1
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
Diffstat (limited to 'src/qml/jsruntime/qv4script.cpp')
-rw-r--r-- | src/qml/jsruntime/qv4script.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/qml/jsruntime/qv4script.cpp b/src/qml/jsruntime/qv4script.cpp index efd528860f..37c4f27ca9 100644 --- a/src/qml/jsruntime/qv4script.cpp +++ b/src/qml/jsruntime/qv4script.cpp @@ -57,6 +57,7 @@ #include <QtCore/QDebug> #include <QtCore/QString> +#include <QScopedValueRollback> using namespace QV4; @@ -154,7 +155,7 @@ ReturnedValue Script::run(const QV4::Value *thisObject) QV4::Scope valueScope(engine); if (qmlContext.isUndefined()) { - TemporaryAssignment<Function*> savedGlobalCode(engine->globalCode, vmFunction); + QScopedValueRollback<Function*> savedGlobalCode(engine->globalCode, vmFunction); return vmFunction->call(thisObject ? thisObject : engine->globalObject, nullptr, 0, context); |