forked from qt-creator/qt-creator
Debugger: Slim down public QmlInspectorAgent interface
Change-Id: Ia2f728029530dfe4e3f4cc9c18313453f4851bc4 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
This commit is contained in:
@@ -708,11 +708,6 @@ void QmlInspectorAgent::clearObjectTree()
|
|||||||
m_objectWatches.clear();
|
m_objectWatches.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
BaseToolsClient *QmlInspectorAgent::toolsClient() const
|
|
||||||
{
|
|
||||||
return m_toolsClient;
|
|
||||||
}
|
|
||||||
|
|
||||||
void QmlInspectorAgent::clientStateChanged(QmlDebugClient::State state)
|
void QmlInspectorAgent::clientStateChanged(QmlDebugClient::State state)
|
||||||
{
|
{
|
||||||
QString serviceName;
|
QString serviceName;
|
||||||
@@ -805,32 +800,32 @@ void QmlInspectorAgent::selectObjectsFromToolsClient(const QList<int> &debugIds)
|
|||||||
|
|
||||||
void QmlInspectorAgent::onSelectActionTriggered(bool checked)
|
void QmlInspectorAgent::onSelectActionTriggered(bool checked)
|
||||||
{
|
{
|
||||||
QTC_ASSERT(toolsClient(), return);
|
QTC_ASSERT(m_toolsClient, return);
|
||||||
if (checked) {
|
if (checked) {
|
||||||
toolsClient()->setDesignModeBehavior(true);
|
m_toolsClient->setDesignModeBehavior(true);
|
||||||
toolsClient()->changeToSelectTool();
|
m_toolsClient->changeToSelectTool();
|
||||||
m_zoomAction->setChecked(false);
|
m_zoomAction->setChecked(false);
|
||||||
} else {
|
} else {
|
||||||
toolsClient()->setDesignModeBehavior(false);
|
m_toolsClient->setDesignModeBehavior(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void QmlInspectorAgent::onZoomActionTriggered(bool checked)
|
void QmlInspectorAgent::onZoomActionTriggered(bool checked)
|
||||||
{
|
{
|
||||||
QTC_ASSERT(toolsClient(), return);
|
QTC_ASSERT(m_toolsClient, return);
|
||||||
if (checked) {
|
if (checked) {
|
||||||
toolsClient()->setDesignModeBehavior(true);
|
m_toolsClient->setDesignModeBehavior(true);
|
||||||
toolsClient()->changeToZoomTool();
|
m_toolsClient->changeToZoomTool();
|
||||||
m_selectAction->setChecked(false);
|
m_selectAction->setChecked(false);
|
||||||
} else {
|
} else {
|
||||||
toolsClient()->setDesignModeBehavior(false);
|
m_toolsClient->setDesignModeBehavior(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void QmlInspectorAgent::onShowAppOnTopChanged(bool checked)
|
void QmlInspectorAgent::onShowAppOnTopChanged(bool checked)
|
||||||
{
|
{
|
||||||
QTC_ASSERT(toolsClient(), return);
|
QTC_ASSERT(m_toolsClient, return);
|
||||||
toolsClient()->showAppOnTop(checked);
|
m_toolsClient->showAppOnTop(checked);
|
||||||
}
|
}
|
||||||
|
|
||||||
void QmlInspectorAgent::setActiveEngineClient(BaseEngineDebugClient *client)
|
void QmlInspectorAgent::setActiveEngineClient(BaseEngineDebugClient *client)
|
||||||
|
|||||||
@@ -55,25 +55,24 @@ QHash<QPair<QString, int>, QHash<QPair<int, int>, QList<int> > > DebugIdHash;
|
|||||||
class QmlInspectorAgent : public QObject
|
class QmlInspectorAgent : public QObject
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
QmlInspectorAgent(QmlEngine *engine, QmlDebug::QmlDebugConnection *connection);
|
QmlInspectorAgent(QmlEngine *engine, QmlDebug::QmlDebugConnection *connection);
|
||||||
|
|
||||||
void fetchObject(int debugId);
|
|
||||||
quint32 queryExpressionResult(int debugId, const QString &expression);
|
quint32 queryExpressionResult(int debugId, const QString &expression);
|
||||||
|
|
||||||
void assignValue(const WatchItem *data, const QString &expression, const QVariant &valueV);
|
void assignValue(const WatchItem *data, const QString &expression, const QVariant &valueV);
|
||||||
void updateWatchData(const WatchItem &data);
|
void updateWatchData(const WatchItem &data);
|
||||||
void watchDataSelected(qint64 id);
|
void watchDataSelected(qint64 id);
|
||||||
|
|
||||||
|
private:
|
||||||
bool selectObjectInTree(int debugId);
|
bool selectObjectInTree(int debugId);
|
||||||
void addObjectWatch(int objectDebugId);
|
void addObjectWatch(int objectDebugId);
|
||||||
|
|
||||||
QmlDebug::ObjectReference objectForId(int objectDebugId) const;
|
QmlDebug::ObjectReference objectForId(int objectDebugId) const;
|
||||||
QString displayName(int objectDebugId) const;
|
QString displayName(int objectDebugId) const;
|
||||||
void reloadEngines();
|
void reloadEngines();
|
||||||
|
void fetchObject(int debugId);
|
||||||
|
|
||||||
QmlDebug::BaseToolsClient *toolsClient() const;
|
|
||||||
|
|
||||||
private:
|
|
||||||
void updateState();
|
void updateState();
|
||||||
void onResult(quint32 queryId, const QVariant &value, const QByteArray &type);
|
void onResult(quint32 queryId, const QVariant &value, const QByteArray &type);
|
||||||
void newObject(int engineId, int objectId, int parentId);
|
void newObject(int engineId, int objectId, int parentId);
|
||||||
|
|||||||
Reference in New Issue
Block a user