QmlProfiler: remove useless signals

Sending a signal for every model when clearing or loading data is not
very smart.

Change-Id: Ifc81d74f6b7f93bcd6748a919dfb553050b8d725
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
This commit is contained in:
Ulf Hermann
2014-06-13 19:14:12 +02:00
parent fea6580c82
commit 22fb31557f
5 changed files with 5 additions and 13 deletions

View File

@@ -192,11 +192,6 @@ void AbstractTimelineModel::dataChanged()
default:
break;
}
emit stateChanged();
emit dataAvailable();
emit emptyChanged();
emit expandedChanged();
}
bool AbstractTimelineModel::eventAccepted(const QmlProfilerDataModel::QmlEventTypeData &event) const

View File

@@ -90,9 +90,6 @@ public:
Q_INVOKABLE virtual float getHeight(int index) const;
signals:
void dataAvailable();
void stateChanged();
void emptyChanged();
void expandedChanged();
protected:

View File

@@ -53,6 +53,8 @@ Item {
}
function getDescriptions() {
expanded = qmlProfilerModelProxy.expanded(modelIndex);
backgroundMarks.requestPaint();
visible = qmlProfilerModelProxy.rowCount(modelIndex) > 0;
if (!visible)
return;
@@ -75,8 +77,6 @@ Item {
Connections {
target: qmlProfilerModelProxy
onExpandedChanged: {
expanded = qmlProfilerModelProxy.expanded(modelIndex);
backgroundMarks.requestPaint();
getDescriptions();
}

View File

@@ -82,14 +82,15 @@ void TimelineModelAggregator::setModelManager(QmlProfilerModelManager *modelMana
rangeModel->setModelManager(modelManager);
addModel(rangeModel);
}
// Connect this last so that it's executed after the models have updated their data.
connect(modelManager->qmlModel(),SIGNAL(changed()),this,SIGNAL(stateChanged()));
}
void TimelineModelAggregator::addModel(AbstractTimelineModel *m)
{
d->modelList << m;
connect(m,SIGNAL(emptyChanged()),this,SIGNAL(emptyChanged()));
connect(m,SIGNAL(expandedChanged()),this,SIGNAL(expandedChanged()));
connect(m,SIGNAL(stateChanged()),this,SIGNAL(stateChanged()));
}
QStringList TimelineModelAggregator::categoryTitles() const

View File

@@ -92,7 +92,6 @@ public:
signals:
void dataAvailable();
void stateChanged();
void emptyChanged();
void expandedChanged();
protected slots: