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: default:
break; break;
} }
emit stateChanged();
emit dataAvailable();
emit emptyChanged();
emit expandedChanged();
} }
bool AbstractTimelineModel::eventAccepted(const QmlProfilerDataModel::QmlEventTypeData &event) const bool AbstractTimelineModel::eventAccepted(const QmlProfilerDataModel::QmlEventTypeData &event) const

View File

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

View File

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

View File

@@ -82,14 +82,15 @@ void TimelineModelAggregator::setModelManager(QmlProfilerModelManager *modelMana
rangeModel->setModelManager(modelManager); rangeModel->setModelManager(modelManager);
addModel(rangeModel); 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) void TimelineModelAggregator::addModel(AbstractTimelineModel *m)
{ {
d->modelList << m; d->modelList << m;
connect(m,SIGNAL(emptyChanged()),this,SIGNAL(emptyChanged()));
connect(m,SIGNAL(expandedChanged()),this,SIGNAL(expandedChanged())); connect(m,SIGNAL(expandedChanged()),this,SIGNAL(expandedChanged()));
connect(m,SIGNAL(stateChanged()),this,SIGNAL(stateChanged()));
} }
QStringList TimelineModelAggregator::categoryTitles() const QStringList TimelineModelAggregator::categoryTitles() const

View File

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