Commit ce04aeb2 authored by Ulf Hermann's avatar Ulf Hermann

QmlProfiler: Don't hide/show trace view when loading and saving

This was a workaround to compensate for the fact that windows in window
containers don't follow the stacking order and thus the state widget
wasn't shown. With QQuickWidget we don't need to do this anymore.

Change-Id: I2c1e57d891bee6284ef9f033b8747df4b153271b
Task-number: QTCREATORBUG-11833
Reviewed-by: default avatarJoerg Bornemann <joerg.bornemann@theqtcompany.com>
parent a4bb572a
......@@ -76,7 +76,6 @@ public:
QmlProfilerTraceViewPrivate(QmlProfilerTraceView *qq) : q(qq) {}
QmlProfilerTraceView *q;
QmlProfilerStateManager *m_profilerState;
QmlProfilerTool *m_profilerTool;
QmlProfilerViewManager *m_viewContainer;
......@@ -90,7 +89,7 @@ public:
Timeline::TimelineZoomControl *m_zoomControl;
};
QmlProfilerTraceView::QmlProfilerTraceView(QWidget *parent, QmlProfilerTool *profilerTool, QmlProfilerViewManager *container, QmlProfilerModelManager *modelManager, QmlProfilerStateManager *profilerState)
QmlProfilerTraceView::QmlProfilerTraceView(QWidget *parent, QmlProfilerTool *profilerTool, QmlProfilerViewManager *container, QmlProfilerModelManager *modelManager)
: QWidget(parent), d(new QmlProfilerTraceViewPrivate(this))
{
setObjectName(QLatin1String("QML Profiler"));
......@@ -141,9 +140,6 @@ QmlProfilerTraceView::QmlProfilerTraceView(QWidget *parent, QmlProfilerTool *pro
// Connect this last so that it's executed after the models have updated their data.
connect(modelManager->qmlModel(), SIGNAL(changed()), d->m_modelProxy, SIGNAL(stateChanged()));
connect(d->m_modelManager, SIGNAL(stateChanged()), this, SLOT(profilerDataModelStateChanged()));
d->m_profilerState = profilerState;
// Minimum height: 5 rows of 20 pixels + scrollbar of 50 pixels + 20 pixels margin
setMinimumHeight(170);
......@@ -308,23 +304,6 @@ void QmlProfilerTraceView::showContextMenu(QPoint position)
}
////////////////////////////////////////////////////////////////
// Profiler State
void QmlProfilerTraceView::profilerDataModelStateChanged()
{
switch (d->m_modelManager->state()) {
case QmlProfilerDataState::Empty: break;
case QmlProfilerDataState::ClearingData:
d->m_mainView->hide();
break;
case QmlProfilerDataState::AcquiringData: break;
case QmlProfilerDataState::ProcessingData: break;
case QmlProfilerDataState::Done:
d->m_mainView->show();
break;
default:
break;
}
}
} // namespace Internal
} // namespace QmlProfiler
......@@ -51,8 +51,7 @@ class QmlProfilerTraceView : public QWidget
public:
explicit QmlProfilerTraceView(QWidget *parent, QmlProfilerTool *profilerTool,
QmlProfilerViewManager *container,
QmlProfilerModelManager *modelManager,
QmlProfilerStateManager *profilerState);
QmlProfilerModelManager *modelManager);
~QmlProfilerTraceView();
bool hasValidSelection() const;
......@@ -68,7 +67,6 @@ public slots:
private slots:
void updateCursorPosition();
void profilerDataModelStateChanged();
protected:
virtual void contextMenuEvent(QContextMenuEvent *event);
......
......@@ -95,8 +95,7 @@ void QmlProfilerViewManager::createViews()
d->traceView = new QmlProfilerTraceView(mw,
d->profilerTool,
this,
d->profilerModelManager,
d->profilerState);
d->profilerModelManager);
d->traceView->setWindowTitle(tr("Timeline"));
connect(d->traceView, SIGNAL(gotoSourceLocation(QString,int,int)),
this, SIGNAL(gotoSourceLocation(QString,int,int)));
......
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