diff options
author | Morten Johan Sørvig <morten.sorvig@digia.com> | 2014-09-15 21:48:30 +0200 |
---|---|---|
committer | Morten Johan Sørvig <morten.sorvig@qt.io> | 2016-05-13 13:32:08 +0000 |
commit | b6d3bae80317d854d78b5880d8d46cacd0d1a64e (patch) | |
tree | 4ecd01dac33105436efefd123247b02851918a60 /src/qml/qml/qqmlimport.cpp | |
parent | 872a05475721ad771bd347d1526035e6e7479d30 (diff) |
QtDeclarative fixes and workarounds for NaClwip/nacl
Make QtDeclarative run on Native Client.
Some of these should be looked at more closely at
a later point in time, but will do as workarounds
from now.
Change-Id: Ifddcb45b190c3a80c6137772a05ababb5466ea22
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Diffstat (limited to 'src/qml/qml/qqmlimport.cpp')
-rw-r--r-- | src/qml/qml/qqmlimport.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
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 |