diff options
author | hjk <hjk@qt.io> | 2017-08-15 18:44:18 +0200 |
---|---|---|
committer | hjk <hjk@qt.io> | 2017-09-07 09:46:59 +0000 |
commit | 4342eeab33ce9dbacdb95fb6d03140c1261e289d (patch) | |
tree | 247e31240a9c1c214539ee5846880d9b0d0aea00 /src/plugins/qmlprofiler/qmlprofilertextmark.h | |
parent | 7458880298e6f53e638e528e45ddd462279422fa (diff) |
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>
Diffstat (limited to 'src/plugins/qmlprofiler/qmlprofilertextmark.h')
-rw-r--r-- | src/plugins/qmlprofiler/qmlprofilertextmark.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/plugins/qmlprofiler/qmlprofilertextmark.h b/src/plugins/qmlprofiler/qmlprofilertextmark.h index 894e5fc5178..19d13dcf79b 100644 --- a/src/plugins/qmlprofiler/qmlprofilertextmark.h +++ b/src/plugins/qmlprofiler/qmlprofilertextmark.h @@ -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 { |