forked from qt-creator/qt-creator
QmlProfiler: remove useless checks from labels() methods
The view should check if it needs the labels before requesting them. Change-Id: I935259e91337202224af7890d0617e1b12dd922a Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
This commit is contained in:
@@ -186,7 +186,7 @@ QVariantList QmlProfilerAnimationsModel::labels() const
|
||||
{
|
||||
QVariantList result;
|
||||
|
||||
if (!hidden() && m_maxGuiThreadAnimations > 0) {
|
||||
if (m_maxGuiThreadAnimations > 0) {
|
||||
QVariantMap element;
|
||||
element.insert(QLatin1String("displayName"), QVariant(tr("Animations")));
|
||||
element.insert(QLatin1String("description"), QVariant(tr("GUI Thread")));
|
||||
@@ -194,7 +194,7 @@ QVariantList QmlProfilerAnimationsModel::labels() const
|
||||
result << element;
|
||||
}
|
||||
|
||||
if (!hidden() && m_maxRenderThreadAnimations > 0) {
|
||||
if (m_maxRenderThreadAnimations > 0) {
|
||||
QVariantMap element;
|
||||
element.insert(QLatin1String("displayName"), QVariant(tr("Animations")));
|
||||
element.insert(QLatin1String("description"), QVariant(tr("Render Thread")));
|
||||
|
||||
@@ -210,7 +210,6 @@ QVariantList QmlProfilerRangeModel::labels() const
|
||||
{
|
||||
QVariantList result;
|
||||
|
||||
if (expanded() && !hidden()) {
|
||||
const QVector<QmlProfilerDataModel::QmlEventTypeData> &types =
|
||||
modelManager()->qmlModel()->getEventTypes();
|
||||
for (int i = 1; i < expandedRowCount(); i++) { // Ignore the -1 for the first row
|
||||
@@ -221,7 +220,6 @@ QVariantList QmlProfilerRangeModel::labels() const
|
||||
element.insert(QLatin1String("id"), QVariant(typeId));
|
||||
result << element;
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user