QmlProfiler: Use real type instead of base class

Change-Id: I854834b2236a99af264d14a3d6022bfa6e0a2b9b
Reviewed-by: Christiaan Janssen <christiaan.janssen@digia.com>
This commit is contained in:
hjk
2013-08-08 11:37:15 +02:00
parent 4d87da89ca
commit f959990ab1
2 changed files with 5 additions and 6 deletions

View File

@@ -100,7 +100,7 @@ public:
QmlProfilerEventsWidget *q;
Analyzer::IAnalyzerTool *m_profilerTool;
QmlProfilerTool *m_profilerTool;
QmlProfilerViewManager *m_viewContainer;
QmlProfilerEventsMainView *m_eventTree;
@@ -112,7 +112,7 @@ public:
};
QmlProfilerEventsWidget::QmlProfilerEventsWidget(QWidget *parent,
Analyzer::IAnalyzerTool *profilerTool,
QmlProfilerTool *profilerTool,
QmlProfilerViewManager *container,
QmlProfilerDataModel *profilerDataModel )
: QWidget(parent), d(new QmlProfilerEventsWidgetPrivate(this))
@@ -215,11 +215,10 @@ void QmlProfilerEventsWidget::contextMenuEvent(QContextMenuEvent *ev)
QAction *getLocalStatsAction = 0;
QAction *getGlobalStatsAction = 0;
QmlProfilerTool *profilerTool = qobject_cast<QmlProfilerTool *>(d->m_profilerTool);
QPoint position = ev->globalPos();
if (profilerTool) {
QList <QAction *> commonActions = profilerTool->profilerContextMenuActions();
if (d->m_profilerTool) {
QList <QAction *> commonActions = d->m_profilerTool->profilerContextMenuActions();
foreach (QAction *act, commonActions) {
menu.addAction(act);
}

View File

@@ -58,7 +58,7 @@ class QmlProfilerEventsWidget : public QWidget
Q_OBJECT
public:
explicit QmlProfilerEventsWidget(QWidget *parent,
Analyzer::IAnalyzerTool *profilerTool,
QmlProfilerTool *profilerTool,
QmlProfilerViewManager *container,
QmlProfilerDataModel *profilerDataModel );
~QmlProfilerEventsWidget();