diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2016-11-08 18:11:36 +0100 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2016-11-09 11:55:02 +0000 |
commit | faf77fd0e55bbb7a6ef0b36b82023eed587c3b2b (patch) | |
tree | 0742c06475a35ebfb294fc5429535fd7e4d97348 /src/plugins/qmlprofiler/qmlprofilerrangemodel.h | |
parent | aaca50f705ac8f41f44991478fe11f9eb37fe0bd (diff) | |
download | qt-creator-faf77fd0e55bbb7a6ef0b36b82023eed587c3b2b.tar.gz |
Timeline: Use QRgb and a lookup table for colors
It makes no sense to return a QColor as the only things we are using
are the red, green, and blue components. Furthermore, colorFromHue()
can only generate 360 different colors which we can easily cache
instead of recalculating them on each request.
This significantly reduces the time it takes to update the timeline
render nodes.
Change-Id: I7961014364a1bec5b089285148b2e6c141a6dc7d
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'src/plugins/qmlprofiler/qmlprofilerrangemodel.h')
-rw-r--r-- | src/plugins/qmlprofiler/qmlprofilerrangemodel.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/qmlprofiler/qmlprofilerrangemodel.h b/src/plugins/qmlprofiler/qmlprofilerrangemodel.h index 1b97833335..adc68ee836 100644 --- a/src/plugins/qmlprofiler/qmlprofilerrangemodel.h +++ b/src/plugins/qmlprofiler/qmlprofilerrangemodel.h @@ -62,7 +62,7 @@ public: Q_INVOKABLE int expandedRow(int index) const override; Q_INVOKABLE int collapsedRow(int index) const override; int bindingLoopDest(int index) const; - QColor color(int index) const override; + QRgb color(int index) const override; QVariantList labels() const override; QVariantMap details(int index) const override; |