From e10bc709bcde23a730ba390ceae33e84cc885266 Mon Sep 17 00:00:00 2001 From: Ulf Hermann Date: Mon, 6 Jun 2016 19:51:55 +0200 Subject: 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 --- src/plugins/qmlprofiler/pixmapcachemodel.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/plugins/qmlprofiler/pixmapcachemodel.cpp') diff --git a/src/plugins/qmlprofiler/pixmapcachemodel.cpp b/src/plugins/qmlprofiler/pixmapcachemodel.cpp index 09aeb2c911..d497c1996a 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(type.detailType); + const PixmapEventType pixmapType = static_cast(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]; -- cgit v1.2.1