aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/qmlprofilerextension/pixmapcachemodel.cpp
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@digia.com>2014-10-28 17:39:23 +0100
committerUlf Hermann <ulf.hermann@theqtcompany.com>2014-11-21 14:50:30 +0200
commitfd09a6bed2b8b7c574e6a561f8c091de1af87d2b (patch)
tree57346ca622ba1c1b67c2e1d9a90b6d584cc05539 /plugins/qmlprofilerextension/pixmapcachemodel.cpp
parentb398ccb7387f9020f46284a139c677167b381501 (diff)
Create extension models through a factory
Like that we can drop the deferred setting of model manager and we can announce the features right away on construction. Change-Id: I8b4eb3e94046511b0e637084768e919649115e77 Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
Diffstat (limited to 'plugins/qmlprofilerextension/pixmapcachemodel.cpp')
-rw-r--r--plugins/qmlprofilerextension/pixmapcachemodel.cpp11
1 files changed, 4 insertions, 7 deletions
diff --git a/plugins/qmlprofilerextension/pixmapcachemodel.cpp b/plugins/qmlprofilerextension/pixmapcachemodel.cpp
index 21ffb912c2..c3bfc19f4c 100644
--- a/plugins/qmlprofilerextension/pixmapcachemodel.cpp
+++ b/plugins/qmlprofilerextension/pixmapcachemodel.cpp
@@ -25,16 +25,13 @@ namespace Internal {
using namespace QmlProfiler;
-PixmapCacheModel::PixmapCacheModel(QObject *parent)
- : AbstractTimelineModel(tr(QmlProfilerModelManager::featureName(QmlDebug::ProfilePixmapCache)),
+PixmapCacheModel::PixmapCacheModel(QmlProfilerModelManager *manager, QObject *parent)
+ : AbstractTimelineModel(manager,
+ tr(QmlProfilerModelManager::featureName(QmlDebug::ProfilePixmapCache)),
QmlDebug::PixmapCacheEvent, QmlDebug::MaximumRangeType, parent)
{
m_maxCacheSize = 1;
-}
-
-quint64 PixmapCacheModel::features() const
-{
- return 1 << QmlDebug::ProfilePixmapCache;
+ announceFeatures(1 << QmlDebug::ProfilePixmapCache);
}
int PixmapCacheModel::rowMaxValue(int rowNumber) const