diff options
-rw-r--r-- | src/qml/debugger/debugger.pri | 26 | ||||
-rw-r--r-- | src/qml/debugger/qqmlabstractprofileradapter_p.h | 4 | ||||
-rw-r--r-- | src/qml/debugger/qqmldebug.h | 3 | ||||
-rw-r--r-- | src/qml/debugger/qqmldebugconnector_p.h | 25 | ||||
-rw-r--r-- | src/qml/debugger/qqmldebugservice_p.h | 4 | ||||
-rw-r--r-- | src/qml/debugger/qqmldebugserviceinterfaces_p.h | 43 | ||||
-rw-r--r-- | src/qml/debugger/qqmldebugstatesdelegate_p.h | 7 | ||||
-rw-r--r-- | src/qml/debugger/qqmlmemoryprofiler_p.h | 9 | ||||
-rw-r--r-- | src/qml/debugger/qqmlprofiler_p.h | 56 | ||||
-rw-r--r-- | src/qml/debugger/qqmlprofilerdefinitions_p.h | 4 | ||||
-rw-r--r-- | src/qml/jsruntime/jsruntime.pri | 7 | ||||
-rw-r--r-- | src/qml/jsruntime/qv4debugging_p.h | 15 | ||||
-rw-r--r-- | src/qml/jsruntime/qv4profiling_p.h | 20 | ||||
-rw-r--r-- | src/qml/qml/qqmlobjectcreator.cpp | 9 | ||||
-rw-r--r-- | src/quick/qtquick2.cpp | 7 | ||||
-rw-r--r-- | src/quick/util/qquickprofiler_p.h | 92 | ||||
-rw-r--r-- | src/quick/util/util.pri | 7 | ||||
-rw-r--r-- | src/quickwidgets/quickwidgets.pro | 1 |
18 files changed, 278 insertions, 61 deletions
diff --git a/src/qml/debugger/debugger.pri b/src/qml/debugger/debugger.pri index c893d7b484..74dcb250a8 100644 --- a/src/qml/debugger/debugger.pri +++ b/src/qml/debugger/debugger.pri @@ -1,19 +1,23 @@ -contains(QT_CONFIG, no-qml-debug):DEFINES += QT_NO_QML_DEBUGGER +contains(QT_CONFIG, no-qml-debug) { + DEFINES += QT_NO_QML_DEBUGGER +} else { + HEADERS += \ + $$PWD/qqmldebugpluginmanager_p.h \ + $$PWD/qqmldebugservicefactory_p.h -SOURCES += \ - $$PWD/qqmldebug.cpp \ - $$PWD/qqmldebugconnector.cpp \ - $$PWD/qqmldebugservice.cpp \ - $$PWD/qqmldebugserviceinterfaces.cpp \ - $$PWD/qqmlabstractprofileradapter.cpp \ - $$PWD/qqmlmemoryprofiler.cpp \ - $$PWD/qqmlprofiler.cpp + SOURCES += \ + $$PWD/qqmldebug.cpp \ + $$PWD/qqmldebugconnector.cpp \ + $$PWD/qqmldebugservice.cpp \ + $$PWD/qqmlabstractprofileradapter.cpp \ + $$PWD/qqmlmemoryprofiler.cpp \ + $$PWD/qqmlprofiler.cpp \ + $$PWD/qqmldebugserviceinterfaces.cpp +} HEADERS += \ $$PWD/qqmldebugconnector_p.h \ - $$PWD/qqmldebugpluginmanager_p.h \ $$PWD/qqmldebugservice_p.h \ - $$PWD/qqmldebugservicefactory_p.h \ $$PWD/qqmldebugserviceinterfaces_p.h \ $$PWD/qqmldebugstatesdelegate_p.h \ $$PWD/qqmldebug.h \ diff --git a/src/qml/debugger/qqmlabstractprofileradapter_p.h b/src/qml/debugger/qqmlabstractprofileradapter_p.h index 8820c4311a..6a05a80f37 100644 --- a/src/qml/debugger/qqmlabstractprofileradapter_p.h +++ b/src/qml/debugger/qqmlabstractprofileradapter_p.h @@ -59,6 +59,8 @@ QT_BEGIN_NAMESPACE +#ifndef QT_NO_QML_DEBUGGER + class QQmlProfilerService; class Q_QML_PRIVATE_EXPORT QQmlAbstractProfilerAdapter : public QObject, public QQmlProfilerDefinitions { Q_OBJECT @@ -114,6 +116,8 @@ public: #define QQmlAbstractProfilerAdapterFactory_iid "org.qt-project.Qt.QQmlAbstractProfilerAdapterFactory" +#endif // QT_NO_QML_DEBUGGER + QT_END_NAMESPACE #endif // QQMLABSTRACTPROFILERADAPTER_P_H diff --git a/src/qml/debugger/qqmldebug.h b/src/qml/debugger/qqmldebug.h index 660b9e4d46..fb41039867 100644 --- a/src/qml/debugger/qqmldebug.h +++ b/src/qml/debugger/qqmldebug.h @@ -46,6 +46,7 @@ QT_BEGIN_NAMESPACE +#ifndef QT_NO_QML_DEBUGGER struct Q_QML_EXPORT QQmlDebuggingEnabler { @@ -77,6 +78,8 @@ static QQmlDebuggingEnabler qQmlEnableDebuggingHelper(false); static QQmlDebuggingEnabler qQmlEnableDebuggingHelper(true); #endif +#endif + QT_END_NAMESPACE #endif // QQMLDEBUG_H diff --git a/src/qml/debugger/qqmldebugconnector_p.h b/src/qml/debugger/qqmldebugconnector_p.h index 05755250bd..0d3e2e2e47 100644 --- a/src/qml/debugger/qqmldebugconnector_p.h +++ b/src/qml/debugger/qqmldebugconnector_p.h @@ -59,6 +59,29 @@ QT_BEGIN_NAMESPACE +#ifdef QT_NO_QML_DEBUGGER + +class Q_QML_PRIVATE_EXPORT QQmlDebugConnector +{ +public: + static QQmlDebugConnector *instance() { return nullptr; } + + template<class Service> + static Service *service() { return nullptr; } + + bool hasEngine(QJSEngine *) const { return false; } + void addEngine(QJSEngine *) {} + void removeEngine(QJSEngine *) {} + + bool open(const QVariantHash &configuration = QVariantHash()) + { + Q_UNUSED(configuration); + return false; + } +}; + +#else + class QQmlDebugService; class Q_QML_PRIVATE_EXPORT QQmlDebugConnector : public QObject { @@ -106,6 +129,8 @@ public: #define QQmlDebugConnectorFactory_iid "org.qt-project.Qt.QQmlDebugConnectorFactory" +#endif + QT_END_NAMESPACE #endif // QQMLDEBUGCONNECTOR_H diff --git a/src/qml/debugger/qqmldebugservice_p.h b/src/qml/debugger/qqmldebugservice_p.h index 6b4ef38ef1..42a57a39f2 100644 --- a/src/qml/debugger/qqmldebugservice_p.h +++ b/src/qml/debugger/qqmldebugservice_p.h @@ -58,6 +58,8 @@ QT_BEGIN_NAMESPACE +#ifndef QT_NO_QML_DEBUGGER + class QJSEngine; class QQmlDebugServicePrivate; @@ -101,6 +103,8 @@ signals: void messagesToClient(const QString &name, const QList<QByteArray> &messages); }; +#endif + QT_END_NAMESPACE #endif // QQMLDEBUGSERVICE_H diff --git a/src/qml/debugger/qqmldebugserviceinterfaces_p.h b/src/qml/debugger/qqmldebugserviceinterfaces_p.h index 77fde02386..ca6293c3ec 100644 --- a/src/qml/debugger/qqmldebugserviceinterfaces_p.h +++ b/src/qml/debugger/qqmldebugserviceinterfaces_p.h @@ -62,6 +62,45 @@ QT_BEGIN_NAMESPACE +class QWindow; +class QQuickWindow; + +#ifdef QT_NO_QML_DEBUGGER + +struct QV4DebugService +{ + void signalEmitted(const QString &) {} +}; + +struct QQmlProfilerService +{ + void startProfiling(QJSEngine *engine, quint64 features = std::numeric_limits<quint64>::max()) + { + Q_UNUSED(engine); + Q_UNUSED(features); + } + + void stopProfiling(QJSEngine *) {} +}; + +struct QQmlEngineDebugService +{ + void objectCreated(QJSEngine *, QObject *) {} + virtual void setStatesDelegate(QQmlDebugStatesDelegate *) {} +}; + +struct QQmlInspectorService { + void addWindow(QQuickWindow *) {} + void setParentWindow(QQuickWindow *, QWindow *) {} + void removeWindow(QQuickWindow *) {} +}; + +struct QDebugMessageService {}; +struct QQmlEngineControlService {}; +struct QQmlNativeDebugService {}; + +#else + class Q_QML_PRIVATE_EXPORT QV4DebugService : public QQmlDebugService { Q_OBJECT @@ -117,8 +156,6 @@ protected: QQmlBoundSignal *nextSignal(QQmlBoundSignal *prev) { return prev->m_nextSignal; } }; -class QWindow; -class QQuickWindow; class Q_QML_PRIVATE_EXPORT QQmlInspectorService : public QQmlDebugService { Q_OBJECT @@ -178,6 +215,8 @@ protected: static const QString s_key; }; +#endif + QT_END_NAMESPACE #endif // QQMLDEBUGSERVICEINTERFACES_P_H diff --git a/src/qml/debugger/qqmldebugstatesdelegate_p.h b/src/qml/debugger/qqmldebugstatesdelegate_p.h index 42c4e94b50..95f727fb2d 100644 --- a/src/qml/debugger/qqmldebugstatesdelegate_p.h +++ b/src/qml/debugger/qqmldebugstatesdelegate_p.h @@ -57,6 +57,11 @@ QT_BEGIN_NAMESPACE +#ifdef QT_NO_QML_DEBUGGER + +class QQmlDebugStatesDelegate {}; + +#else class QQmlContext; class QQmlProperty; @@ -90,6 +95,8 @@ private: Q_DISABLE_COPY(QQmlDebugStatesDelegate) }; +#endif + QT_END_NAMESPACE #endif // QQMLDEBUGSTATESDELEGATE_P_H diff --git a/src/qml/debugger/qqmlmemoryprofiler_p.h b/src/qml/debugger/qqmlmemoryprofiler_p.h index 4b0ba823ba..59f08704ca 100644 --- a/src/qml/debugger/qqmlmemoryprofiler_p.h +++ b/src/qml/debugger/qqmlmemoryprofiler_p.h @@ -55,6 +55,13 @@ QT_BEGIN_NAMESPACE +#ifdef QT_NO_QML_DEBUGGER + +#define QML_MEMORY_SCOPE_URL(url) +#define QML_MEMORY_SCOPE_STRING(s) + +#else + class QUrl; class Q_QML_PRIVATE_EXPORT QQmlMemoryScope @@ -83,5 +90,7 @@ public: #define QML_MEMORY_SCOPE_URL(url) QQmlMemoryScope _qml_memory_scope(url) #define QML_MEMORY_SCOPE_STRING(s) QQmlMemoryScope _qml_memory_scope(s) +#endif + QT_END_NAMESPACE #endif // QQMLMEMORYPROFILER_H diff --git a/src/qml/debugger/qqmlprofiler_p.h b/src/qml/debugger/qqmlprofiler_p.h index 08606814a9..483252df6d 100644 --- a/src/qml/debugger/qqmlprofiler_p.h +++ b/src/qml/debugger/qqmlprofiler_p.h @@ -63,6 +63,54 @@ QT_BEGIN_NAMESPACE +#ifdef QT_NO_QML_DEBUGGER + +#define Q_QML_PROFILE_IF_ENABLED(feature, profiler, Code) +#define Q_QML_PROFILE(feature, profiler, Method) +#define Q_QML_OC_PROFILE(member, Code) + +struct QQmlProfiler {}; + +struct QQmlBindingProfiler +{ + QQmlBindingProfiler(QQmlProfiler *, QQmlBinding *, QV4::FunctionObject *) {} +}; + +struct QQmlHandlingSignalProfiler +{ + QQmlHandlingSignalProfiler(QQmlProfiler *, QQmlBoundSignalExpression *) {} +}; + +struct QQmlCompilingProfiler +{ + QQmlCompilingProfiler(QQmlProfiler *, QQmlDataBlob *) {} +}; + +struct QQmlVmeProfiler { + QQmlVmeProfiler() {} + + void init(QQmlProfiler *, int) {} + + const QV4::CompiledData::Object *pop() { return nullptr; } + void push(const QV4::CompiledData::Object *) {} + + static const quintptr profiler = 0; +}; + +struct QQmlObjectCreationProfiler +{ + QQmlObjectCreationProfiler(quintptr, const QV4::CompiledData::Object *) {} + void update(QV4::CompiledData::CompilationUnit *, const QV4::CompiledData::Object *, + const QString &, const QUrl &) {} +}; + +struct QQmlObjectCompletionProfiler +{ + QQmlObjectCompletionProfiler(QQmlVmeProfiler *) {} +}; + +#else + #define Q_QML_PROFILE_IF_ENABLED(feature, profiler, Code)\ if (profiler && (profiler->featuresEnabled & (1 << feature))) {\ Code;\ @@ -72,6 +120,9 @@ QT_BEGIN_NAMESPACE #define Q_QML_PROFILE(feature, profiler, Method)\ Q_QML_PROFILE_IF_ENABLED(feature, profiler, profiler->Method) +#define Q_QML_OC_PROFILE(member, Code)\ + Q_QML_PROFILE_IF_ENABLED(QQmlProfilerDefinitions::ProfileCreating, member.profiler, Code) + // This struct is somewhat dangerous to use: // The messageType is a bit field. You can pack multiple messages into // one object, e.g. RangeStart and RangeLocation. Each one will be read @@ -348,9 +399,6 @@ private: QFiniteStack<const QV4::CompiledData::Object *> ranges; }; -#define Q_QML_OC_PROFILE(member, Code)\ - Q_QML_PROFILE_IF_ENABLED(QQmlProfilerDefinitions::ProfileCreating, member.profiler, Code) - class QQmlObjectCreationProfiler { public: @@ -398,4 +446,6 @@ QT_END_NAMESPACE Q_DECLARE_METATYPE(QVector<QQmlProfilerData>) Q_DECLARE_METATYPE(QQmlProfiler::LocationHash) +#endif // QT_NO_QML_DEBUGGER + #endif // QQMLPROFILER_P_H diff --git a/src/qml/debugger/qqmlprofilerdefinitions_p.h b/src/qml/debugger/qqmlprofilerdefinitions_p.h index 2b2eda22e1..c6ae4593a9 100644 --- a/src/qml/debugger/qqmlprofilerdefinitions_p.h +++ b/src/qml/debugger/qqmlprofilerdefinitions_p.h @@ -56,6 +56,8 @@ QT_BEGIN_NAMESPACE +#ifndef QT_NO_QML_DEBUGGER + struct QQmlProfilerDefinitions { enum Message { Event, @@ -161,6 +163,8 @@ struct QQmlProfilerDefinitions { }; }; +#endif // QT_NO_QML_DEBUGGER + QT_END_NAMESPACE #endif diff --git a/src/qml/jsruntime/jsruntime.pri b/src/qml/jsruntime/jsruntime.pri index 6bd18dabb5..cf434ee2ed 100644 --- a/src/qml/jsruntime/jsruntime.pri +++ b/src/qml/jsruntime/jsruntime.pri @@ -39,11 +39,16 @@ SOURCES += \ $$PWD/qv4include.cpp \ $$PWD/qv4qobjectwrapper.cpp \ $$PWD/qv4vme_moth.cpp \ - $$PWD/qv4profiling.cpp \ $$PWD/qv4arraybuffer.cpp \ $$PWD/qv4typedarray.cpp \ $$PWD/qv4dataview.cpp +!contains(QT_CONFIG, no-qml-debug) { + SOURCES += $$PWD/qv4profiling.cpp +} else { + DEFINES += QT_NO_QML_DEBUGGER +} + HEADERS += \ $$PWD/qv4global_p.h \ $$PWD/qv4engine_p.h \ diff --git a/src/qml/jsruntime/qv4debugging_p.h b/src/qml/jsruntime/qv4debugging_p.h index 9dca7e9979..3b589a41f1 100644 --- a/src/qml/jsruntime/qv4debugging_p.h +++ b/src/qml/jsruntime/qv4debugging_p.h @@ -59,6 +59,19 @@ QT_BEGIN_NAMESPACE namespace QV4 { namespace Debugging { +#ifdef QT_NO_QML_DEBUGGER + +struct Debugger +{ + bool pauseAtNextOpportunity() const { return false; } + void maybeBreakAtInstruction() {} + void enteringFunction() {} + void leavingFunction(const ReturnedValue &) {} + void aboutToThrow() {} +}; + +#else + class Q_QML_EXPORT Debugger : public QObject { Q_OBJECT @@ -72,6 +85,8 @@ public: virtual void aboutToThrow() = 0; }; +#endif // QT_NO_QML_DEBUGGING + } // namespace Debugging } // namespace QV4 diff --git a/src/qml/jsruntime/qv4profiling_p.h b/src/qml/jsruntime/qv4profiling_p.h index c684d48368..fd14c0ae93 100644 --- a/src/qml/jsruntime/qv4profiling_p.h +++ b/src/qml/jsruntime/qv4profiling_p.h @@ -57,8 +57,24 @@ #include <QElapsedTimer> +#ifdef QT_NO_QML_DEBUGGER + +#define Q_V4_PROFILE_ALLOC(engine, size, type) (!engine) +#define Q_V4_PROFILE_DEALLOC(engine, size, type) (!engine) +#define Q_V4_PROFILE(engine, function) (function->code(engine, function->codeData)) + QT_BEGIN_NAMESPACE +namespace QV4 { +namespace Profiling { +struct Profiler {}; +} +} + +QT_END_NAMESPACE + +#else + #define Q_V4_PROFILE_ALLOC(engine, size, type)\ (engine->profiler &&\ (engine->profiler->featuresEnabled & (1 << Profiling::FeatureMemoryAllocation)) ?\ @@ -75,6 +91,8 @@ QT_BEGIN_NAMESPACE Profiling::FunctionCallProfiler::profileCall(engine->profiler, engine, function) :\ function->code(engine, function->codeData)) +QT_BEGIN_NAMESPACE + namespace QV4 { namespace Profiling { @@ -288,4 +306,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 // QV4PROFILING_H diff --git a/src/qml/qml/qqmlobjectcreator.cpp b/src/qml/qml/qqmlobjectcreator.cpp index 87212ef713..4e98e04ce4 100644 --- a/src/qml/qml/qqmlobjectcreator.cpp +++ b/src/qml/qml/qqmlobjectcreator.cpp @@ -89,9 +89,12 @@ QQmlObjectCreator::QQmlObjectCreator(QQmlContextData *parentContext, QV4::Compil sharedState->creationContext = creationContext; sharedState->rootContext = 0; - QQmlProfiler *profiler = QQmlEnginePrivate::get(engine)->profiler; - Q_QML_PROFILE_IF_ENABLED(QQmlProfilerDefinitions::ProfileCreating, profiler, - sharedState->profiler.init(profiler, compilationUnit->totalParserStatusCount)); + if (QQmlProfiler *profiler = QQmlEnginePrivate::get(engine)->profiler) { + Q_QML_PROFILE_IF_ENABLED(QQmlProfilerDefinitions::ProfileCreating, profiler, + sharedState->profiler.init(profiler, compilationUnit->totalParserStatusCount)); + } else { + Q_UNUSED(profiler); + } } QQmlObjectCreator::QQmlObjectCreator(QQmlContextData *parentContext, QV4::CompiledData::CompilationUnit *compilationUnit, QQmlObjectCreatorSharedState *inheritedSharedState) diff --git a/src/quick/qtquick2.cpp b/src/quick/qtquick2.cpp index ca12155e63..c36adf56ec 100644 --- a/src/quick/qtquick2.cpp +++ b/src/quick/qtquick2.cpp @@ -62,6 +62,12 @@ static void initResources() QT_BEGIN_NAMESPACE +#ifdef QT_NO_QML_DEBUGGER + +class QQmlQtQuick2DebugStatesDelegate : public QQmlDebugStatesDelegate {}; + +#else + class QQmlQtQuick2DebugStatesDelegate : public QQmlDebugStatesDelegate { public: @@ -174,6 +180,7 @@ void QQmlQtQuick2DebugStatesDelegate::resetBindingForInvalidProperty(QObject *ob } } +#endif // QT_NO_QML_DEBUGGER void QQmlQtQuick2Module::defineModule() { diff --git a/src/quick/util/qquickprofiler_p.h b/src/quick/util/qquickprofiler_p.h index 480a2ac3fb..66ed212722 100644 --- a/src/quick/util/qquickprofiler_p.h +++ b/src/quick/util/qquickprofiler_p.h @@ -62,52 +62,22 @@ QT_BEGIN_NAMESPACE +#ifdef QT_NO_QML_DEBUGGER + +#define Q_QUICK_PROFILE_IF_ENABLED(feature, Code) + +struct QQuickProfiler { + static void registerAnimationCallback() {} +}; + +#else + #define Q_QUICK_PROFILE_IF_ENABLED(feature, Code)\ if (QQuickProfiler::featuresEnabled & (1 << feature)) {\ Code;\ } else\ (void)0 -#define Q_QUICK_PROFILE(feature, Method)\ - Q_QUICK_PROFILE_IF_ENABLED(feature, QQuickProfiler::Method) - -#define Q_QUICK_SG_PROFILE_START(Type)\ - Q_QUICK_PROFILE_IF_ENABLED(QQuickProfiler::ProfileSceneGraph,\ - (QQuickProfiler::startSceneGraphFrame<Type>())) - -#define Q_QUICK_SG_PROFILE_RECORD(Type)\ - Q_QUICK_PROFILE_IF_ENABLED(QQuickProfiler::ProfileSceneGraph,\ - (QQuickProfiler::recordSceneGraphTimestamp<Type>())) - -#define Q_QUICK_SG_PROFILE_SKIP(Type, Skip)\ - Q_QUICK_PROFILE_IF_ENABLED(QQuickProfiler::ProfileSceneGraph,\ - (QQuickProfiler::skipSceneGraphTimestamps<Type, Skip>())) - -#define Q_QUICK_SG_PROFILE_START_SYNCHRONIZED(Type1, Type2)\ - Q_QUICK_PROFILE_IF_ENABLED(QQuickProfiler::ProfileSceneGraph,\ - (QQuickProfiler::startSceneGraphFrame<Type1, Type2>())) - -#define Q_QUICK_SG_PROFILE_SWITCH(Type1, Type2) \ - Q_QUICK_PROFILE_IF_ENABLED(QQuickProfiler::ProfileSceneGraph,\ - (QQuickProfiler::reportSceneGraphFrame<Type1, true, Type2>())) - -#define Q_QUICK_SG_PROFILE_REPORT(Type)\ - Q_QUICK_PROFILE_IF_ENABLED(QQuickProfiler::ProfileSceneGraph,\ - (QQuickProfiler::reportSceneGraphFrame<Type, false>())) - -#define Q_QUICK_SG_PROFILE_END(Type)\ - Q_QUICK_PROFILE_IF_ENABLED(QQuickProfiler::ProfileSceneGraph,\ - (QQuickProfiler::reportSceneGraphFrame<Type, true>())) - -#define Q_QUICK_SG_PROFILE_END_WITH_PAYLOAD(Type, Payload)\ - Q_QUICK_PROFILE_IF_ENABLED(QQuickProfiler::ProfileSceneGraph,\ - (QQuickProfiler::reportSceneGraphFrame<Type, true>(Payload))) - - -#define Q_QUICK_INPUT_PROFILE(Type, DetailType, A, B)\ - Q_QUICK_PROFILE_IF_ENABLED(QQuickProfiler::ProfileInputEvents,\ - (QQuickProfiler::inputEvent<Type, DetailType>(A, B))) - // This struct is somewhat dangerous to use: // You can save values either with 32 or 64 bit precision. toByteArrays will // guess the precision from messageType. If you state the wrong messageType @@ -351,6 +321,48 @@ protected: void setTimer(const QElapsedTimer &t); }; +#endif // QT_NO_QML_DEBUGGER + +#define Q_QUICK_PROFILE(feature, Method)\ + Q_QUICK_PROFILE_IF_ENABLED(feature, QQuickProfiler::Method) + +#define Q_QUICK_SG_PROFILE_START(Type)\ + Q_QUICK_PROFILE_IF_ENABLED(QQuickProfiler::ProfileSceneGraph,\ + (QQuickProfiler::startSceneGraphFrame<Type>())) + +#define Q_QUICK_SG_PROFILE_RECORD(Type)\ + Q_QUICK_PROFILE_IF_ENABLED(QQuickProfiler::ProfileSceneGraph,\ + (QQuickProfiler::recordSceneGraphTimestamp<Type>())) + +#define Q_QUICK_SG_PROFILE_SKIP(Type, Skip)\ + Q_QUICK_PROFILE_IF_ENABLED(QQuickProfiler::ProfileSceneGraph,\ + (QQuickProfiler::skipSceneGraphTimestamps<Type, Skip>())) + +#define Q_QUICK_SG_PROFILE_START_SYNCHRONIZED(Type1, Type2)\ + Q_QUICK_PROFILE_IF_ENABLED(QQuickProfiler::ProfileSceneGraph,\ + (QQuickProfiler::startSceneGraphFrame<Type1, Type2>())) + +#define Q_QUICK_SG_PROFILE_SWITCH(Type1, Type2) \ + Q_QUICK_PROFILE_IF_ENABLED(QQuickProfiler::ProfileSceneGraph,\ + (QQuickProfiler::reportSceneGraphFrame<Type1, true, Type2>())) + +#define Q_QUICK_SG_PROFILE_REPORT(Type)\ + Q_QUICK_PROFILE_IF_ENABLED(QQuickProfiler::ProfileSceneGraph,\ + (QQuickProfiler::reportSceneGraphFrame<Type, false>())) + +#define Q_QUICK_SG_PROFILE_END(Type)\ + Q_QUICK_PROFILE_IF_ENABLED(QQuickProfiler::ProfileSceneGraph,\ + (QQuickProfiler::reportSceneGraphFrame<Type, true>())) + +#define Q_QUICK_SG_PROFILE_END_WITH_PAYLOAD(Type, Payload)\ + Q_QUICK_PROFILE_IF_ENABLED(QQuickProfiler::ProfileSceneGraph,\ + (QQuickProfiler::reportSceneGraphFrame<Type, true>(Payload))) + + +#define Q_QUICK_INPUT_PROFILE(Type, DetailType, A, B)\ + Q_QUICK_PROFILE_IF_ENABLED(QQuickProfiler::ProfileInputEvents,\ + (QQuickProfiler::inputEvent<Type, DetailType>(A, B))) + QT_END_NAMESPACE #endif diff --git a/src/quick/util/util.pri b/src/quick/util/util.pri index ffb31ae75e..2c31f6feed 100644 --- a/src/quick/util/util.pri +++ b/src/quick/util/util.pri @@ -26,12 +26,17 @@ SOURCES += \ $$PWD/qquickanimator.cpp \ $$PWD/qquickanimatorjob.cpp \ $$PWD/qquickanimatorcontroller.cpp \ - $$PWD/qquickprofiler.cpp \ $$PWD/qquickfontmetrics.cpp \ $$PWD/qquicktextmetrics.cpp \ $$PWD/qquickshortcut.cpp \ $$PWD/qquickvalidator.cpp +contains(QT_CONFIG, no-qml-debug) { + DEFINES += QT_NO_QML_DEBUGGER +} else { + SOURCES += $$PWD/qquickprofiler.cpp +} + HEADERS += \ $$PWD/qquickapplication_p.h\ $$PWD/qquickutilmodule_p.h\ diff --git a/src/quickwidgets/quickwidgets.pro b/src/quickwidgets/quickwidgets.pro index 87409e31c5..0e45e63307 100644 --- a/src/quickwidgets/quickwidgets.pro +++ b/src/quickwidgets/quickwidgets.pro @@ -3,6 +3,7 @@ TARGET = QtQuickWidgets QT = core-private gui-private qml-private quick-private widgets-private DEFINES += QT_NO_URL_CAST_FROM_STRING QT_NO_INTEGER_EVENT_COORDINATES +contains(QT_CONFIG, no-qml-debug): DEFINES += QT_NO_QML_DEBUGGER HEADERS += \ qquickwidget.h \ |