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: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
This commit is contained in:
Ulf Hermann
2015-02-23 11:31:03 +01:00
parent a4bb572a3b
commit ce04aeb2dc
3 changed files with 3 additions and 27 deletions

View File

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

View File

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

View File

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