forked from qt-creator/qt-creator
QmlProfiler: Reduce external interface of QQmlProfilerEventsWidget
Change-Id: I06a610cca606b98bc3f5741c1363b98f2b28d7eb Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user