Commit 22fb3155 authored by Ulf Hermann's avatar Ulf Hermann
Browse files

QmlProfiler: remove useless signals



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

Change-Id: Ifc81d74f6b7f93bcd6748a919dfb553050b8d725
Reviewed-by: default avatarKai Koehne <kai.koehne@digia.com>
parent fea6580c
...@@ -192,11 +192,6 @@ void AbstractTimelineModel::dataChanged() ...@@ -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
......
...@@ -90,9 +90,6 @@ public: ...@@ -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:
......
...@@ -53,6 +53,8 @@ Item { ...@@ -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 { ...@@ -75,8 +77,6 @@ Item {
Connections { Connections {
target: qmlProfilerModelProxy target: qmlProfilerModelProxy
onExpandedChanged: { onExpandedChanged: {
expanded = qmlProfilerModelProxy.expanded(modelIndex);
backgroundMarks.requestPaint();
getDescriptions(); getDescriptions();
} }
......
...@@ -82,14 +82,15 @@ void TimelineModelAggregator::setModelManager(QmlProfilerModelManager *modelMana ...@@ -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
......
...@@ -92,7 +92,6 @@ public: ...@@ -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:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment