QmlJSInspector: Disable Zoom Tool for QmlDebugger

Zoom Tool and Select Tool are combined for QmlDebugger.
The Zoom Tool is enabled only for backwards compatibility.

Change-Id: Id66eb94ce0535ccac169fa5a80f937370a0f9f6f
Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
This commit is contained in:
Aurindam Jana
2012-04-02 10:30:29 +02:00
parent 1074f9a5e1
commit e32f2d7ffd
8 changed files with 32 additions and 7 deletions

View File

@@ -50,6 +50,7 @@
#include <debugger/qml/qmlengine.h>
#include <debugger/debuggerstartparameters.h>
#include <debugger/qml/qmladapter.h>
#include <qmljsdebugclient/qmljsdebugclientconstants.h>
#include <utils/filterlineedit.h>
#include <utils/qtcassert.h>
@@ -315,7 +316,12 @@ void InspectorUi::connected(ClientProxy *clientProxy)
if (m_clientProxy)
connect(m_clientProxy, SIGNAL(result(quint32,QVariant)),
SLOT(onResult(quint32,QVariant)));
using namespace QmlJsDebugClient::Constants;
if (m_clientProxy->qmlDebugger()->objectName() == QML_DEBUGGER &&
m_clientProxy->qmlDebugger()->serviceVersion() >= CURRENT_SUPPORTED_VERSION)
m_toolBar->setZoomToolEnabled(false);
else
m_toolBar->setZoomToolEnabled(true);
QmlJS::Snapshot snapshot = modelManager()->snapshot();
for (QHash<QString, QmlJSLiveTextPreview *>::const_iterator it = m_textPreviews.constBegin();
it != m_textPreviews.constEnd(); ++it) {