Skip to content
Snippets Groups Projects
Commit 8049a027 authored by Kai Koehne's avatar Kai Koehne
Browse files

QmlJSInspector: Fix disconnect() warnings on users app shutdown

Don't try to disconnect from the proxy if you haven't been connected
before, e.g. because the QmlJSObserverService is missing.

Reviewed-by: Christiaan Janssen
parent a60960cf
No related branches found
No related tags found
No related merge requests found
...@@ -261,6 +261,11 @@ void InspectorUi::debugQueryUpdated(QDeclarativeDebugQuery::State newState) ...@@ -261,6 +261,11 @@ void InspectorUi::debugQueryUpdated(QDeclarativeDebugQuery::State newState)
disconnect(m_debugQuery,SIGNAL(stateChanged(QDeclarativeDebugQuery::State)),this,SLOT(debugQueryUpdated(QDeclarativeDebugQuery::State))); disconnect(m_debugQuery,SIGNAL(stateChanged(QDeclarativeDebugQuery::State)),this,SLOT(debugQueryUpdated(QDeclarativeDebugQuery::State)));
} }
bool InspectorUi::isConnected() const
{
return m_clientProxy;
}
void InspectorUi::connected(ClientProxy *clientProxy) void InspectorUi::connected(ClientProxy *clientProxy)
{ {
m_clientProxy = clientProxy; m_clientProxy = clientProxy;
......
...@@ -103,6 +103,7 @@ public: ...@@ -103,6 +103,7 @@ public:
bool isShadowBuildProject() const; bool isShadowBuildProject() const;
void setupUi(); void setupUi();
bool isConnected() const;
void connected(ClientProxy *clientProxy); void connected(ClientProxy *clientProxy);
void disconnected(); void disconnected();
void setDebuggerEngine(Debugger::QmlEngine *qmlEngine); void setDebuggerEngine(Debugger::QmlEngine *qmlEngine);
......
...@@ -140,7 +140,8 @@ void InspectorPlugin::objectAdded(QObject *object) ...@@ -140,7 +140,8 @@ void InspectorPlugin::objectAdded(QObject *object)
void InspectorPlugin::aboutToRemoveObject(QObject *obj) void InspectorPlugin::aboutToRemoveObject(QObject *obj)
{ {
if (m_clientProxy && m_clientProxy->qmlAdapter() == obj) { if (m_clientProxy && m_clientProxy->qmlAdapter() == obj) {
m_inspectorUi->disconnected(); if (m_inspectorUi->isConnected())
m_inspectorUi->disconnected();
delete m_clientProxy; delete m_clientProxy;
m_clientProxy = 0; m_clientProxy = 0;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment