forked from qt-creator/qt-creator
QmlProfiler: changed labels in context menu for statistics
Change-Id: I125016944130c7171423e2dec80b2b03832cd282 Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
This commit is contained in:
@@ -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) {
|
||||
|
Reference in New Issue
Block a user