aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/qmlprofiler
diff options
context:
space:
mode:
authorhjk <hjk@qt.io>2018-08-13 09:34:47 +0200
committerhjk <hjk@qt.io>2018-08-13 08:42:52 +0000
commit1567679b8129d3066e086a16720d79d6403dbedc (patch)
treeca999bd1c87970ce525292dd7713fe9c03ac65b8 /src/plugins/qmlprofiler
parent1d68e08359520c70065d583b0fc47fa339f3b61b (diff)
Debugger: Tighten Perspective interface
Pass id in constructor, so it can be const. Change-Id: Id33fe19c4416109af8aa05a3ed0a09918eeb5cdf Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Diffstat (limited to 'src/plugins/qmlprofiler')
-rw-r--r--src/plugins/qmlprofiler/qmlprofilerviewmanager.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/plugins/qmlprofiler/qmlprofilerviewmanager.cpp b/src/plugins/qmlprofiler/qmlprofilerviewmanager.cpp
index 0e1a8d80bdb..2dabf618582 100644
--- a/src/plugins/qmlprofiler/qmlprofilerviewmanager.cpp
+++ b/src/plugins/qmlprofiler/qmlprofilerviewmanager.cpp
@@ -61,8 +61,7 @@ QmlProfilerViewManager::QmlProfilerViewManager(QObject *parent,
new QmlProfilerStateWidget(m_profilerState, m_profilerModelManager, m_traceView);
- m_perspective = new Utils::Perspective;
- m_perspective->setName(tr("QML Profiler"));
+ m_perspective = new Utils::Perspective(Constants::QmlProfilerPerspectiveId, tr("QML Profiler"));
auto prepareEventsView = [this](QmlProfilerEventsView *view) {
connect(view, &QmlProfilerEventsView::typeSelected,
@@ -95,7 +94,7 @@ QmlProfilerViewManager::QmlProfilerViewManager(QObject *parent,
m_perspective->addWindow(m_statisticsView, Perspective::AddToTab, anchor);
m_perspective->addWindow(anchor, Perspective::Raise, nullptr);
- Debugger::registerPerspective(Constants::QmlProfilerPerspectiveId, m_perspective);
+ Debugger::registerPerspective(m_perspective);
}
QmlProfilerViewManager::~QmlProfilerViewManager()