forked from qt-creator/qt-creator
Adapt to unified data models in creator
Change-Id: I08991a79d5cc70bb374ecaa8d5b707962403cee7 Reviewed-by: Kai Koehne <kai.koehne@digia.com>
This commit is contained in:
@@ -155,7 +155,7 @@ void PixmapCacheModel::PixmapCacheModelPrivate::addVP(QVariantList &l, QString l
|
|||||||
{
|
{
|
||||||
if (time > 0) {
|
if (time > 0) {
|
||||||
QVariantMap res;
|
QVariantMap res;
|
||||||
res.insert(label, QVariant(QmlProfilerSimpleModel::formatTime(time)));
|
res.insert(label, QVariant(QmlProfilerBaseModel::formatTime(time)));
|
||||||
l << res;
|
l << res;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -207,7 +207,7 @@ void PixmapCacheModel::loadData()
|
|||||||
{
|
{
|
||||||
Q_D(PixmapCacheModel);
|
Q_D(PixmapCacheModel);
|
||||||
clear();
|
clear();
|
||||||
QmlProfilerSimpleModel *simpleModel = d->modelManager->simpleModel();
|
QmlProfilerDataModel *simpleModel = d->modelManager->qmlModel();
|
||||||
if (simpleModel->isEmpty())
|
if (simpleModel->isEmpty())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@@ -216,7 +216,7 @@ void PixmapCacheModel::loadData()
|
|||||||
QVector < int > pixmapStartPoints;
|
QVector < int > pixmapStartPoints;
|
||||||
QVector < int > pixmapCachePoints;
|
QVector < int > pixmapCachePoints;
|
||||||
|
|
||||||
foreach (const QmlProfilerSimpleModel::QmlEventData &event, simpleModel->getEvents()) {
|
foreach (const QmlProfilerDataModel::QmlEventData &event, simpleModel->getEvents()) {
|
||||||
if (!eventAccepted(event))
|
if (!eventAccepted(event))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
@@ -21,7 +21,7 @@
|
|||||||
|
|
||||||
#include "qmlprofiler/qmlprofilertimelinemodelproxy.h"
|
#include "qmlprofiler/qmlprofilertimelinemodelproxy.h"
|
||||||
#include "qmlprofiler/singlecategorytimelinemodel.h"
|
#include "qmlprofiler/singlecategorytimelinemodel.h"
|
||||||
#include "qmlprofiler/qmlprofilersimplemodel.h"
|
#include "qmlprofiler/qmlprofilerdatamodel.h"
|
||||||
|
|
||||||
#include <QStringList>
|
#include <QStringList>
|
||||||
#include <QColor>
|
#include <QColor>
|
||||||
|
@@ -141,7 +141,7 @@ void SceneGraphTimelineModel::SceneGraphTimelineModelPrivate::addVP(QVariantList
|
|||||||
{
|
{
|
||||||
if (time > 0) {
|
if (time > 0) {
|
||||||
QVariantMap res;
|
QVariantMap res;
|
||||||
res.insert(label, QVariant(QmlProfilerSimpleModel::formatTime(time)));
|
res.insert(label, QVariant(QmlProfilerBaseModel::formatTime(time)));
|
||||||
l << res;
|
l << res;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -195,14 +195,14 @@ void SceneGraphTimelineModel::loadData()
|
|||||||
{
|
{
|
||||||
Q_D(SceneGraphTimelineModel);
|
Q_D(SceneGraphTimelineModel);
|
||||||
clear();
|
clear();
|
||||||
QmlProfilerSimpleModel *simpleModel = d->modelManager->simpleModel();
|
QmlProfilerDataModel *simpleModel = d->modelManager->qmlModel();
|
||||||
if (simpleModel->isEmpty())
|
if (simpleModel->isEmpty())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
int lastRenderEvent = -1;
|
int lastRenderEvent = -1;
|
||||||
|
|
||||||
// combine the data of several eventtypes into two rows
|
// combine the data of several eventtypes into two rows
|
||||||
foreach (const QmlProfilerSimpleModel::QmlEventData &event, simpleModel->getEvents()) {
|
foreach (const QmlProfilerDataModel::QmlEventData &event, simpleModel->getEvents()) {
|
||||||
if (!eventAccepted(event))
|
if (!eventAccepted(event))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
@@ -21,7 +21,7 @@
|
|||||||
|
|
||||||
#include "qmlprofiler/singlecategorytimelinemodel.h"
|
#include "qmlprofiler/singlecategorytimelinemodel.h"
|
||||||
#include "qmlprofiler/qmlprofilermodelmanager.h"
|
#include "qmlprofiler/qmlprofilermodelmanager.h"
|
||||||
#include "qmlprofiler/qmlprofilersimplemodel.h"
|
#include "qmlprofiler/qmlprofilerdatamodel.h"
|
||||||
|
|
||||||
#include <QStringList>
|
#include <QStringList>
|
||||||
#include <QColor>
|
#include <QColor>
|
||||||
|
Reference in New Issue
Block a user