diff options
author | Simon Hausmann <simon.hausmann@digia.com> | 2014-03-12 16:55:06 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-04-23 21:16:46 +0200 |
commit | a885d10a0289da85b8c966d2fa40fb10edae4fd7 (patch) | |
tree | 7c16b5abd88d436f6596d6a424126c1b1dd2aba8 /src/qml/compiler/qv4compileddata.cpp | |
parent | 937fdde5d3b26291d417f856ee05ba479a6ba730 (diff) |
Extend the QML bootstrap library by the IR builders
This is among other things needed to fix the qml import scanner to detect
dependencies from .js files correctly.
The patch also fixes the use of Q_QML_EXPORT towards Q_QML_PRIVATE_EXPORT
where appropriate and corrects the wrong include path for the double conversion
code to actually be relative to the file it is included from. This worked by
accident because of other include paths present in the build.
Change-Id: I338583dad2f76300819af8ab0dae8e5724c84430
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src/qml/compiler/qv4compileddata.cpp')
-rw-r--r-- | src/qml/compiler/qv4compileddata.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/qml/compiler/qv4compileddata.cpp b/src/qml/compiler/qv4compileddata.cpp index 56497ed8a3..cd9d8fe8a9 100644 --- a/src/qml/compiler/qv4compileddata.cpp +++ b/src/qml/compiler/qv4compileddata.cpp @@ -41,11 +41,14 @@ #include "qv4compileddata_p.h" #include "qv4jsir_p.h" +#include <private/qv4value_inl_p.h> +#ifndef V4_BOOTSTRAP #include <private/qv4engine_p.h> #include <private/qv4function_p.h> #include <private/qv4objectproto_p.h> #include <private/qv4lookup_p.h> #include <private/qv4regexpobject_p.h> +#endif #include <private/qqmlirbuilder_p.h> #include <QCoreApplication> @@ -57,6 +60,7 @@ namespace QV4 { namespace CompiledData { +#ifndef V4_BOOTSTRAP CompilationUnit::~CompilationUnit() { unlink(); @@ -181,6 +185,8 @@ void CompilationUnit::markObjects(QV4::ExecutionEngine *e) } } +#endif // V4_BOOTSTRAP + Unit *CompilationUnit::createUnitData(QmlIR::Document *irDocument) { return irDocument->jsGenerator.generateUnit(); @@ -198,6 +204,11 @@ QString Binding::valueAsString(const Unit *unit) const return QString::number(value.d); case Type_Invalid: return QString(); +#ifdef QT_NO_TRANSLATION + case Type_TranslationById: + case Type_Translation: + return unit->stringAt(stringIndex); +#else case Type_TranslationById: { QByteArray id = unit->stringAt(stringIndex).toUtf8(); return qtTrId(id.constData(), value.translationData.number); @@ -214,6 +225,7 @@ QString Binding::valueAsString(const Unit *unit) const return QCoreApplication::translate(contextUtf8.constData(), text.constData(), comment.constData(), value.translationData.number); } +#endif default: break; } |