summaryrefslogtreecommitdiff
path: root/src/plugins/qmlprofiler
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2018-01-11 13:31:58 +0100
committerUlf Hermann <ulf.hermann@qt.io>2018-01-16 09:02:57 +0000
commit77e28efad6bc5809c904edcae38b104cc2b6a620 (patch)
tree9744dae0e79cbdf929c8553a8cf6d79dbd87b69f /src/plugins/qmlprofiler
parenta4c318d5e12677395a6e4b59767f2d1300dcd6e9 (diff)
downloadqt-creator-77e28efad6bc5809c904edcae38b104cc2b6a620.tar.gz
Timeline: Use some better number types
The scale parameters are converted to single precision float anyway as soon as we do something with them. We might as well change all the methods to be single precision, too. The min/max row values should really be 64bit as 32bit values are not enough to express memory usage. Change-Id: I2b058b112286eabb1c077f7e746c48b6b99cb416 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'src/plugins/qmlprofiler')
-rw-r--r--src/plugins/qmlprofiler/memoryusagemodel.cpp2
-rw-r--r--src/plugins/qmlprofiler/memoryusagemodel.h2
-rw-r--r--src/plugins/qmlprofiler/pixmapcachemodel.cpp2
-rw-r--r--src/plugins/qmlprofiler/pixmapcachemodel.h2
-rw-r--r--src/plugins/qmlprofiler/qmlprofileranimationsmodel.cpp2
-rw-r--r--src/plugins/qmlprofiler/qmlprofileranimationsmodel.h2
-rw-r--r--src/plugins/qmlprofiler/qmlprofilerbindingloopsrenderpass.cpp4
-rw-r--r--src/plugins/qmlprofiler/qmlprofilerbindingloopsrenderpass.h2
8 files changed, 9 insertions, 9 deletions
diff --git a/src/plugins/qmlprofiler/memoryusagemodel.cpp b/src/plugins/qmlprofiler/memoryusagemodel.cpp
index 30d0da85c7..ee933c03e1 100644
--- a/src/plugins/qmlprofiler/memoryusagemodel.cpp
+++ b/src/plugins/qmlprofiler/memoryusagemodel.cpp
@@ -39,7 +39,7 @@ MemoryUsageModel::MemoryUsageModel(QmlProfilerModelManager *manager, QObject *pa
announceFeatures(Constants::QML_JS_RANGE_FEATURES ^ (1 << ProfileCompiling));
}
-int MemoryUsageModel::rowMaxValue(int rowNumber) const
+qint64 MemoryUsageModel::rowMaxValue(int rowNumber) const
{
Q_UNUSED(rowNumber);
return m_maxSize;
diff --git a/src/plugins/qmlprofiler/memoryusagemodel.h b/src/plugins/qmlprofiler/memoryusagemodel.h
index 6de54550a0..98ec40f4d5 100644
--- a/src/plugins/qmlprofiler/memoryusagemodel.h
+++ b/src/plugins/qmlprofiler/memoryusagemodel.h
@@ -53,7 +53,7 @@ public:
MemoryUsageModel(QmlProfilerModelManager *manager, QObject *parent = 0);
- int rowMaxValue(int rowNumber) const override;
+ qint64 rowMaxValue(int rowNumber) const override;
int expandedRow(int index) const override;
int collapsedRow(int index) const override;
diff --git a/src/plugins/qmlprofiler/pixmapcachemodel.cpp b/src/plugins/qmlprofiler/pixmapcachemodel.cpp
index 5af3a12402..df30349b63 100644
--- a/src/plugins/qmlprofiler/pixmapcachemodel.cpp
+++ b/src/plugins/qmlprofiler/pixmapcachemodel.cpp
@@ -38,7 +38,7 @@ PixmapCacheModel::PixmapCacheModel(QmlProfilerModelManager *manager, QObject *pa
{
}
-int PixmapCacheModel::rowMaxValue(int rowNumber) const
+qint64 PixmapCacheModel::rowMaxValue(int rowNumber) const
{
if (rowNumber == 1) {
return m_maxCacheSize;
diff --git a/src/plugins/qmlprofiler/pixmapcachemodel.h b/src/plugins/qmlprofiler/pixmapcachemodel.h
index a5161f6ed6..c645c53dea 100644
--- a/src/plugins/qmlprofiler/pixmapcachemodel.h
+++ b/src/plugins/qmlprofiler/pixmapcachemodel.h
@@ -96,7 +96,7 @@ public:
PixmapCacheModel(QmlProfilerModelManager *manager, QObject *parent = 0);
- int rowMaxValue(int rowNumber) const override;
+ qint64 rowMaxValue(int rowNumber) const override;
int expandedRow(int index) const override;
int collapsedRow(int index) const override;
diff --git a/src/plugins/qmlprofiler/qmlprofileranimationsmodel.cpp b/src/plugins/qmlprofiler/qmlprofileranimationsmodel.cpp
index 1c00071ad3..337da28fed 100644
--- a/src/plugins/qmlprofiler/qmlprofileranimationsmodel.cpp
+++ b/src/plugins/qmlprofiler/qmlprofileranimationsmodel.cpp
@@ -109,7 +109,7 @@ int QmlProfilerAnimationsModel::rowFromThreadId(int threadId) const
return (threadId == GuiThread || m_maxGuiThreadAnimations == 0) ? 1 : 2;
}
-int QmlProfilerAnimationsModel::rowMaxValue(int rowNumber) const
+qint64 QmlProfilerAnimationsModel::rowMaxValue(int rowNumber) const
{
switch (rowNumber) {
case 1:
diff --git a/src/plugins/qmlprofiler/qmlprofileranimationsmodel.h b/src/plugins/qmlprofiler/qmlprofileranimationsmodel.h
index e688bcfda6..8d10969833 100644
--- a/src/plugins/qmlprofiler/qmlprofileranimationsmodel.h
+++ b/src/plugins/qmlprofiler/qmlprofileranimationsmodel.h
@@ -51,7 +51,7 @@ public:
QmlProfilerAnimationsModel(QmlProfilerModelManager *manager, QObject *parent = 0);
- int rowMaxValue(int rowNumber) const override;
+ qint64 rowMaxValue(int rowNumber) const override;
int typeId(int index) const override;
Q_INVOKABLE int expandedRow(int index) const override;
diff --git a/src/plugins/qmlprofiler/qmlprofilerbindingloopsrenderpass.cpp b/src/plugins/qmlprofiler/qmlprofilerbindingloopsrenderpass.cpp
index 7c97296c49..f05146a09e 100644
--- a/src/plugins/qmlprofiler/qmlprofilerbindingloopsrenderpass.cpp
+++ b/src/plugins/qmlprofiler/qmlprofilerbindingloopsrenderpass.cpp
@@ -158,7 +158,7 @@ void updateNodes(const QmlProfilerRangeModel *model, int from, int to,
Timeline::TimelineRenderPass::State *QmlProfilerBindingLoopsRenderPass::update(
const Timeline::TimelineAbstractRenderer *renderer,
const Timeline::TimelineRenderState *parentState, State *oldState,
- int indexFrom, int indexTo, bool stateChanged, qreal spacing) const
+ int indexFrom, int indexTo, bool stateChanged, float spacing) const
{
Q_UNUSED(stateChanged);
Q_UNUSED(spacing);
@@ -244,7 +244,7 @@ void BindlingLoopsGeometry::allocate(QSGMaterial *material)
void BindlingLoopsGeometry::addExpandedEvent(float itemCenter)
{
- float verticalCenter = Timeline::TimelineModel::defaultRowHeight() / 2.0;
+ float verticalCenter = Timeline::TimelineModel::defaultRowHeight() / 2.0f;
Point2DWithOffset *v = vertexData() + usedVertices;
v[0].set(itemCenter, verticalCenter, -1.0f, currentY);
v[1].set(itemCenter, verticalCenter, +1.0f, currentY);
diff --git a/src/plugins/qmlprofiler/qmlprofilerbindingloopsrenderpass.h b/src/plugins/qmlprofiler/qmlprofilerbindingloopsrenderpass.h
index 292cfc9684..6f578057e2 100644
--- a/src/plugins/qmlprofiler/qmlprofilerbindingloopsrenderpass.h
+++ b/src/plugins/qmlprofiler/qmlprofilerbindingloopsrenderpass.h
@@ -43,7 +43,7 @@ public:
State *update(const Timeline::TimelineAbstractRenderer *renderer,
const Timeline::TimelineRenderState *parentState,
State *oldState, int indexFrom, int indexTo, bool stateChanged,
- qreal spacing) const;
+ float spacing) const;
protected:
QmlProfilerBindingLoopsRenderPass();
};