forked from qt-creator/qt-creator
Tracing: Don't change visible features on clearing and replaying
This used to be important for the mockup in the Timeline, but as the mockup looks just fine with all available features visible, we can drop it. As TimelineModel::clear() clears the "hidden" flag, we have to restore that one on initialize(), though. As a side effect the visibility settings are retained across profiling sessions now. Task-number: QTCREATORBUG-20503 Change-Id: I1512ab7e494ed79d20e2097d68f8494990cfecbb Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -662,18 +662,6 @@ bool QmlProfilerTool::checkForUnsavedNotes()
|
||||
QMessageBox::Yes, QMessageBox::No) == QMessageBox::Yes;
|
||||
}
|
||||
|
||||
void QmlProfilerTool::restoreFeatureVisibility()
|
||||
{
|
||||
// Restore the shown/hidden state of features to what the user selected. When clearing data the
|
||||
// the model manager sets its features to 0, and models get automatically shown, for the mockup.
|
||||
quint64 features = 0;
|
||||
foreach (const QAction *action, d->m_displayFeaturesMenu->actions()) {
|
||||
if (action->isChecked())
|
||||
features |= (1ULL << action->data().toUInt());
|
||||
}
|
||||
d->m_profilerModelManager->setVisibleFeatures(features);
|
||||
}
|
||||
|
||||
void QmlProfilerTool::clientsDisconnected()
|
||||
{
|
||||
if (d->m_toolBusy) {
|
||||
@@ -745,7 +733,6 @@ void QmlProfilerTool::setRecordedFeatures(quint64 features)
|
||||
|
||||
void QmlProfilerTool::initialize()
|
||||
{
|
||||
restoreFeatureVisibility();
|
||||
setButtonsEnabled(false); // Other buttons disabled
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user