diff options
author | Ulf Hermann <ulf.hermann@theqtcompany.com> | 2014-12-12 14:53:09 +0100 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@theqtcompany.com> | 2015-01-12 11:38:27 +0100 |
commit | 63d96936558cb3b3e167df4a99acb485320f8dc6 (patch) | |
tree | f6dcd7035ba863558ba6844db346931de7388ea0 | |
parent | ae4caf52bcb621bca6c9727c8f97d46b30998570 (diff) |
Disallow QQmlDebugServer::enable for QT_QML_NO_DEBUGGER
This mirrors the behavior of the QQmlDebugServer constructor.
Unfortunately we have two #defines to disable the debug server,
QT_QML_NO_DEBUGGER and QQML_NO_DEBUG_PROTOCOL. We should honor both of
them as people might rely on either of them to effectively prevent the
debug server from working.
Change-Id: I0bc0d48632eaa05c471d0afed6fc48436116746a
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
-rw-r--r-- | src/qml/debugger/qqmldebugserver.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/qml/debugger/qqmldebugserver.cpp b/src/qml/debugger/qqmldebugserver.cpp index 9715b5c8d4..e85929ac77 100644 --- a/src/qml/debugger/qqmldebugserver.cpp +++ b/src/qml/debugger/qqmldebugserver.cpp @@ -732,6 +732,7 @@ void QQmlDebugServer::sendMessages(QQmlDebugService *service, bool QQmlDebugServer::enable(int portFrom, int portTo, bool block, const QString &hostAddress) { +#ifndef QT_QML_NO_DEBUGGER QQmlDebugServerInstanceWrapper *wrapper = debugServerInstance(); if (!wrapper) return false; @@ -745,6 +746,13 @@ bool QQmlDebugServer::enable(int portFrom, int portTo, bool block, const QString return false; } return true; +#else + Q_UNUSED(portFrom); + Q_UNUSED(portTo); + Q_UNUSED(block); + Q_UNUSED(hostAddress); + return false; +#endif } void QQmlDebugServer::wakeEngine(QQmlEngine *engine) |