aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/qmljs/qmljs.cpp16
-rw-r--r--tools/tools.pro3
2 files changed, 14 insertions, 5 deletions
diff --git a/tools/qmljs/qmljs.cpp b/tools/qmljs/qmljs.cpp
index 44ff37b925..93276c1574 100644
--- a/tools/qmljs/qmljs.cpp
+++ b/tools/qmljs/qmljs.cpp
@@ -32,8 +32,10 @@
#include "private/qv4errorobject_p.h"
#include "private/qv4globalobject_p.h"
#include "private/qv4codegen_p.h"
+#if QT_CONFIG(qml_interpreter)
#include "private/qv4isel_moth_p.h"
#include "private/qv4vme_moth_p.h"
+#endif
#include "private/qv4objectproto_p.h"
#include "private/qv4isel_p.h"
#include "private/qv4mm_p.h"
@@ -43,6 +45,8 @@
#ifdef V4_ENABLE_JIT
# include "private/qv4isel_masm_p.h"
+#else
+QT_REQUIRE_CONFIG(qml_interpreter);
#endif // V4_ENABLE_JIT
#include <QtCore/QCoreApplication>
@@ -61,9 +65,9 @@ using namespace QV4;
struct Print: FunctionObject
{
struct Data : Heap::FunctionObject {
- Data(ExecutionContext *scope)
- : Heap::FunctionObject(scope, QStringLiteral("print"))
+ void init(ExecutionContext *scope)
{
+ Heap::FunctionObject::init(scope, QStringLiteral("print"));
}
};
V4_OBJECT(FunctionObject)
@@ -86,9 +90,9 @@ DEFINE_OBJECT_VTABLE(Print);
struct GC: public FunctionObject
{
struct Data : Heap::FunctionObject {
- Data(ExecutionContext *scope)
- : Heap::FunctionObject(scope, QStringLiteral("gc"))
+ void init(ExecutionContext *scope)
{
+ Heap::FunctionObject::init(scope, QStringLiteral("gc"));
}
};
@@ -150,10 +154,12 @@ int main(int argc, char *argv[])
args.removeFirst();
}
+#if QT_CONFIG(qml_interpreter)
if (args.constFirst() == QLatin1String("--interpret")) {
mode = use_moth;
args.removeFirst();
}
+#endif
if (args.constFirst() == QLatin1String("--qml")) {
runAsQml = true;
@@ -171,7 +177,9 @@ int main(int argc, char *argv[])
case use_moth: {
QV4::EvalISelFactory* iSelFactory = 0;
if (mode == use_moth) {
+#if QT_CONFIG(qml_interpreter)
iSelFactory = new QV4::Moth::ISelFactory;
+#endif
#ifdef V4_ENABLE_JIT
} else {
iSelFactory = new QV4::JIT::ISelFactory;
diff --git a/tools/tools.pro b/tools/tools.pro
index 5f72588a7e..3952ec4b01 100644
--- a/tools/tools.pro
+++ b/tools/tools.pro
@@ -1,4 +1,5 @@
TEMPLATE = subdirs
+QT_FOR_CONFIG += qml-private
SUBDIRS += \
qmlmin \
qmlimportscanner
@@ -11,7 +12,7 @@ qmlimportscanner.CONFIG = host_build
qml \
qmllint
- !contains(QT_CONFIG, no-qml-debug): SUBDIRS += qmlprofiler
+ qtConfig(qml-network):!contains(QT_CONFIG, no-qml-debug): SUBDIRS += qmlprofiler
qtHaveModule(quick) {
!static: {