Commit 0e476646 authored by Christiaan Janssen's avatar Christiaan Janssen
Browse files

QmlDebugger: bypassing jsdebugger stop when querying expressions

Reviewed-by: Kai Koehne
parent c3ff7fa7
......@@ -357,6 +357,7 @@ private:
// Wrapper engine needs access to state of its subengines.
friend class Internal::QmlCppEngine;
friend class Internal::DebuggerPluginPrivate;
friend class QmlAdapter;
virtual void setState(DebuggerState state, bool forced = false);
......
......@@ -273,6 +273,25 @@ void QmlAdapter::setConnectionAttemptInterval(int interval)
d->m_connectionTimer.setInterval(interval);
}
bool QmlAdapter::disableJsDebugging(bool block)
{
if (d->m_engine.isNull())
return block;
bool isBlocked = d->m_engine.data()->state() == InferiorRunOk;
if (isBlocked == block)
return block;
if (block)
d->m_engine.data()->continueInferior();
else
d->m_engine.data()->requestInterruptInferior();
return isBlocked;
}
void QmlAdapter::logServiceStatusChange(const QString &service, QDeclarativeDebugClient::Status newStatus)
{
switch (newStatus) {
......
......@@ -76,6 +76,8 @@ public:
void setMaxConnectionAttempts(int maxAttempts);
void setConnectionAttemptInterval(int interval);
bool disableJsDebugging(bool block);
public slots:
void logServiceStatusChange(const QString &service, QDeclarativeDebugClient::Status newStatus);
void logServiceActivity(const QString &service, const QString &logMessage);
......
......@@ -322,8 +322,12 @@ QDeclarativeDebugExpressionQuery *ClientProxy::queryExpressionResult(int objectD
{
if (debug)
qDebug() << "queryExpressionResult():" << objectDebugId << expr << parent;
if (objectDebugId != -1)
return m_engineClient->queryExpressionResult(objectDebugId,expr,parent);
if (objectDebugId != -1) {
bool block = m_adapter->disableJsDebugging(true);
QDeclarativeDebugExpressionQuery *query = m_engineClient->queryExpressionResult(objectDebugId,expr,parent);
m_adapter->disableJsDebugging(block);
return query;
}
return 0;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment