forked from qt-creator/qt-creator
QmlProfiler: Don't access QmlProfilerTool from QmlProfilerTextMark
Only QmlProfilerViewManager is needed, so use that, as a step to reduce the interface of the QmlProfilerTool singleton. Change-Id: I19e55e3b22b3c64ff98b8ea29cbc5164a60ee15d Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
This commit is contained in:
@@ -25,16 +25,18 @@
|
||||
#pragma once
|
||||
|
||||
#include "qmleventlocation.h"
|
||||
#include "qmlprofilertool.h"
|
||||
#include <texteditor/textmark.h>
|
||||
|
||||
namespace QmlProfiler {
|
||||
namespace Internal {
|
||||
|
||||
class QmlProfilerViewManager;
|
||||
|
||||
class QmlProfilerTextMark : public TextEditor::TextMark
|
||||
{
|
||||
public:
|
||||
QmlProfilerTextMark(QmlProfilerTool *tool, int typeId, const QString &fileName, int lineNumber);
|
||||
QmlProfilerTextMark(QmlProfilerViewManager *viewManager, int typeId,
|
||||
const QString &fileName, int lineNumber);
|
||||
void addTypeId(int typeId);
|
||||
|
||||
void paintIcon(QPainter *painter, const QRect &rect) const override;
|
||||
@@ -43,7 +45,7 @@ public:
|
||||
bool addToolTipContent(QLayout *target) const override;
|
||||
|
||||
private:
|
||||
QmlProfilerTool *m_tool;
|
||||
QmlProfilerViewManager *m_viewManager;
|
||||
QVector<int> m_typeIds;
|
||||
};
|
||||
|
||||
@@ -55,7 +57,7 @@ public:
|
||||
|
||||
void clear();
|
||||
void addTextMarkId(int typeId, const QmlEventLocation &location);
|
||||
void createMarks(QmlProfilerTool *tool, const QString &fileName);
|
||||
void createMarks(QmlProfilerViewManager *viewManager, const QString &fileName);
|
||||
|
||||
private:
|
||||
struct TextMarkId {
|
||||
|
||||
Reference in New Issue
Block a user