void ClientProxy::connectToServer()
{
- m_engineClient = new QDeclarativeEngineDebug(m_adapter->connection(), this);
+ m_engineClient = new QDeclarativeEngineDebug(m_adapter.data()->connection(), this);
connect(m_engineClient, SIGNAL(newObjects()), this, SLOT(newObjects()));
- m_inspectorClient = new QmlJSInspectorClient(m_adapter->connection(), this);
+ m_inspectorClient = new QmlJSInspectorClient(m_adapter.data()->connection(), this);
connect(m_inspectorClient, SIGNAL(connectedStatusChanged(QDeclarativeDebugClient::Status)),
this, SLOT(clientStatusChanged(QDeclarativeDebugClient::Status)));
connect(m_inspectorClient, SIGNAL(selectedColorChanged(QColor)),
SIGNAL(selectedColorChanged(QColor)));
connect(m_inspectorClient, SIGNAL(logActivity(QString,QString)),
- m_adapter, SLOT(logServiceActivity(QString,QString)));
+ m_adapter.data(), SLOT(logServiceActivity(QString,QString)));
updateConnected();
}
serviceName = client->name();
}
- m_adapter->logServiceStatusChange(serviceName, status);
+ if (m_adapter)
+ m_adapter.data()->logServiceStatusChange(serviceName, status);
updateConnected();
}
}
msg += message;
- m_adapter->logServiceActivity("QDeclarativeDebug", msg);
+ if (m_adapter)
+ m_adapter.data()->logServiceActivity("QDeclarativeDebug", msg);
}
QList<QDeclarativeDebugObjectReference> QmlJSInspector::Internal::ClientProxy::rootObjectReference() const
if (!isConnected())
return 0;
- bool block = m_adapter->disableJsDebugging(true);
+ bool block = false;
+ if (m_adapter)
+ block = m_adapter.data()->disableJsDebugging(true);
log(LogSend, QString("EVAL_EXPRESSION %1 %2").arg(QString::number(objectDebugId), expr));
QDeclarativeDebugExpressionQuery *query
= m_engineClient->queryExpressionResult(objectDebugId, expr, m_engineClient);
- m_adapter->disableJsDebugging(block);
+ if (m_adapter)
+ m_adapter.data()->disableJsDebugging(block);
return query;
}
Debugger::QmlAdapter *ClientProxy::qmlAdapter() const
{
- return m_adapter;
+ return m_adapter.data();
}
bool ClientProxy::isConnected() const