forked from qt-creator/qt-creator
QmlProfiler: Deduplicate dataChanged() slot in timeline models.
The same code was repeated all over the place. Change-Id: I70a8caa46c91a7b55fd7eecac32cdc53b5d94cfb Reviewed-by: Kai Koehne <kai.koehne@digia.com>
This commit is contained in:
@@ -118,20 +118,6 @@ void PaintEventsModelProxy::clear()
|
||||
m_modelManager->modelProxyCountUpdated(m_modelId, 0, 1);
|
||||
}
|
||||
|
||||
void PaintEventsModelProxy::dataChanged()
|
||||
{
|
||||
if (m_modelManager->state() == QmlProfilerDataState::ProcessingData)
|
||||
loadData();
|
||||
|
||||
if (m_modelManager->state() == QmlProfilerDataState::Empty)
|
||||
clear();
|
||||
|
||||
emit stateChanged();
|
||||
emit dataAvailable();
|
||||
emit emptyChanged();
|
||||
emit expandedChanged();
|
||||
}
|
||||
|
||||
bool compareStartTimes(const PaintEventsModelProxy::QmlPaintEventData &t1, const PaintEventsModelProxy::QmlPaintEventData &t2)
|
||||
{
|
||||
return t1.startTime < t2.startTime;
|
||||
|
||||
Reference in New Issue
Block a user