forked from qt-creator/qt-creator
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:
@@ -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
|
||||
|
||||
@@ -90,9 +90,6 @@ public:
|
||||
Q_INVOKABLE virtual float getHeight(int index) const;
|
||||
|
||||
signals:
|
||||
void dataAvailable();
|
||||
void stateChanged();
|
||||
void emptyChanged();
|
||||
void expandedChanged();
|
||||
|
||||
protected:
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -92,7 +92,6 @@ public:
|
||||
signals:
|
||||
void dataAvailable();
|
||||
void stateChanged();
|
||||
void emptyChanged();
|
||||
void expandedChanged();
|
||||
|
||||
protected slots:
|
||||
|
||||
Reference in New Issue
Block a user