diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2017-10-06 17:30:36 +0200 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2017-11-08 13:18:25 +0000 |
commit | 4e6d5951ed853b236b03ad46ac14649449830d96 (patch) | |
tree | 8ee83435fe83ce38ae0d250b8bb0722f45fad63a /src/qml/jsruntime | |
parent | 7bedd55551fbe95355b0db11f9d576924e829f9d (diff) |
Make qml-debug a proper feature
Change-Id: Iea33ff0200f0bbf43953fedba030edf91d0f1417
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/qml/jsruntime')
-rw-r--r-- | src/qml/jsruntime/jsruntime.pri | 2 | ||||
-rw-r--r-- | src/qml/jsruntime/qv4debugging_p.h | 2 | ||||
-rw-r--r-- | src/qml/jsruntime/qv4engine.cpp | 4 | ||||
-rw-r--r-- | src/qml/jsruntime/qv4engine_p.h | 6 | ||||
-rw-r--r-- | src/qml/jsruntime/qv4profiling_p.h | 4 | ||||
-rw-r--r-- | src/qml/jsruntime/qv4vme_moth.cpp | 8 |
6 files changed, 13 insertions, 13 deletions
diff --git a/src/qml/jsruntime/jsruntime.pri b/src/qml/jsruntime/jsruntime.pri index 9938f60aea..ebdb3d6d03 100644 --- a/src/qml/jsruntime/jsruntime.pri +++ b/src/qml/jsruntime/jsruntime.pri @@ -42,7 +42,7 @@ SOURCES += \ $$PWD/qv4typedarray.cpp \ $$PWD/qv4dataview.cpp -!contains(QT_CONFIG, no-qml-debug): SOURCES += $$PWD/qv4profiling.cpp +qtConfig(qml-debug): SOURCES += $$PWD/qv4profiling.cpp HEADERS += \ $$PWD/qv4global_p.h \ diff --git a/src/qml/jsruntime/qv4debugging_p.h b/src/qml/jsruntime/qv4debugging_p.h index 8e2eec03d2..61a55964ab 100644 --- a/src/qml/jsruntime/qv4debugging_p.h +++ b/src/qml/jsruntime/qv4debugging_p.h @@ -59,7 +59,7 @@ QT_BEGIN_NAMESPACE namespace QV4 { namespace Debugging { -#ifdef QT_NO_QML_DEBUGGER +#if !QT_CONFIG(qml_debug) class Debugger { diff --git a/src/qml/jsruntime/qv4engine.cpp b/src/qml/jsruntime/qv4engine.cpp index 7b298a302c..b5edad69ae 100644 --- a/src/qml/jsruntime/qv4engine.cpp +++ b/src/qml/jsruntime/qv4engine.cpp @@ -518,7 +518,7 @@ ExecutionEngine::~ExecutionEngine() delete [] argumentsAccessors; } -#ifndef QT_NO_QML_DEBUGGER +#if QT_CONFIG(qml_debug) void ExecutionEngine::setDebugger(Debugging::Debugger *debugger) { Q_ASSERT(!m_debugger); @@ -530,7 +530,7 @@ void ExecutionEngine::setProfiler(Profiling::Profiler *profiler) Q_ASSERT(!m_profiler); m_profiler.reset(profiler); } -#endif // QT_NO_QML_DEBUGGER +#endif // QT_CONFIG(qml_debug) void ExecutionEngine::initRootContext() { diff --git a/src/qml/jsruntime/qv4engine_p.h b/src/qml/jsruntime/qv4engine_p.h index 4549cda5b9..e4ac51efed 100644 --- a/src/qml/jsruntime/qv4engine_p.h +++ b/src/qml/jsruntime/qv4engine_p.h @@ -345,7 +345,7 @@ public: ExecutionEngine(EvalISelFactory *iselFactory = 0); ~ExecutionEngine(); -#ifdef QT_NO_QML_DEBUGGER +#if !QT_CONFIG(qml_debug) QV4::Debugging::Debugger *debugger() const { return nullptr; } QV4::Profiling::Profiler *profiler() const { return nullptr; } @@ -357,7 +357,7 @@ public: void setDebugger(Debugging::Debugger *debugger); void setProfiler(Profiling::Profiler *profiler); -#endif // QT_NO_QML_DEBUGGER +#endif // QT_CONFIG(qml_debug) ExecutionContext *pushGlobalContext(); void pushContext(Heap::ExecutionContext *context); @@ -460,7 +460,7 @@ public: private: void failStackLimitCheck(Scope &scope); -#ifndef QT_NO_QML_DEBUGGER +#if QT_CONFIG(qml_debug) QScopedPointer<QV4::Debugging::Debugger> m_debugger; QScopedPointer<QV4::Profiling::Profiler> m_profiler; #endif diff --git a/src/qml/jsruntime/qv4profiling_p.h b/src/qml/jsruntime/qv4profiling_p.h index 9de597ad0e..6b2369e795 100644 --- a/src/qml/jsruntime/qv4profiling_p.h +++ b/src/qml/jsruntime/qv4profiling_p.h @@ -57,7 +57,7 @@ #include <QElapsedTimer> -#ifdef QT_NO_QML_DEBUGGER +#if !QT_CONFIG(qml_debug) #define Q_V4_PROFILE_ALLOC(engine, size, type) (!engine) #define Q_V4_PROFILE_DEALLOC(engine, size, type) (!engine) @@ -305,6 +305,6 @@ Q_DECLARE_METATYPE(QV4::Profiling::FunctionLocationHash) Q_DECLARE_METATYPE(QVector<QV4::Profiling::FunctionCallProperties>) Q_DECLARE_METATYPE(QVector<QV4::Profiling::MemoryAllocationProperties>) -#endif // QT_NO_QML_DEBUGGER +#endif // QT_CONFIG(qml_debug) #endif // QV4PROFILING_H diff --git a/src/qml/jsruntime/qv4vme_moth.cpp b/src/qml/jsruntime/qv4vme_moth.cpp index 5749d0aef3..fdf47e772e 100644 --- a/src/qml/jsruntime/qv4vme_moth.cpp +++ b/src/qml/jsruntime/qv4vme_moth.cpp @@ -144,7 +144,7 @@ Q_QML_EXPORT int qt_v4DebuggerHook(const char *json); } // extern "C" -#ifndef QT_NO_QML_DEBUGGER +#if QT_CONFIG(qml_debug) static int qt_v4BreakpointCount = 0; static bool qt_v4IsDebugging = true; static bool qt_v4IsStepping = false; @@ -287,7 +287,7 @@ static void qt_v4CheckForBreak(QV4::ExecutionContext *context) } } -#endif // QT_NO_QML_DEBUGGER +#endif // QT_CONFIG(qml_debug) // End of debugger interface using namespace QV4; @@ -916,7 +916,7 @@ QV4::ReturnedValue VME::run(ExecutionEngine *engine, const uchar *code) return VALUE(instr.result).asReturnedValue(); MOTH_END_INSTR(Ret) -#ifndef QT_NO_QML_DEBUGGER +#if QT_CONFIG(qml_debug) MOTH_BEGIN_INSTR(Debug) engine->current->lineNumber = instr.lineNumber; QV4::Debugging::Debugger *debugger = engine->debugger(); @@ -931,7 +931,7 @@ QV4::ReturnedValue VME::run(ExecutionEngine *engine, const uchar *code) if (qt_v4IsDebugging) qt_v4CheckForBreak(engine->currentContext); MOTH_END_INSTR(Line) -#endif // QT_NO_QML_DEBUGGER +#endif // QT_CONFIG(qml_debug) MOTH_BEGIN_INSTR(LoadThis) VALUE(instr.result) = engine->currentContext->thisObject(); |