QmlProfiler: Avoid some 0 as nullptr warnings

Change-Id: I4763a22c6624eaffbb583bf26bf74a3e282b042f
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This commit is contained in:
Ulf Hermann
2018-04-12 10:04:55 +02:00
parent 7293e800e1
commit 7f7fe1a9db
17 changed files with 43 additions and 42 deletions

View File

@@ -118,7 +118,7 @@ void QmlProfilerStateWidget::updateDisplay()
// Heuristic to not show the number if the application will only send the events when it
// stops. The number is still > 0 then because we get some StartTrace etc.
uint numEvents = d->m_modelManager->numEvents();
showText(numEvents > 256 ? tr("Profiling application: %n events", 0, numEvents) :
showText(numEvents > 256 ? tr("Profiling application: %n events", nullptr, numEvents) :
tr("Profiling application"));
return;
}
@@ -135,7 +135,7 @@ void QmlProfilerStateWidget::updateDisplay()
if (d->m_profilerState->currentState() != QmlProfilerStateManager::Idle) {
if (state == QmlProfilerModelManager::AcquiringData) {
// we don't know how much more, so progress numbers are strange here
showText(tr("Loading buffered data: %n events", 0,
showText(tr("Loading buffered data: %n events", nullptr,
d->m_modelManager->numEvents()));
} else if (state == QmlProfilerModelManager::ClearingData) {
// when starting a second recording from the same process without aggregation
@@ -143,7 +143,7 @@ void QmlProfilerStateWidget::updateDisplay()
}
} else if (state == QmlProfilerModelManager::AcquiringData) {
// Application died before all data could be read
showText(tr("Loading offline data: %n events", 0,
showText(tr("Loading offline data: %n events", nullptr,
d->m_modelManager->numEvents()));
} else if (state == QmlProfilerModelManager::ClearingData) {
showText(tr("Clearing old trace"));