diff options
author | Ulf Hermann <[email protected]> | 2016-01-04 17:20:13 +0100 |
---|---|---|
committer | Ulf Hermann <[email protected]> | 2016-01-06 14:28:20 +0000 |
commit | e4efb9bb3b5907a5ba2a6cde167c5a5051a84dac (patch) | |
tree | a92c118dd981f191d2c8c996ab07a984adb01df8 /src/plugins/qmlprofiler/qmlprofilertraceview.cpp | |
parent | c16b843eccea038996cb21aec72ee1a5e99228c0 (diff) |
QmlProfiler: Retrieve common actions from ActionManager
This removes the need to pass the QmlProfilerTool instance to all views.
QmlProfilerTool is exported so that we can access the common actions
from plugins.
Change-Id: Ie7072c23ef35763b729f4b87acce47ecbdb76e43
Reviewed-by: Joerg Bornemann <[email protected]>
Diffstat (limited to 'src/plugins/qmlprofiler/qmlprofilertraceview.cpp')
-rw-r--r-- | src/plugins/qmlprofiler/qmlprofilertraceview.cpp | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/src/plugins/qmlprofiler/qmlprofilertraceview.cpp b/src/plugins/qmlprofiler/qmlprofilertraceview.cpp index 8ee5f35d67f..2d62faab8ee 100644 --- a/src/plugins/qmlprofiler/qmlprofilertraceview.cpp +++ b/src/plugins/qmlprofiler/qmlprofilertraceview.cpp @@ -77,7 +77,6 @@ public: QmlProfilerTraceViewPrivate(QmlProfilerTraceView *qq) : q(qq) {} QmlProfilerTraceView *q; - QmlProfilerTool *m_profilerTool; QmlProfilerViewManager *m_viewContainer; QSize m_sizeHint; @@ -90,7 +89,8 @@ public: Timeline::TimelineZoomControl *m_zoomControl; }; -QmlProfilerTraceView::QmlProfilerTraceView(QWidget *parent, QmlProfilerTool *profilerTool, QmlProfilerViewManager *container, QmlProfilerModelManager *modelManager) +QmlProfilerTraceView::QmlProfilerTraceView(QWidget *parent, QmlProfilerViewManager *container, + QmlProfilerModelManager *modelManager) : QWidget(parent), d(new QmlProfilerTraceViewPrivate(this)) { setObjectName(QLatin1String("QML Profiler")); @@ -126,9 +126,7 @@ QmlProfilerTraceView::QmlProfilerTraceView(QWidget *parent, QmlProfilerTool *pro groupLayout->addWidget(new Core::FindToolBarPlaceHolder(this)); setLayout(groupLayout); - d->m_profilerTool = profilerTool; d->m_viewContainer = container; - d->m_modelProxy = new Timeline::TimelineModelAggregator(modelManager->notesModel(), this); d->m_modelManager = modelManager; @@ -241,11 +239,7 @@ void QmlProfilerTraceView::showContextMenu(QPoint position) QMenu menu; QAction *viewAllAction = 0; - QmlProfilerTool *profilerTool = qobject_cast<QmlProfilerTool *>(d->m_profilerTool); - - if (profilerTool) - menu.addActions(profilerTool->profilerContextMenuActions()); - + menu.addActions(QmlProfilerTool::profilerContextMenuActions()); menu.addSeparator(); QAction *getLocalStatsAction = menu.addAction(tr("Limit Statistics Pane to Current Range")); |