Debugger: Tighten Perspective interface

Pass id in constructor, so it can be const.

Change-Id: Id33fe19c4416109af8aa05a3ed0a09918eeb5cdf
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
hjk
2018-08-13 09:34:47 +02:00
parent 1d68e08359
commit 1567679b81
8 changed files with 49 additions and 64 deletions

View File

@@ -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()