diff options
author | Kai Koehne <[email protected]> | 2010-09-02 14:40:13 +0200 |
---|---|---|
committer | Kai Koehne <[email protected]> | 2010-09-03 12:29:41 +0200 |
commit | ba82227ae88ed8bc7d92c6f85e42cce4c896962e (patch) | |
tree | bd9b8cb7ec9f70ad248cafbcf21d7e743659d832 /src/tools/qml | |
parent | 580fbb1ae5d26df696cd34d8a7e919587b9a59dc (diff) |
QmlObserver: Disable "Observer" mode when no debugging client is attached
Diffstat (limited to 'src/tools/qml')
-rw-r--r-- | src/tools/qml/qmlobserver/qmlruntime.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/tools/qml/qmlobserver/qmlruntime.cpp b/src/tools/qml/qmlobserver/qmlruntime.cpp index 4ebc3ae7637..58328110b6c 100644 --- a/src/tools/qml/qmlobserver/qmlruntime.cpp +++ b/src/tools/qml/qmlobserver/qmlruntime.cpp @@ -55,6 +55,7 @@ #endif #include <qdeclarativedesignview.h> +#include <qdeclarativedesigndebugserver.h> #include <utils/crumblepath.h> #include "qmlruntime.h" @@ -785,8 +786,10 @@ void QDeclarativeViewer::createMenu() designModeBehaviorAction->setShortcut(QKeySequence("Ctrl+D")); designModeBehaviorAction->setCheckable(true); designModeBehaviorAction->setChecked(canvas->designModeBehavior()); + designModeBehaviorAction->setEnabled(QDeclarativeDesignDebugServer::hasDebuggingClient()); connect(designModeBehaviorAction, SIGNAL(triggered(bool)), this, SLOT(setDesignModeBehavior(bool))); connect(canvas, SIGNAL(designModeBehaviorChanged(bool)), designModeBehaviorAction, SLOT(setChecked(bool))); + connect(QDeclarativeDesignDebugServer::instance(), SIGNAL(debuggingClientChanged(bool)), designModeBehaviorAction, SLOT(setEnabled(bool))); QAction *proxyAction = new QAction(tr("HTTP &Proxy..."), this); connect(proxyAction, SIGNAL(triggered()), this, SLOT(showProxySettings())); |