aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml
diff options
context:
space:
mode:
Diffstat (limited to 'src/qml/qml')
-rw-r--r--src/qml/qml/qqmldirparser.cpp4
-rw-r--r--src/qml/qml/qqmlimport.cpp11
-rw-r--r--src/qml/qml/qqmltypeloader.cpp5
-rw-r--r--src/qml/qml/v8/qv8engine.cpp3
4 files changed, 23 insertions, 0 deletions
diff --git a/src/qml/qml/qqmldirparser.cpp b/src/qml/qml/qqmldirparser.cpp
index 57b50733ea..ca3e620996 100644
--- a/src/qml/qml/qqmldirparser.cpp
+++ b/src/qml/qml/qqmldirparser.cpp
@@ -100,6 +100,10 @@ bool QQmlDirParser::parse(const QString &source)
_plugins.clear();
_components.clear();
_scripts.clear();
+#ifdef Q_OS_NACL
+ // ### Work around "only one module identifier" error below
+ _typeNamespace.clear();
+#endif
_designerSupported = false;
quint16 lineNumber = 0;
diff --git a/src/qml/qml/qqmlimport.cpp b/src/qml/qml/qqmlimport.cpp
index d538199520..10cb377929 100644
--- a/src/qml/qml/qqmlimport.cpp
+++ b/src/qml/qml/qqmlimport.cpp
@@ -1206,6 +1206,10 @@ bool QQmlImportsPrivate::validateQmldirVersion(const QQmlTypeLoader::QmldirConte
}
}
+#ifdef Q_OS_NACL
+ // ### This check triggers on NaCl: lowest_min/highest_min do not
+ // get set to senisble values. Disabling allows loading to continue.
+#else
if (lowest_min > vmin || highest_min < vmin) {
QQmlError error;
error.setDescription(QQmlImportDatabase::tr("module \"%1\" version %2.%3 is not installed").arg(uri).arg(vmaj).arg(vmin));
@@ -1213,6 +1217,7 @@ bool QQmlImportsPrivate::validateQmldirVersion(const QQmlTypeLoader::QmldirConte
return false;
}
+#endif
return true;
}
@@ -1565,7 +1570,13 @@ QQmlImportDatabase::QQmlImportDatabase(QQmlEngine *e)
// Search order is applicationDirPath(), $QML2_IMPORT_PATH, QLibraryInfo::Qml2ImportsPath
+#ifdef Q_OS_NACL
+ // Hardcode the qml imports to "qml/" relative to the app nexe.
+ // This should perhaps be set via Qml2Imports in qt.conf.
+ QString installImportsPath = QStringLiteral("qml/");
+#else
QString installImportsPath = QLibraryInfo::location(QLibraryInfo::Qml2ImportsPath);
+#endif
addImportPath(installImportsPath);
// env import paths
diff --git a/src/qml/qml/qqmltypeloader.cpp b/src/qml/qml/qqmltypeloader.cpp
index 1e671542be..dd6de8f9b3 100644
--- a/src/qml/qml/qqmltypeloader.cpp
+++ b/src/qml/qml/qqmltypeloader.cpp
@@ -1706,9 +1706,14 @@ Returns a QQmlQmldirData for \a url. The QQmlQmldirData may be cached.
*/
QQmlQmldirData *QQmlTypeLoader::getQmldir(const QUrl &url)
{
+#ifdef Q_OS_NACL
+ // ### NaCl asserts here on urls like "qml/QtQuick.2.1/qmldir",
+ // which are relative urls we want to load over the network.
+#else
Q_ASSERT(!url.isRelative() &&
(QQmlFile::urlToLocalFileOrQrc(url).isEmpty() ||
!QDir::isRelativePath(QQmlFile::urlToLocalFileOrQrc(url))));
+#endif
LockHolder<QQmlTypeLoader> holder(this);
diff --git a/src/qml/qml/v8/qv8engine.cpp b/src/qml/qml/v8/qv8engine.cpp
index dae932e705..0915b8f80b 100644
--- a/src/qml/qml/v8/qv8engine.cpp
+++ b/src/qml/qml/v8/qv8engine.cpp
@@ -123,11 +123,14 @@ QV8Engine::QV8Engine(QJSEngine* qq)
, m_xmlHttpRequestData(0)
, m_listModelData(0)
{
+
+#ifndef Q_OS_NACL
#ifdef Q_PROCESSOR_X86_32
if (!qCpuHasFeature(SSE2)) {
qFatal("This program requires an X86 processor that supports SSE2 extension, at least a Pentium 4 or newer");
}
#endif
+#endif
QML_MEMORY_SCOPE_STRING("QV8Engine::QV8Engine");
qMetaTypeId<QJSValue>();