forked from qt-creator/qt-creator
QmlProfiler: Use real type instead of base class
Change-Id: I854834b2236a99af264d14a3d6022bfa6e0a2b9b Reviewed-by: Christiaan Janssen <christiaan.janssen@digia.com>
This commit is contained in:
@@ -100,7 +100,7 @@ public:
|
|||||||
|
|
||||||
QmlProfilerEventsWidget *q;
|
QmlProfilerEventsWidget *q;
|
||||||
|
|
||||||
Analyzer::IAnalyzerTool *m_profilerTool;
|
QmlProfilerTool *m_profilerTool;
|
||||||
QmlProfilerViewManager *m_viewContainer;
|
QmlProfilerViewManager *m_viewContainer;
|
||||||
|
|
||||||
QmlProfilerEventsMainView *m_eventTree;
|
QmlProfilerEventsMainView *m_eventTree;
|
||||||
@@ -112,7 +112,7 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
QmlProfilerEventsWidget::QmlProfilerEventsWidget(QWidget *parent,
|
QmlProfilerEventsWidget::QmlProfilerEventsWidget(QWidget *parent,
|
||||||
Analyzer::IAnalyzerTool *profilerTool,
|
QmlProfilerTool *profilerTool,
|
||||||
QmlProfilerViewManager *container,
|
QmlProfilerViewManager *container,
|
||||||
QmlProfilerDataModel *profilerDataModel )
|
QmlProfilerDataModel *profilerDataModel )
|
||||||
: QWidget(parent), d(new QmlProfilerEventsWidgetPrivate(this))
|
: QWidget(parent), d(new QmlProfilerEventsWidgetPrivate(this))
|
||||||
@@ -215,11 +215,10 @@ void QmlProfilerEventsWidget::contextMenuEvent(QContextMenuEvent *ev)
|
|||||||
QAction *getLocalStatsAction = 0;
|
QAction *getLocalStatsAction = 0;
|
||||||
QAction *getGlobalStatsAction = 0;
|
QAction *getGlobalStatsAction = 0;
|
||||||
|
|
||||||
QmlProfilerTool *profilerTool = qobject_cast<QmlProfilerTool *>(d->m_profilerTool);
|
|
||||||
QPoint position = ev->globalPos();
|
QPoint position = ev->globalPos();
|
||||||
|
|
||||||
if (profilerTool) {
|
if (d->m_profilerTool) {
|
||||||
QList <QAction *> commonActions = profilerTool->profilerContextMenuActions();
|
QList <QAction *> commonActions = d->m_profilerTool->profilerContextMenuActions();
|
||||||
foreach (QAction *act, commonActions) {
|
foreach (QAction *act, commonActions) {
|
||||||
menu.addAction(act);
|
menu.addAction(act);
|
||||||
}
|
}
|
||||||
|
@@ -58,7 +58,7 @@ class QmlProfilerEventsWidget : public QWidget
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
explicit QmlProfilerEventsWidget(QWidget *parent,
|
explicit QmlProfilerEventsWidget(QWidget *parent,
|
||||||
Analyzer::IAnalyzerTool *profilerTool,
|
QmlProfilerTool *profilerTool,
|
||||||
QmlProfilerViewManager *container,
|
QmlProfilerViewManager *container,
|
||||||
QmlProfilerDataModel *profilerDataModel );
|
QmlProfilerDataModel *profilerDataModel );
|
||||||
~QmlProfilerEventsWidget();
|
~QmlProfilerEventsWidget();
|
||||||
|
Reference in New Issue
Block a user