aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/qmlprofiler/pixmapcachemodel.cpp
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2016-06-06 19:51:55 +0200
committerUlf Hermann <ulf.hermann@qt.io>2016-06-10 12:43:05 +0000
commite10bc709bcde23a730ba390ceae33e84cc885266 (patch)
treeca6006c9c1d833d38aa1fab61354527205c82ac8 /src/plugins/qmlprofiler/pixmapcachemodel.cpp
parent5718f12af5ad983924a19a6033026b16df89fd2b (diff)
QmlProfiler: Provide a sane ctor for QmlEventType and use it
... in turn, make its members private, so that we don't accidentally change them. Change-Id: Ibc65b406ee341d33f69647ed1b19e1e34f5cd535 Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
Diffstat (limited to 'src/plugins/qmlprofiler/pixmapcachemodel.cpp')
-rw-r--r--src/plugins/qmlprofiler/pixmapcachemodel.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/plugins/qmlprofiler/pixmapcachemodel.cpp b/src/plugins/qmlprofiler/pixmapcachemodel.cpp
index 09aeb2c9112..d497c1996a6 100644
--- a/src/plugins/qmlprofiler/pixmapcachemodel.cpp
+++ b/src/plugins/qmlprofiler/pixmapcachemodel.cpp
@@ -163,13 +163,13 @@ QVariantMap PixmapCacheModel::details(int index) const
void PixmapCacheModel::loadEvent(const QmlEvent &event, const QmlEventType &type)
{
PixmapCacheItem newEvent;
- const PixmapEventType pixmapType = static_cast<PixmapEventType>(type.detailType);
+ const PixmapEventType pixmapType = static_cast<PixmapEventType>(type.detailType());
newEvent.pixmapEventType = pixmapType;
qint64 pixmapStartTime = event.timestamp();
newEvent.urlIndex = -1;
for (auto i = m_pixmaps.cend(), begin = m_pixmaps.cbegin(); i != begin;) {
- if ((--i)->url == type.location.filename()) {
+ if ((--i)->url == type.location().filename()) {
newEvent.urlIndex = i - m_pixmaps.cbegin();
break;
}
@@ -178,7 +178,7 @@ void PixmapCacheModel::loadEvent(const QmlEvent &event, const QmlEventType &type
newEvent.sizeIndex = -1;
if (newEvent.urlIndex == -1) {
newEvent.urlIndex = m_pixmaps.count();
- m_pixmaps << Pixmap(type.location.filename());
+ m_pixmaps << Pixmap(type.location().filename());
}
Pixmap &pixmap = m_pixmaps[newEvent.urlIndex];