diff options
author | Dominik Holland <dominik.holland@pelagicore.com> | 2018-02-19 11:13:49 +0100 |
---|---|---|
committer | Robert Griebl <robert.griebl@pelagicore.com> | 2018-02-20 09:55:43 +0000 |
commit | 0f5a4e84d162cf56a368fdad9d925abb998241c3 (patch) | |
tree | 30361aecf3059089a9ac70bb4ebf19f442fb8295 | |
parent | ce49c062b6a3a682913c65ec6e4d8257627dc9b3 (diff) | |
download | qtivi-0f5a4e84d162cf56a368fdad9d925abb998241c3.tar.gz |
Adapt to the changed QJSEngine private API
Instead of using the QJSEngine we now use the QQmlEngine directly to
access the v4 engine to throw an error.
Change-Id: Id7add1085a92048510e5cd6e1c00c4aac4bd74e5
Reviewed-by: Robert Griebl <robert.griebl@pelagicore.com>
-rw-r--r-- | src/ivicore/qiviproperty.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/ivicore/qiviproperty.cpp b/src/ivicore/qiviproperty.cpp index 3afe543..7d91697 100644 --- a/src/ivicore/qiviproperty.cpp +++ b/src/ivicore/qiviproperty.cpp @@ -43,6 +43,7 @@ #include "qiviproperty_p.h" #include <QMetaEnum> +#include <QQmlEngine> //Needed for error reporting #include <private/qv8engine_p.h> @@ -64,7 +65,12 @@ void QIviPropertyPrivate::throwError(QObject *object, const QString &error) qWarning("%s", qPrintable(error)); return; } - QV4::ExecutionEngine *v4 = QV8Engine::getV4(jsEngine); + +#if (QT_VERSION >= QT_VERSION_CHECK(5, 11, 0)) + QV4::ExecutionEngine *v4 = jsEngine->handle(); +#else + QV4::ExecutionEngine *v4 = QV8Engine::getV4(jsEngine->handle()); +#endif v4->throwError(error); } |