QmlProfiler: changed labels in context menu for statistics

Change-Id: I125016944130c7171423e2dec80b2b03832cd282
Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
This commit is contained in:
Christiaan Janssen
2011-11-10 11:19:22 +01:00
parent d09b3b903d
commit efa7e7a43a
3 changed files with 29 additions and 7 deletions

View File

@@ -192,6 +192,16 @@ void QmlProfilerTool::showContextMenu(const QPoint &position)
copyTableAction = menu.addAction(tr("Copy Table"));
}
if (sender() == d->m_traceWindow || sender() == d->m_eventsView) {
menu.addSeparator();
getLocalStatsAction = menu.addAction(tr("Limit Events Pane to Current Range"));
if (!d->m_traceWindow->hasValidSelection())
getLocalStatsAction->setEnabled(false);
getGlobalStatsAction = menu.addAction(tr("Reset Events Pane"));
if (d->m_eventsView->hasGlobalStats())
getGlobalStatsAction->setEnabled(false);
}
if (traceView) {
if (traceView->getEventList()->count() > 0) {
menu.addSeparator();
@@ -199,13 +209,6 @@ void QmlProfilerTool::showContextMenu(const QPoint &position)
}
}
if (sender() == d->m_traceWindow || sender() == d->m_eventsView) {
menu.addSeparator();
if (d->m_traceWindow->hasValidSelection())
getLocalStatsAction = menu.addAction(tr("Get Stats For Current Range"));
getGlobalStatsAction = menu.addAction(tr("Get Global Statistics"));
}
QAction *selectedAction = menu.exec(position);
if (selectedAction) {