Commit a26d5ece authored by hjk's avatar hjk

QmlProfiler: Avoid use of Analyzer::createDockWidget return value

In a quest to make the function return 'void'.

Change-Id: I36635c89948ded84b89861f169303a00bf2ea6bf
Reviewed-by: default avatarUlf Hermann <ulf.hermann@theqtcompany.com>
parent 78074999
......@@ -49,7 +49,6 @@ class QmlProfilerViewManager::QmlProfilerViewManagerPrivate {
public:
QmlProfilerViewManagerPrivate(QmlProfilerViewManager *qq) { Q_UNUSED(qq); }
QDockWidget *timelineDock;
QmlProfilerTraceView *traceView;
QList<QmlProfilerEventsView *> eventsViews;
QmlProfilerStateManager *profilerState;
......@@ -91,7 +90,7 @@ void QmlProfilerViewManager::createViews()
this, &QmlProfilerViewManager::typeSelected);
connect(this, &QmlProfilerViewManager::typeSelected,
d->traceView, &QmlProfilerTraceView::selectByTypeId);
d->timelineDock = AnalyzerManager::createDockWidget(d->traceView, Constants::QmlProfilerTimelineDock);
AnalyzerManager::createDockWidget(d->traceView, Constants::QmlProfilerTimelineDock);
new QmlProfilerStateWidget(d->profilerState, d->profilerModelManager, d->traceView);
......@@ -129,7 +128,8 @@ void QmlProfilerViewManager::createViews()
AnalyzerManager::addPerspective(perspective);
settings->endGroup();
d->timelineDock->raise();
QTC_ASSERT(qobject_cast<QDockWidget *>(d->traceView->parentWidget()), return);
d->traceView->parentWidget()->raise();
}
bool QmlProfilerViewManager::hasValidSelection() const
......@@ -164,7 +164,8 @@ void QmlProfilerViewManager::restrictEventsToRange(qint64 rangeStart, qint64 ran
void QmlProfilerViewManager::raiseTimeline()
{
d->timelineDock->raise();
QTC_ASSERT(qobject_cast<QDockWidget *>(d->traceView->parentWidget()), return);
d->traceView->parentWidget()->raise();
d->traceView->setFocus();
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment