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 <joerg.bornemann@theqtcompany.com>
This commit is contained in:
Ulf Hermann
2016-01-04 17:02:03 +01:00
parent 3cd2d375ff
commit c16b843ecc
3 changed files with 1 additions and 17 deletions

View File

@@ -118,8 +118,6 @@ public:
QmlProfilerStatisticsView *q; QmlProfilerStatisticsView *q;
QmlProfilerTool *m_profilerTool; QmlProfilerTool *m_profilerTool;
QmlProfilerViewManager *m_viewContainer;
QmlProfilerStatisticsMainView *m_eventTree; QmlProfilerStatisticsMainView *m_eventTree;
QmlProfilerStatisticsRelativesView *m_eventChildren; QmlProfilerStatisticsRelativesView *m_eventChildren;
QmlProfilerStatisticsRelativesView *m_eventParents; QmlProfilerStatisticsRelativesView *m_eventParents;
@@ -191,7 +189,6 @@ static void getSourceLocation(QStandardItem *infoItem,
} }
QmlProfilerStatisticsView::QmlProfilerStatisticsView(QWidget *parent, QmlProfilerTool *profilerTool, QmlProfilerStatisticsView::QmlProfilerStatisticsView(QWidget *parent, QmlProfilerTool *profilerTool,
QmlProfilerViewManager *container,
QmlProfilerModelManager *profilerModelManager ) QmlProfilerModelManager *profilerModelManager )
: QmlProfilerEventsView(parent), d(new QmlProfilerStatisticsViewPrivate(this)) : QmlProfilerEventsView(parent), d(new QmlProfilerStatisticsViewPrivate(this))
{ {
@@ -243,7 +240,6 @@ QmlProfilerStatisticsView::QmlProfilerStatisticsView(QWidget *parent, QmlProfile
setLayout(groupLayout); setLayout(groupLayout);
d->m_profilerTool = profilerTool; d->m_profilerTool = profilerTool;
d->m_viewContainer = container;
d->rangeStart = d->rangeEnd = -1; d->rangeStart = d->rangeEnd = -1;
} }
@@ -274,13 +270,10 @@ QModelIndex QmlProfilerStatisticsView::selectedModelIndex() const
void QmlProfilerStatisticsView::contextMenuEvent(QContextMenuEvent *ev) void QmlProfilerStatisticsView::contextMenuEvent(QContextMenuEvent *ev)
{ {
QTC_ASSERT(d->m_viewContainer, return;);
QMenu menu; QMenu menu;
QAction *copyRowAction = 0; QAction *copyRowAction = 0;
QAction *copyTableAction = 0; QAction *copyTableAction = 0;
QAction *showExtendedStatsAction = 0; QAction *showExtendedStatsAction = 0;
QAction *getLocalStatsAction = 0;
QAction *getGlobalStatsAction = 0; QAction *getGlobalStatsAction = 0;
QPoint position = ev->globalPos(); QPoint position = ev->globalPos();
@@ -304,9 +297,6 @@ void QmlProfilerStatisticsView::contextMenuEvent(QContextMenuEvent *ev)
} }
menu.addSeparator(); 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")); getGlobalStatsAction = menu.addAction(tr("Show Full Range"));
if (!isRestrictedToRange()) if (!isRestrictedToRange())
getGlobalStatsAction->setEnabled(false); getGlobalStatsAction->setEnabled(false);
@@ -318,10 +308,6 @@ void QmlProfilerStatisticsView::contextMenuEvent(QContextMenuEvent *ev)
copyRowToClipboard(); copyRowToClipboard();
if (selectedAction == copyTableAction) if (selectedAction == copyTableAction)
copyTableToClipboard(); copyTableToClipboard();
if (selectedAction == getLocalStatsAction) {
restrictToRange(d->m_viewContainer->selectionStart(),
d->m_viewContainer->selectionEnd());
}
if (selectedAction == getGlobalStatsAction) if (selectedAction == getGlobalStatsAction)
restrictToRange(-1, -1); restrictToRange(-1, -1);
if (selectedAction == showExtendedStatsAction) if (selectedAction == showExtendedStatsAction)

View File

@@ -82,7 +82,6 @@ class QmlProfilerStatisticsView : public QmlProfilerEventsView
Q_OBJECT Q_OBJECT
public: public:
explicit QmlProfilerStatisticsView(QWidget *parent, QmlProfilerTool *profilerTool, explicit QmlProfilerStatisticsView(QWidget *parent, QmlProfilerTool *profilerTool,
QmlProfilerViewManager *container,
QmlProfilerModelManager *profilerModelManager); QmlProfilerModelManager *profilerModelManager);
~QmlProfilerStatisticsView(); ~QmlProfilerStatisticsView();

View File

@@ -96,8 +96,7 @@ void QmlProfilerViewManager::createViews()
connect(d->traceView, &QmlProfilerTraceView::gotoSourceLocation, connect(d->traceView, &QmlProfilerTraceView::gotoSourceLocation,
this, &QmlProfilerViewManager::gotoSourceLocation); this, &QmlProfilerViewManager::gotoSourceLocation);
d->eventsView = new QmlProfilerStatisticsView(mw, d->profilerTool, this, d->eventsView = new QmlProfilerStatisticsView(mw, d->profilerTool, d->profilerModelManager);
d->profilerModelManager);
d->eventsView->setWindowTitle(tr("Statistics")); d->eventsView->setWindowTitle(tr("Statistics"));
connect(d->eventsView, &QmlProfilerStatisticsView::gotoSourceLocation, connect(d->eventsView, &QmlProfilerStatisticsView::gotoSourceLocation,
this, &QmlProfilerViewManager::gotoSourceLocation); this, &QmlProfilerViewManager::gotoSourceLocation);