aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/qmlprofiler/qmlprofilertraceview.cpp
diff options
context:
space:
mode:
authorEike Ziller <[email protected]>2017-08-14 12:37:06 +0200
committerEike Ziller <[email protected]>2017-08-14 12:37:06 +0200
commitb5f49273b0fef12b061a68879ce20e56c53bdde1 (patch)
treef860bbbf6e24f2c3040e7fa65298636cd8079277 /src/plugins/qmlprofiler/qmlprofilertraceview.cpp
parent63551d7711170e2f0c96922d465dcea89f2963f7 (diff)
parenta094841bdda5461ebeaeab4620dde8222fa8312d (diff)
Merge remote-tracking branch 'origin/4.3' into 4.4
Conflicts: src/plugins/qmlprofiler/qmlprofilertraceview.cpp Change-Id: Ib1d75a8572f650898cb598d008867e2c0514d752
Diffstat (limited to 'src/plugins/qmlprofiler/qmlprofilertraceview.cpp')
-rw-r--r--src/plugins/qmlprofiler/qmlprofilertraceview.cpp18
1 files changed, 13 insertions, 5 deletions
diff --git a/src/plugins/qmlprofiler/qmlprofilertraceview.cpp b/src/plugins/qmlprofiler/qmlprofilertraceview.cpp
index a2a00b4f983..a7bf3fe4682 100644
--- a/src/plugins/qmlprofiler/qmlprofilertraceview.cpp
+++ b/src/plugins/qmlprofiler/qmlprofilertraceview.cpp
@@ -115,13 +115,16 @@ QmlProfilerTraceView::QmlProfilerTraceView(QWidget *parent, QmlProfilerViewManag
break;
case QmlProfilerModelManager::ClearingData:
d->m_zoomControl->clear();
- if (!d->m_suspendedModels.isEmpty())
- break; // Models are suspended already. AcquiringData was aborted.
Q_FALLTHROUGH();
case QmlProfilerModelManager::AcquiringData:
- // Temporarily remove the models, while we're changing them
- d->m_suspendedModels = d->m_modelProxy->models();
- d->m_modelProxy->setModels(QVariantList());
+ if (d->m_suspendedModels.isEmpty()) {
+ // Temporarily remove the models, while we're changing them
+ d->m_suspendedModels = d->m_modelProxy->models();
+ d->m_modelProxy->setModels(QVariantList());
+ }
+ // Otherwise models are suspended already. This can happen if either acquiring was
+ // aborted or we're doing a "restrict to range" which consists of a partial clearing and
+ // then re-acquiring of data.
break;
}
});
@@ -309,6 +312,11 @@ bool QmlProfilerTraceView::isUsable() const
#endif
}
+bool QmlProfilerTraceView::isSuspended() const
+{
+ return !d->m_suspendedModels.isEmpty();
+}
+
void QmlProfilerTraceView::changeEvent(QEvent *e)
{
if (e->type() == QEvent::EnabledChange) {