forked from qt-creator/qt-creator
Derive from AbstractTimelineModel instead of SingleCategoryTimelineModel
Change-Id: I720f067956417519e58fac9d92292edd7968356d Reviewed-by: Kai Koehne <kai.koehne@digia.com>
This commit is contained in:
@@ -20,7 +20,7 @@
|
|||||||
#include "qmldebug/qmlprofilereventtypes.h"
|
#include "qmldebug/qmlprofilereventtypes.h"
|
||||||
#include "qmlprofiler/qmlprofilermodelmanager.h"
|
#include "qmlprofiler/qmlprofilermodelmanager.h"
|
||||||
#include "qmlprofiler/sortedtimelinemodel.h"
|
#include "qmlprofiler/sortedtimelinemodel.h"
|
||||||
#include "qmlprofiler/singlecategorytimelinemodel_p.h"
|
#include "qmlprofiler/abstracttimelinemodel_p.h"
|
||||||
|
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
|
|
||||||
@@ -31,7 +31,7 @@ using namespace QmlProfiler;
|
|||||||
|
|
||||||
class MemoryUsageModel::MemoryUsageModelPrivate :
|
class MemoryUsageModel::MemoryUsageModelPrivate :
|
||||||
public SortedTimelineModel<MemoryAllocation,
|
public SortedTimelineModel<MemoryAllocation,
|
||||||
SingleCategoryTimelineModel::SingleCategoryTimelineModelPrivate>
|
AbstractTimelineModel::AbstractTimelineModelPrivate>
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
static QString memoryTypeName(int type);
|
static QString memoryTypeName(int type);
|
||||||
@@ -42,7 +42,7 @@ private:
|
|||||||
};
|
};
|
||||||
|
|
||||||
MemoryUsageModel::MemoryUsageModel(QObject *parent)
|
MemoryUsageModel::MemoryUsageModel(QObject *parent)
|
||||||
: SingleCategoryTimelineModel(new MemoryUsageModelPrivate(),
|
: AbstractTimelineModel(new MemoryUsageModelPrivate(),
|
||||||
QLatin1String("MemoryUsageTimelineModel"),
|
QLatin1String("MemoryUsageTimelineModel"),
|
||||||
QLatin1String("Memory Usage"), QmlDebug::MemoryAllocation,
|
QLatin1String("Memory Usage"), QmlDebug::MemoryAllocation,
|
||||||
QmlDebug::MaximumRangeType, parent)
|
QmlDebug::MaximumRangeType, parent)
|
||||||
|
@@ -20,7 +20,7 @@
|
|||||||
#define MEMORYUSAGEMODEL_H
|
#define MEMORYUSAGEMODEL_H
|
||||||
|
|
||||||
#include "qmlprofiler/qmlprofilertimelinemodelproxy.h"
|
#include "qmlprofiler/qmlprofilertimelinemodelproxy.h"
|
||||||
#include "qmlprofiler/singlecategorytimelinemodel.h"
|
#include "qmlprofiler/abstracttimelinemodel.h"
|
||||||
#include "qmlprofiler/qmlprofilerdatamodel.h"
|
#include "qmlprofiler/qmlprofilerdatamodel.h"
|
||||||
|
|
||||||
#include <QStringList>
|
#include <QStringList>
|
||||||
@@ -29,7 +29,7 @@
|
|||||||
namespace QmlProfilerExtension {
|
namespace QmlProfilerExtension {
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
|
|
||||||
class MemoryUsageModel : public QmlProfiler::SingleCategoryTimelineModel
|
class MemoryUsageModel : public QmlProfiler::AbstractTimelineModel
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
|
@@ -20,7 +20,7 @@
|
|||||||
#include "qmldebug/qmlprofilereventtypes.h"
|
#include "qmldebug/qmlprofilereventtypes.h"
|
||||||
#include "qmlprofiler/qmlprofilermodelmanager.h"
|
#include "qmlprofiler/qmlprofilermodelmanager.h"
|
||||||
#include "qmlprofiler/sortedtimelinemodel.h"
|
#include "qmlprofiler/sortedtimelinemodel.h"
|
||||||
#include "qmlprofiler/singlecategorytimelinemodel_p.h"
|
#include "qmlprofiler/abstracttimelinemodel_p.h"
|
||||||
|
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
#include <QSize>
|
#include <QSize>
|
||||||
@@ -64,7 +64,7 @@ struct Pixmap {
|
|||||||
|
|
||||||
class PixmapCacheModel::PixmapCacheModelPrivate :
|
class PixmapCacheModel::PixmapCacheModelPrivate :
|
||||||
public SortedTimelineModel<PixmapCacheEvent,
|
public SortedTimelineModel<PixmapCacheEvent,
|
||||||
SingleCategoryTimelineModel::SingleCategoryTimelineModelPrivate>
|
AbstractTimelineModel::AbstractTimelineModelPrivate>
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
void computeMaxCacheSize();
|
void computeMaxCacheSize();
|
||||||
@@ -83,7 +83,7 @@ private:
|
|||||||
};
|
};
|
||||||
|
|
||||||
PixmapCacheModel::PixmapCacheModel(QObject *parent)
|
PixmapCacheModel::PixmapCacheModel(QObject *parent)
|
||||||
: SingleCategoryTimelineModel(new PixmapCacheModelPrivate(),
|
: AbstractTimelineModel(new PixmapCacheModelPrivate(),
|
||||||
QLatin1String("PixmapCacheTimeLineModel"),
|
QLatin1String("PixmapCacheTimeLineModel"),
|
||||||
QLatin1String("Pixmap Cache"), QmlDebug::PixmapCacheEvent,
|
QLatin1String("Pixmap Cache"), QmlDebug::PixmapCacheEvent,
|
||||||
QmlDebug::MaximumRangeType, parent)
|
QmlDebug::MaximumRangeType, parent)
|
||||||
|
@@ -20,7 +20,7 @@
|
|||||||
#define PIXMAPCACHEMODEL_H
|
#define PIXMAPCACHEMODEL_H
|
||||||
|
|
||||||
#include "qmlprofiler/qmlprofilertimelinemodelproxy.h"
|
#include "qmlprofiler/qmlprofilertimelinemodelproxy.h"
|
||||||
#include "qmlprofiler/singlecategorytimelinemodel.h"
|
#include "qmlprofiler/abstracttimelinemodel.h"
|
||||||
#include "qmlprofiler/qmlprofilerdatamodel.h"
|
#include "qmlprofiler/qmlprofilerdatamodel.h"
|
||||||
|
|
||||||
#include <QStringList>
|
#include <QStringList>
|
||||||
@@ -29,7 +29,7 @@
|
|||||||
namespace QmlProfilerExtension {
|
namespace QmlProfilerExtension {
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
|
|
||||||
class PixmapCacheModel : public QmlProfiler::SingleCategoryTimelineModel
|
class PixmapCacheModel : public QmlProfiler::AbstractTimelineModel
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
|
@@ -20,7 +20,7 @@
|
|||||||
#include "qmldebug/qmlprofilereventtypes.h"
|
#include "qmldebug/qmlprofilereventtypes.h"
|
||||||
#include "qmlprofiler/qmlprofilermodelmanager.h"
|
#include "qmlprofiler/qmlprofilermodelmanager.h"
|
||||||
#include "qmlprofiler/sortedtimelinemodel.h"
|
#include "qmlprofiler/sortedtimelinemodel.h"
|
||||||
#include "qmlprofiler/singlecategorytimelinemodel_p.h"
|
#include "qmlprofiler/abstracttimelinemodel_p.h"
|
||||||
|
|
||||||
#include <QCoreApplication>
|
#include <QCoreApplication>
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
@@ -54,7 +54,7 @@ enum SceneGraphCategoryType {
|
|||||||
|
|
||||||
class SceneGraphTimelineModel::SceneGraphTimelineModelPrivate :
|
class SceneGraphTimelineModel::SceneGraphTimelineModelPrivate :
|
||||||
public SortedTimelineModel<SceneGraphTimelineModel::SceneGraphEvent,
|
public SortedTimelineModel<SceneGraphTimelineModel::SceneGraphEvent,
|
||||||
SingleCategoryTimelineModel::SingleCategoryTimelineModelPrivate>
|
AbstractTimelineModel::AbstractTimelineModelPrivate>
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
void addVP(QVariantList &l, QString label, qint64 time) const;
|
void addVP(QVariantList &l, QString label, qint64 time) const;
|
||||||
@@ -63,7 +63,7 @@ private:
|
|||||||
};
|
};
|
||||||
|
|
||||||
SceneGraphTimelineModel::SceneGraphTimelineModel(QObject *parent)
|
SceneGraphTimelineModel::SceneGraphTimelineModel(QObject *parent)
|
||||||
: SingleCategoryTimelineModel(new SceneGraphTimelineModelPrivate,
|
: AbstractTimelineModel(new SceneGraphTimelineModelPrivate,
|
||||||
QLatin1String("SceneGraphTimeLineModel"), tr("Scene Graph"),
|
QLatin1String("SceneGraphTimeLineModel"), tr("Scene Graph"),
|
||||||
QmlDebug::SceneGraphFrame, QmlDebug::MaximumRangeType, parent)
|
QmlDebug::SceneGraphFrame, QmlDebug::MaximumRangeType, parent)
|
||||||
{
|
{
|
||||||
@@ -150,7 +150,7 @@ const QVariantList SceneGraphTimelineModel::getEventDetails(int index) const
|
|||||||
Q_D(const SceneGraphTimelineModel);
|
Q_D(const SceneGraphTimelineModel);
|
||||||
QVariantList result;
|
QVariantList result;
|
||||||
const SortedTimelineModel<SceneGraphEvent,
|
const SortedTimelineModel<SceneGraphEvent,
|
||||||
SingleCategoryTimelineModel::SingleCategoryTimelineModelPrivate>::Range *ev =
|
AbstractTimelineModel::AbstractTimelineModelPrivate>::Range *ev =
|
||||||
&d->range(index);
|
&d->range(index);
|
||||||
|
|
||||||
{
|
{
|
||||||
|
@@ -19,7 +19,7 @@
|
|||||||
#ifndef SCENEGRAPHTIMELINEMODEL_H
|
#ifndef SCENEGRAPHTIMELINEMODEL_H
|
||||||
#define SCENEGRAPHTIMELINEMODEL_H
|
#define SCENEGRAPHTIMELINEMODEL_H
|
||||||
|
|
||||||
#include "qmlprofiler/singlecategorytimelinemodel.h"
|
#include "qmlprofiler/abstracttimelinemodel.h"
|
||||||
#include "qmlprofiler/qmlprofilermodelmanager.h"
|
#include "qmlprofiler/qmlprofilermodelmanager.h"
|
||||||
#include "qmlprofiler/qmlprofilerdatamodel.h"
|
#include "qmlprofiler/qmlprofilerdatamodel.h"
|
||||||
|
|
||||||
@@ -31,7 +31,7 @@ namespace Internal {
|
|||||||
|
|
||||||
#define timingFieldCount 16
|
#define timingFieldCount 16
|
||||||
|
|
||||||
class SceneGraphTimelineModel : public QmlProfiler::SingleCategoryTimelineModel
|
class SceneGraphTimelineModel : public QmlProfiler::AbstractTimelineModel
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
|
Reference in New Issue
Block a user