diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2016-07-25 17:20:04 +0200 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2016-07-28 12:59:57 +0000 |
commit | d32319eca446d5583af9081a0056dea4667d6096 (patch) | |
tree | 18c01828f49fbe803bfb6ccc2d490b7f62a55aaa /src/qml/debugger/qqmldebugconnector_p.h | |
parent | 901b975fb5be147b9bb446c7b9f61c2d448a94ab (diff) |
Replace debugger and profiler with stubs on -no-qml-debug
Change-Id: I0f029d92366b3b508bf024c67b877a14bae27cd6
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/debugger/qqmldebugconnector_p.h')
-rw-r--r-- | src/qml/debugger/qqmldebugconnector_p.h | 25 |
1 files changed, 25 insertions, 0 deletions
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 |