aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/v8/qv8engine.cpp
diff options
context:
space:
mode:
authorPaolo Angelelli <paolo.angelelli@theqtcompany.com>2016-02-16 17:40:12 +0100
committerPaolo Angelelli <paolo.angelelli@theqtcompany.com>2016-03-04 13:09:51 +0000
commitc7ac28fa354b96de37dc6cde5e3728da8daaacbb (patch)
treeba34e8d5e14700a5e786ffbc78204e436cabf2e9 /src/qml/qml/v8/qv8engine.cpp
parent9456832163d3476e8f81440dd2978092a9000b72 (diff)
QtLite: no_network option for QtDeclarative
This patch adds the support for a no_network option for QtDeclarative, and the necessary #ifndef all around the code. no_network changes the interface of some classes, therefore using it breaks source compatibility. Change-Id: Iff612fb07041b8a7db99bd595bf038efaac2dd8a Reviewed-by: Risto Avila <risto.avila@theqtcompany.com> Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
Diffstat (limited to 'src/qml/qml/v8/qv8engine.cpp')
-rw-r--r--src/qml/qml/v8/qv8engine.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/qml/qml/v8/qv8engine.cpp b/src/qml/qml/v8/qv8engine.cpp
index d322088f61..89f128a0e7 100644
--- a/src/qml/qml/v8/qv8engine.cpp
+++ b/src/qml/qml/v8/qv8engine.cpp
@@ -159,18 +159,22 @@ QV8Engine::~QV8Engine()
delete m_extensionData[ii];
m_extensionData.clear();
+#if !defined(QT_NO_XMLSTREAMREADER) && defined(QT_NO_NETWORK)
qt_rem_qmlxmlhttprequest(m_v4Engine, m_xmlHttpRequestData);
m_xmlHttpRequestData = 0;
+#endif
delete m_listModelData;
m_listModelData = 0;
delete m_v4Engine;
}
+#ifndef QT_NO_NETWORK
QNetworkAccessManager *QV8Engine::networkAccessManager()
{
return QQmlEnginePrivate::get(m_engine)->getNetworkAccessManager();
}
+#endif
const QSet<QString> &QV8Engine::illegalNames() const
{
@@ -189,8 +193,10 @@ void QV8Engine::initializeGlobal()
QQmlDateExtension::registerExtension(m_v4Engine);
QQmlNumberExtension::registerExtension(m_v4Engine);
+#if !defined(QT_NO_XMLSTREAMREADER) && !defined(QT_NO_NETWORK)
qt_add_domexceptions(m_v4Engine);
m_xmlHttpRequestData = qt_add_qmlxmlhttprequest(m_v4Engine);
+#endif
qt_add_sqlexceptions(m_v4Engine);