aboutsummaryrefslogtreecommitdiffstats
path: root/tools/qmlprofiler
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@theqtcompany.com>2015-10-23 17:03:14 +0200
committerUlf Hermann <ulf.hermann@theqtcompany.com>2015-10-28 16:50:08 +0000
commit3a9bfeb5ef6bfc7af65a7579db055ebdbd0d8212 (patch)
tree5350280a84ed2225bf3b10185d4f7361c35a5ed4 /tools/qmlprofiler
parentbf1ed77a2f5cab7915db1e720df0ee173190778c (diff)
QmlProfiler: Fix lookup of type strings
sizeof(QString) == sizeof(char *), but only incidentally. Change-Id: I1d39825746f5c6a74b540be7f254afbf0fb375d0 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Diffstat (limited to 'tools/qmlprofiler')
-rw-r--r--tools/qmlprofiler/qmlprofilerdata.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/qmlprofiler/qmlprofilerdata.cpp b/tools/qmlprofiler/qmlprofilerdata.cpp
index 91ffbac4a9..f0c6302c06 100644
--- a/tools/qmlprofiler/qmlprofilerdata.cpp
+++ b/tools/qmlprofiler/qmlprofilerdata.cpp
@@ -183,7 +183,7 @@ QString QmlProfilerData::getHashStringForQmlEvent(const QmlEventLocation &locati
QString QmlProfilerData::qmlRangeTypeAsString(QQmlProfilerDefinitions::RangeType type)
{
- if (type * sizeof(QString) < sizeof(RANGE_TYPE_STRINGS))
+ if (type * sizeof(char *) < sizeof(RANGE_TYPE_STRINGS))
return QLatin1String(RANGE_TYPE_STRINGS[type]);
else
return QString::number(type);
@@ -191,7 +191,7 @@ QString QmlProfilerData::qmlRangeTypeAsString(QQmlProfilerDefinitions::RangeType
QString QmlProfilerData::qmlMessageAsString(QQmlProfilerDefinitions::Message type)
{
- if (type * sizeof(QString) < sizeof(MESSAGE_STRINGS))
+ if (type * sizeof(char *) < sizeof(MESSAGE_STRINGS))
return QLatin1String(MESSAGE_STRINGS[type]);
else
return QString::number(type);