Skip to content

Commit

Permalink
Remove V8 references from QtLocation
Browse files Browse the repository at this point in the history
This fixes the current build break in dev too.

Change-Id: Id35f4411c228e4365042ab370c7c505f611cb694
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Reviewed-by: Michal Klocek <michal.klocek@digia.com>
  • Loading branch information
Alex Blasche authored and martinjones committed Jun 24, 2016
1 parent eb9adb6 commit a53a8ff
Show file tree
Hide file tree
Showing 10 changed files with 15 additions and 30 deletions.
6 changes: 2 additions & 4 deletions src/imports/location/qdeclarativegeoroute.cpp
Expand Up @@ -167,16 +167,14 @@ QJSValue QDeclarativeGeoRoute::path() const
{
QQmlContext *context = QQmlEngine::contextForObject(parent());
QQmlEngine *engine = context->engine();
QV8Engine *v8Engine = QQmlEnginePrivate::getV8Engine(engine);
QV4::ExecutionEngine *v4 = QV8Engine::getV4(v8Engine);
QV4::ExecutionEngine *v4 = QQmlEnginePrivate::getV4Engine(engine);

QV4::Scope scope(v4);
QV4::Scoped<QV4::ArrayObject> pathArray(scope, v4->newArrayObject(route_.path().length()));
for (int i = 0; i < route_.path().length(); ++i) {
const QGeoCoordinate &c = route_.path().at(i);

QV4::ScopedValue cv(scope, QV8Engine::fromVariant(v4, QVariant::fromValue(c)));

QV4::ScopedValue cv(scope, v4->fromVariant(QVariant::fromValue(c)));
pathArray->putIndexed(i, cv);
}

Expand Down
1 change: 0 additions & 1 deletion src/imports/location/qdeclarativegeoroute_p.h
Expand Up @@ -46,7 +46,6 @@

#include <QtCore/QObject>
#include <QtQml/QQmlListProperty>
#include <QtQml/private/qv8engine_p.h>
#include <QtLocation/QGeoRoute>

QT_BEGIN_NAMESPACE
Expand Down
12 changes: 4 additions & 8 deletions src/imports/location/qdeclarativegeoroutemodel.cpp
Expand Up @@ -798,16 +798,14 @@ QJSValue QDeclarativeGeoRouteQuery::waypoints()
{
QQmlContext *context = QQmlEngine::contextForObject(parent());
QQmlEngine *engine = context->engine();
QV8Engine *v8Engine = QQmlEnginePrivate::getV8Engine(engine);
QV4::ExecutionEngine *v4 = QV8Engine::getV4(v8Engine);
QV4::ExecutionEngine *v4 = QQmlEnginePrivate::getV4Engine(engine);

QV4::Scope scope(v4);
QV4::Scoped<QV4::ArrayObject> waypointArray(scope, v4->newArrayObject(request_.waypoints().length()));
for (int i = 0; i < request_.waypoints().length(); ++i) {
const QGeoCoordinate &c = request_.waypoints().at(i);

QV4::ScopedValue cv(scope, QV8Engine::fromVariant(v4, QVariant::fromValue(c)));

QV4::ScopedValue cv(scope, v4->fromVariant(QVariant::fromValue(c)));
waypointArray->putIndexed(i, cv);
}

Expand Down Expand Up @@ -856,16 +854,14 @@ QJSValue QDeclarativeGeoRouteQuery::excludedAreas() const
{
QQmlContext *context = QQmlEngine::contextForObject(parent());
QQmlEngine *engine = context->engine();
QV8Engine *v8Engine = QQmlEnginePrivate::getV8Engine(engine);
QV4::ExecutionEngine *v4 = QV8Engine::getV4(v8Engine);
QV4::ExecutionEngine *v4 = QQmlEnginePrivate::getV4Engine(engine);

QV4::Scope scope(v4);
QV4::Scoped<QV4::ArrayObject> excludedAreasArray(scope, v4->newArrayObject(request_.excludeAreas().length()));
for (int i = 0; i < request_.excludeAreas().length(); ++i) {
const QGeoRectangle &r = request_.excludeAreas().at(i);

QV4::ScopedValue cv(scope, QV8Engine::fromVariant(v4, QVariant::fromValue(r)));

QV4::ScopedValue cv(scope, v4->fromVariant(QVariant::fromValue(r)));
excludedAreasArray->putIndexed(i, cv);
}

Expand Down
2 changes: 1 addition & 1 deletion src/imports/location/qdeclarativegeoroutemodel_p.h
Expand Up @@ -52,7 +52,7 @@

#include <QtQml/qqml.h>
#include <QtQml/QQmlParserStatus>
#include <QtQml/private/qv8engine_p.h>
#include <QtQml/private/qv4engine_p.h>
#include <QAbstractListModel>

#include <QObject>
Expand Down
6 changes: 2 additions & 4 deletions src/imports/location/qdeclarativegeoroutesegment.cpp
Expand Up @@ -153,16 +153,14 @@ QJSValue QDeclarativeGeoRouteSegment::path() const
{
QQmlContext *context = QQmlEngine::contextForObject(parent());
QQmlEngine *engine = context->engine();
QV8Engine *v8Engine = QQmlEnginePrivate::getV8Engine(engine);
QV4::ExecutionEngine *v4 = QV8Engine::getV4(v8Engine);
QV4::ExecutionEngine *v4 = QQmlEnginePrivate::getV4Engine(engine);

QV4::Scope scope(v4);
QV4::Scoped<QV4::ArrayObject> pathArray(scope, v4->newArrayObject(segment_.path().length()));
for (int i = 0; i < segment_.path().length(); ++i) {
const QGeoCoordinate &c = segment_.path().at(i);

QV4::ScopedValue cv(scope, QV8Engine::fromVariant(v4, QVariant::fromValue(c)));

QV4::ScopedValue cv(scope, v4->fromVariant(QVariant::fromValue(c)));
pathArray->putIndexed(i, cv);
}

Expand Down
3 changes: 2 additions & 1 deletion src/imports/location/qdeclarativegeoroutesegment_p.h
Expand Up @@ -45,7 +45,8 @@
#include "qdeclarativegeomaneuver_p.h"

#include <QtCore/QObject>
#include <QtQml/private/qv8engine_p.h>
#include <QtQml/private/qv4engine_p.h>
#include <QtQml/qjsvalue.h>
#include <QtLocation/QGeoRouteSegment>

QT_BEGIN_NAMESPACE
Expand Down
6 changes: 2 additions & 4 deletions src/imports/location/qdeclarativepolygonmapitem.cpp
Expand Up @@ -391,16 +391,14 @@ QJSValue QDeclarativePolygonMapItem::path() const
{
QQmlContext *context = QQmlEngine::contextForObject(parent());
QQmlEngine *engine = context->engine();
QV8Engine *v8Engine = QQmlEnginePrivate::getV8Engine(engine);
QV4::ExecutionEngine *v4 = QV8Engine::getV4(v8Engine);
QV4::ExecutionEngine *v4 = QQmlEnginePrivate::getV4Engine(engine);

QV4::Scope scope(v4);
QV4::Scoped<QV4::ArrayObject> pathArray(scope, v4->newArrayObject(path_.length()));
for (int i = 0; i < path_.length(); ++i) {
const QGeoCoordinate &c = path_.at(i);

QV4::ScopedValue cv(scope, QV8Engine::fromVariant(v4, QVariant::fromValue(c)));

QV4::ScopedValue cv(scope, v4->fromVariant(QVariant::fromValue(c)));
pathArray->putIndexed(i, cv);
}

Expand Down
1 change: 0 additions & 1 deletion src/imports/location/qdeclarativepolygonmapitem_p.h
Expand Up @@ -46,7 +46,6 @@
#include "qdeclarativepolylinemapitem_p.h"
#include "qgeomapitemgeometry_p.h"

#include <QtQml/private/qv8engine_p.h>
#include <QSGGeometryNode>
#include <QSGFlatColorMaterial>

Expand Down
6 changes: 2 additions & 4 deletions src/imports/location/qdeclarativepolylinemapitem.cpp
Expand Up @@ -499,16 +499,14 @@ QJSValue QDeclarativePolylineMapItem::path() const
{
QQmlContext *context = QQmlEngine::contextForObject(parent());
QQmlEngine *engine = context->engine();
QV8Engine *v8Engine = QQmlEnginePrivate::getV8Engine(engine);
QV4::ExecutionEngine *v4 = QV8Engine::getV4(v8Engine);
QV4::ExecutionEngine *v4 = QQmlEnginePrivate::getV4Engine(engine);

QV4::Scope scope(v4);
QV4::Scoped<QV4::ArrayObject> pathArray(scope, v4->newArrayObject(path_.length()));
for (int i = 0; i < path_.length(); ++i) {
const QGeoCoordinate &c = path_.at(i);

QV4::ScopedValue cv(scope, QV8Engine::fromVariant(v4, QVariant::fromValue(c)));

QV4::ScopedValue cv(scope, v4->fromVariant(QVariant::fromValue(c)));
pathArray->putIndexed(i, cv);
}

Expand Down
2 changes: 0 additions & 2 deletions src/imports/location/qdeclarativepolylinemapitem_p.h
Expand Up @@ -45,8 +45,6 @@
#include "qdeclarativegeomapitembase_p.h"
#include "qgeomapitemgeometry_p.h"

#include <QtQml/private/qv8engine_p.h>

#include <QSGGeometryNode>
#include <QSGFlatColorMaterial>

Expand Down

0 comments on commit a53a8ff

Please sign in to comment.