diff options
author | Ulf Hermann <ulf.hermann@digia.com> | 2014-06-12 13:27:41 +0200 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@digia.com> | 2014-06-16 13:17:57 +0300 |
commit | c83e2cb3eb009a88d65ba990e5ddf53d26afd228 (patch) | |
tree | 4b08c497825156822597019b8d0acf7aad74916b | |
parent | 3c5b2dd704de1b4897b77d0e2615569d3f278250 (diff) | |
download | qt-creator-c83e2cb3eb009a88d65ba990e5ddf53d26afd228.tar.gz |
Adapt to single category per model
Change-Id: I0af479f2405a9c71602b9635e8e8ec4b1bcb9554
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
4 files changed, 8 insertions, 12 deletions
diff --git a/plugins/qmlprofilerextension/pixmapcachemodel.cpp b/plugins/qmlprofilerextension/pixmapcachemodel.cpp index fd199cab23..9e246cbea6 100644 --- a/plugins/qmlprofilerextension/pixmapcachemodel.cpp +++ b/plugins/qmlprofilerextension/pixmapcachemodel.cpp @@ -93,10 +93,9 @@ PixmapCacheModel::PixmapCacheModel(QObject *parent) d->maxCacheSize = 1; } -int PixmapCacheModel::categoryDepth(int categoryIndex) const +int PixmapCacheModel::rowCount() const { Q_D(const PixmapCacheModel); - Q_UNUSED(categoryIndex); if (isEmpty()) return 1; if (d->expanded) @@ -145,10 +144,9 @@ QString getFilenameOnly(QString absUrl) return absUrl; } -const QVariantList PixmapCacheModel::getLabelsForCategory(int category) const +const QVariantList PixmapCacheModel::getLabels() const { Q_D(const PixmapCacheModel); - Q_UNUSED(category); QVariantList result; if (d->expanded && !isEmpty()) { diff --git a/plugins/qmlprofilerextension/pixmapcachemodel.h b/plugins/qmlprofilerextension/pixmapcachemodel.h index fdf20f5195..036f3c0d49 100644 --- a/plugins/qmlprofilerextension/pixmapcachemodel.h +++ b/plugins/qmlprofilerextension/pixmapcachemodel.h @@ -55,14 +55,14 @@ public: PixmapCacheModel(QObject *parent = 0); - Q_INVOKABLE int categoryDepth(int categoryIndex) const; + int rowCount() const; int getEventRow(int index) const; Q_INVOKABLE int getEventId(int index) const; Q_INVOKABLE QColor getColor(int index) const; Q_INVOKABLE float getHeight(int index) const; - Q_INVOKABLE const QVariantList getLabelsForCategory(int category) const; + const QVariantList getLabels() const; Q_INVOKABLE const QVariantList getEventDetails(int index) const; diff --git a/plugins/qmlprofilerextension/scenegraphtimelinemodel.cpp b/plugins/qmlprofilerextension/scenegraphtimelinemodel.cpp index c4153fb740..738eecaf47 100644 --- a/plugins/qmlprofilerextension/scenegraphtimelinemodel.cpp +++ b/plugins/qmlprofilerextension/scenegraphtimelinemodel.cpp @@ -69,9 +69,8 @@ SceneGraphTimelineModel::SceneGraphTimelineModel(QObject *parent) { } -int SceneGraphTimelineModel::categoryDepth(int categoryIndex) const +int SceneGraphTimelineModel::rowCount() const { - Q_UNUSED(categoryIndex); if (isEmpty()) return 1; return 3; @@ -117,10 +116,9 @@ QString labelForSGType(int t) } } -const QVariantList SceneGraphTimelineModel::getLabelsForCategory(int category) const +const QVariantList SceneGraphTimelineModel::getLabels() const { Q_D(const SceneGraphTimelineModel); - Q_UNUSED(category); QVariantList result; if (d->expanded && !isEmpty()) { diff --git a/plugins/qmlprofilerextension/scenegraphtimelinemodel.h b/plugins/qmlprofilerextension/scenegraphtimelinemodel.h index 50e4619353..3b2abeeb7a 100644 --- a/plugins/qmlprofilerextension/scenegraphtimelinemodel.h +++ b/plugins/qmlprofilerextension/scenegraphtimelinemodel.h @@ -43,13 +43,13 @@ public: SceneGraphTimelineModel(QObject *parent = 0); - Q_INVOKABLE int categoryDepth(int categoryIndex) const; + int rowCount() const; int getEventRow(int index) const; Q_INVOKABLE int getEventId(int index) const; Q_INVOKABLE QColor getColor(int index) const; - Q_INVOKABLE const QVariantList getLabelsForCategory(int category) const; + const QVariantList getLabels() const; Q_INVOKABLE const QVariantList getEventDetails(int index) const; |