QmlProfiler: Use numerous form

Change-Id: I93f58bb50933e44b350e8bca3d99c922c7a66237
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
This commit is contained in:
Robert Loehning
2016-08-23 16:48:55 +02:00
parent ed5adb286a
commit 2847e248e6

View File

@@ -111,7 +111,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->numLoadedEvents();
showText(numEvents > 256 ? tr("Profiling application: %1 events").arg(numEvents) :
showText(numEvents > 256 ? tr("Profiling application: %n events", 0, numEvents) :
tr("Profiling application"));
return;
}
@@ -131,16 +131,16 @@ void QmlProfilerStateWidget::updateDisplay()
} else 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: %1 events")
.arg(d->m_modelManager->numLoadedEvents()));
showText(tr("Loading buffered data: %n events", 0,
d->m_modelManager->numLoadedEvents()));
} else if (state == QmlProfilerModelManager::ClearingData) {
// when starting a second recording from the same process without aggregation
showText(tr("Clearing old trace"));
}
} else if (state == QmlProfilerModelManager::AcquiringData) {
// Application died before all data could be read
showText(tr("Loading offline data: %1 events")
.arg(d->m_modelManager->numLoadedEvents()));
showText(tr("Loading offline data: %n events", 0,
d->m_modelManager->numLoadedEvents()));
} else if (state == QmlProfilerModelManager::ClearingData) {
showText(tr("Clearing old trace"));
}