QmlProfiler: Reduce external interface of QQmlProfilerEventsWidget

Change-Id: I06a610cca606b98bc3f5741c1363b98f2b28d7eb
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
This commit is contained in:
Ulf Hermann
2015-12-04 13:02:12 +01:00
parent 01e4ba4a10
commit df4e46ff02
5 changed files with 28 additions and 38 deletions

View File

@@ -253,7 +253,7 @@ void QmlProfilerTraceView::showContextMenu(QPoint position)
getLocalStatsAction->setEnabled(false);
QAction *getGlobalStatsAction = menu.addAction(tr("Show Full Range in Events Pane"));
if (d->m_viewContainer->hasGlobalStats())
if (!d->m_viewContainer->isEventsRestrictedToRange())
getGlobalStatsAction->setEnabled(false);
if (d->m_zoomControl->traceDuration() > 0) {
@@ -269,12 +269,11 @@ void QmlProfilerTraceView::showContextMenu(QPoint position)
d->m_zoomControl->traceEnd());
}
if (selectedAction == getLocalStatsAction) {
d->m_viewContainer->getStatisticsInRange(
d->m_viewContainer->selectionStart(),
d->m_viewContainer->selectionEnd());
d->m_viewContainer->restrictEventsToRange(d->m_viewContainer->selectionStart(),
d->m_viewContainer->selectionEnd());
}
if (selectedAction == getGlobalStatsAction)
d->m_viewContainer->getStatisticsInRange(-1, -1);
d->m_viewContainer->restrictEventsToRange(-1, -1);
}
}