aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/v8
diff options
context:
space:
mode:
authorKent Hansen <kent.hansen@nokia.com>2012-05-22 15:30:11 +0200
committerQt by Nokia <qt-info@nokia.com>2012-05-24 09:41:29 +0200
commit2a5d05dd3c9d42794d6863425598b8a838ebfb63 (patch)
tree14e34c1f23abbbed5fd43ea996bc9f829828b8d1 /src/qml/qml/v8
parentafc0d1f0454858aefb342353afb4df4b27863382 (diff)
Remove QJSEngine::ContextOwnership and associated constructor
This API was intended for QtWebKit integration, but we decided to keep it out of the public headers and introduce it in a different way later. Change-Id: I7f30b20b741eca8569e63a7e4e27171d75293567 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
Diffstat (limited to 'src/qml/qml/v8')
-rw-r--r--src/qml/qml/v8/qjsengine.cpp12
-rw-r--r--src/qml/qml/v8/qjsengine.h8
-rw-r--r--src/qml/qml/v8/qv8engine.cpp6
-rw-r--r--src/qml/qml/v8/qv8engine_p.h6
4 files changed, 8 insertions, 24 deletions
diff --git a/src/qml/qml/v8/qjsengine.cpp b/src/qml/qml/v8/qjsengine.cpp
index af47877c35..167f87d4b5 100644
--- a/src/qml/qml/v8/qjsengine.cpp
+++ b/src/qml/qml/v8/qjsengine.cpp
@@ -152,18 +152,6 @@ QJSEngine::QJSEngine()
{
}
-#ifdef QT_DEPRECATED
-
-/*!
- \internal
-*/
-QJSEngine::QJSEngine(QJSEngine::ContextOwnership ownership)
- : d(new QV8Engine(this, ownership))
-{
-}
-
-#endif // QT_DEPRECATED
-
/*!
Constructs a QJSEngine object with the given \a parent.
diff --git a/src/qml/qml/v8/qjsengine.h b/src/qml/qml/v8/qjsengine.h
index bf1e215416..c7afb88fa3 100644
--- a/src/qml/qml/v8/qjsengine.h
+++ b/src/qml/qml/v8/qjsengine.h
@@ -65,14 +65,6 @@ class Q_QML_EXPORT QJSEngine
{
Q_OBJECT
public:
-#ifdef QT_DEPRECATED
- enum ContextOwnership {
- AdoptCurrentContext,
- CreateNewContext
- };
- QT_DEPRECATED explicit QJSEngine(ContextOwnership ownership);
-#endif
-
QJSEngine();
explicit QJSEngine(QObject *parent);
virtual ~QJSEngine();
diff --git a/src/qml/qml/v8/qv8engine.cpp b/src/qml/qml/v8/qv8engine.cpp
index c075fc9d1b..4e53964086 100644
--- a/src/qml/qml/v8/qv8engine.cpp
+++ b/src/qml/qml/v8/qv8engine.cpp
@@ -120,10 +120,10 @@ static bool ObjectComparisonCallback(v8::Local<v8::Object> lhs, v8::Local<v8::Ob
}
-QV8Engine::QV8Engine(QJSEngine* qq, QJSEngine::ContextOwnership ownership)
+QV8Engine::QV8Engine(QJSEngine* qq, ContextOwnership ownership)
: q(qq)
, m_engine(0)
- , m_ownsV8Context(ownership == QJSEngine::CreateNewContext)
+ , m_ownsV8Context(ownership == CreateNewContext)
, m_xmlHttpRequestData(0)
, m_listModelData(0)
, m_application(0)
@@ -141,7 +141,7 @@ QV8Engine::QV8Engine(QJSEngine* qq, QJSEngine::ContextOwnership ownership)
ensurePerThreadIsolate();
v8::HandleScope handle_scope;
- m_context = (ownership == QJSEngine::CreateNewContext) ? v8::Context::New() : v8::Persistent<v8::Context>::New(v8::Context::GetCurrent());
+ m_context = (ownership == CreateNewContext) ? v8::Context::New() : v8::Persistent<v8::Context>::New(v8::Context::GetCurrent());
qPersistentRegister(m_context);
m_originalGlobalObject.init(m_context);
v8::Context::Scope context_scope(m_context);
diff --git a/src/qml/qml/v8/qv8engine_p.h b/src/qml/qml/v8/qv8engine_p.h
index 772fa82c5a..0cd54ae3a1 100644
--- a/src/qml/qml/v8/qv8engine_p.h
+++ b/src/qml/qml/v8/qv8engine_p.h
@@ -231,7 +231,11 @@ public:
static QV8Engine* get(QJSEngine* q) { Q_ASSERT(q); return q->handle(); }
static QJSEngine* get(QV8Engine* d) { Q_ASSERT(d); return d->q; }
- QV8Engine(QJSEngine* qq,QJSEngine::ContextOwnership ownership = QJSEngine::CreateNewContext);
+ enum ContextOwnership {
+ AdoptCurrentContext,
+ CreateNewContext
+ };
+ QV8Engine(QJSEngine* qq, ContextOwnership ownership = CreateNewContext);
virtual ~QV8Engine();
// This enum should be in sync with QQmlEngine::ObjectOwnership