Made qml inspector look nicer and clear its contents upon close

This commit is contained in:
Lasse Holmstedt
2010-03-18 12:20:07 +01:00
parent c7049d80f2
commit cf5bd6de4e
4 changed files with 48 additions and 15 deletions

View File

@@ -234,6 +234,9 @@ void QmlInspector::connectionStateChanged()
m_engineQuery = 0;
delete m_contextQuery;
m_contextQuery = 0;
resetViews();
break;
}
case QAbstractSocket::HostLookupState:
@@ -254,10 +257,7 @@ void QmlInspector::connectionStateChanged()
m_expressionWidget->setEngineDebug(m_client);
}
m_objectTreeWidget->clear();
m_propertiesWidget->clear();
m_expressionWidget->clear();
m_watchTableModel->removeAllWatches();
resetViews();
m_frameRateWidget->reset(m_conn);
reloadEngines();
@@ -272,6 +272,14 @@ void QmlInspector::connectionStateChanged()
}
}
void QmlInspector::resetViews()
{
m_objectTreeWidget->clear();
m_propertiesWidget->clear();
m_expressionWidget->clear();
m_watchTableModel->removeAllWatches();
}
Core::IContext *QmlInspector::context() const
{
return m_context;