forked from qt-creator/qt-creator
QmlProfiler: Fix logic in QmlProfilerTool::clientsDisconnected()
We want to do acquiringDone(), no matter if the app died or not. Otherwise we wait forever for more data to arrive if the app has not died. Change-Id: Iad807ad75d7b8aba899211497586e5324124d16a Reviewed-by: hjk <hjk@theqtcompany.com>
This commit is contained in:
@@ -648,25 +648,24 @@ void QmlProfilerTool::restoreFeatureVisibility()
|
|||||||
|
|
||||||
void QmlProfilerTool::clientsDisconnected()
|
void QmlProfilerTool::clientsDisconnected()
|
||||||
{
|
{
|
||||||
// If the application stopped by itself, check if we have all the data
|
|
||||||
if (d->m_profilerState->currentState() == QmlProfilerStateManager::AppDying ||
|
|
||||||
d->m_profilerState->currentState() == QmlProfilerStateManager::Idle) {
|
|
||||||
if (d->m_profilerModelManager->state() == QmlProfilerModelManager::AcquiringData) {
|
if (d->m_profilerModelManager->state() == QmlProfilerModelManager::AcquiringData) {
|
||||||
if (d->m_profilerConnections->aggregateTraces()) {
|
if (d->m_profilerConnections->aggregateTraces()) {
|
||||||
d->m_profilerModelManager->acquiringDone();
|
d->m_profilerModelManager->acquiringDone();
|
||||||
} else {
|
} else {
|
||||||
|
// If the application stopped by itself, check if we have all the data
|
||||||
|
if (d->m_profilerState->currentState() == QmlProfilerStateManager::AppDying ||
|
||||||
|
d->m_profilerState->currentState() == QmlProfilerStateManager::Idle) {
|
||||||
showNonmodalWarning(tr("Application finished before loading profiled data.\n"
|
showNonmodalWarning(tr("Application finished before loading profiled data.\n"
|
||||||
"Please use the stop button instead."));
|
"Please use the stop button instead."));
|
||||||
d->m_profilerModelManager->clear();
|
d->m_profilerModelManager->clear();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// ... and return to the "base" state
|
// ... and return to the "base" state
|
||||||
if (d->m_profilerState->currentState() == QmlProfilerStateManager::AppDying)
|
if (d->m_profilerState->currentState() == QmlProfilerStateManager::AppDying)
|
||||||
d->m_profilerState->setCurrentState(QmlProfilerStateManager::Idle);
|
d->m_profilerState->setCurrentState(QmlProfilerStateManager::Idle);
|
||||||
}
|
}
|
||||||
// If the connection is closed while the app is still running, no special action is needed
|
|
||||||
}
|
|
||||||
|
|
||||||
void addFeatureToMenu(QMenu *menu, ProfileFeature feature, quint64 enabledFeatures)
|
void addFeatureToMenu(QMenu *menu, ProfileFeature feature, quint64 enabledFeatures)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user