From c16b843eccea038996cb21aec72ee1a5e99228c0 Mon Sep 17 00:00:00 2001 From: Ulf Hermann Date: Mon, 4 Jan 2016 17:02:03 +0100 Subject: QmlProfiler: Remove "Limit to Range" option from statistics view You don't see the range you are limiting to in the statistics view, so I doubt that anyone has ever understood what this does. Change-Id: Ic9da3c1ac067f76d239a931d316a69a3999884a4 Reviewed-by: Joerg Bornemann --- src/plugins/qmlprofiler/qmlprofilerstatisticsview.cpp | 14 -------------- src/plugins/qmlprofiler/qmlprofilerstatisticsview.h | 1 - src/plugins/qmlprofiler/qmlprofilerviewmanager.cpp | 3 +-- 3 files changed, 1 insertion(+), 17 deletions(-) (limited to 'src/plugins') diff --git a/src/plugins/qmlprofiler/qmlprofilerstatisticsview.cpp b/src/plugins/qmlprofiler/qmlprofilerstatisticsview.cpp index a820b9429e..328ad4526e 100644 --- a/src/plugins/qmlprofiler/qmlprofilerstatisticsview.cpp +++ b/src/plugins/qmlprofiler/qmlprofilerstatisticsview.cpp @@ -118,8 +118,6 @@ public: QmlProfilerStatisticsView *q; QmlProfilerTool *m_profilerTool; - QmlProfilerViewManager *m_viewContainer; - QmlProfilerStatisticsMainView *m_eventTree; QmlProfilerStatisticsRelativesView *m_eventChildren; QmlProfilerStatisticsRelativesView *m_eventParents; @@ -191,7 +189,6 @@ static void getSourceLocation(QStandardItem *infoItem, } QmlProfilerStatisticsView::QmlProfilerStatisticsView(QWidget *parent, QmlProfilerTool *profilerTool, - QmlProfilerViewManager *container, QmlProfilerModelManager *profilerModelManager ) : QmlProfilerEventsView(parent), d(new QmlProfilerStatisticsViewPrivate(this)) { @@ -243,7 +240,6 @@ QmlProfilerStatisticsView::QmlProfilerStatisticsView(QWidget *parent, QmlProfile setLayout(groupLayout); d->m_profilerTool = profilerTool; - d->m_viewContainer = container; d->rangeStart = d->rangeEnd = -1; } @@ -274,13 +270,10 @@ QModelIndex QmlProfilerStatisticsView::selectedModelIndex() const void QmlProfilerStatisticsView::contextMenuEvent(QContextMenuEvent *ev) { - QTC_ASSERT(d->m_viewContainer, return;); - QMenu menu; QAction *copyRowAction = 0; QAction *copyTableAction = 0; QAction *showExtendedStatsAction = 0; - QAction *getLocalStatsAction = 0; QAction *getGlobalStatsAction = 0; QPoint position = ev->globalPos(); @@ -304,9 +297,6 @@ void QmlProfilerStatisticsView::contextMenuEvent(QContextMenuEvent *ev) } menu.addSeparator(); - getLocalStatsAction = menu.addAction(tr("Limit to Current Range")); - if (!d->m_viewContainer->hasValidSelection()) - getLocalStatsAction->setEnabled(false); getGlobalStatsAction = menu.addAction(tr("Show Full Range")); if (!isRestrictedToRange()) getGlobalStatsAction->setEnabled(false); @@ -318,10 +308,6 @@ void QmlProfilerStatisticsView::contextMenuEvent(QContextMenuEvent *ev) copyRowToClipboard(); if (selectedAction == copyTableAction) copyTableToClipboard(); - if (selectedAction == getLocalStatsAction) { - restrictToRange(d->m_viewContainer->selectionStart(), - d->m_viewContainer->selectionEnd()); - } if (selectedAction == getGlobalStatsAction) restrictToRange(-1, -1); if (selectedAction == showExtendedStatsAction) diff --git a/src/plugins/qmlprofiler/qmlprofilerstatisticsview.h b/src/plugins/qmlprofiler/qmlprofilerstatisticsview.h index 65be0e67d3..a5665f97c7 100644 --- a/src/plugins/qmlprofiler/qmlprofilerstatisticsview.h +++ b/src/plugins/qmlprofiler/qmlprofilerstatisticsview.h @@ -82,7 +82,6 @@ class QmlProfilerStatisticsView : public QmlProfilerEventsView Q_OBJECT public: explicit QmlProfilerStatisticsView(QWidget *parent, QmlProfilerTool *profilerTool, - QmlProfilerViewManager *container, QmlProfilerModelManager *profilerModelManager); ~QmlProfilerStatisticsView(); diff --git a/src/plugins/qmlprofiler/qmlprofilerviewmanager.cpp b/src/plugins/qmlprofiler/qmlprofilerviewmanager.cpp index e5a324a444..b926f52909 100644 --- a/src/plugins/qmlprofiler/qmlprofilerviewmanager.cpp +++ b/src/plugins/qmlprofiler/qmlprofilerviewmanager.cpp @@ -96,8 +96,7 @@ void QmlProfilerViewManager::createViews() connect(d->traceView, &QmlProfilerTraceView::gotoSourceLocation, this, &QmlProfilerViewManager::gotoSourceLocation); - d->eventsView = new QmlProfilerStatisticsView(mw, d->profilerTool, this, - d->profilerModelManager); + d->eventsView = new QmlProfilerStatisticsView(mw, d->profilerTool, d->profilerModelManager); d->eventsView->setWindowTitle(tr("Statistics")); connect(d->eventsView, &QmlProfilerStatisticsView::gotoSourceLocation, this, &QmlProfilerViewManager::gotoSourceLocation); -- cgit v1.2.1