summaryrefslogtreecommitdiffstats
path: root/src/gui/painting/qcolor.h
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2021-06-17 08:59:51 +0200
committerUlf Hermann <ulf.hermann@qt.io>2021-06-30 10:39:06 +0200
commit1015919e8e828f886fbd15e7929fb634363ddc35 (patch)
tree8c3228738897427b4afb6ddd4baa2cf57722f2fd /src/gui/painting/qcolor.h
parentf3c9200b5c9fe5ac6d65f8480355520fa8d39bc4 (diff)
Add Qt7 TODOs for reducing the size of QColor
It could fit into QVariant's inline storage if we didn't waste so much space. Change-Id: Ie9e592a49c955b0a97a202e0bd875183396af993 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src/gui/painting/qcolor.h')
-rw-r--r--src/gui/painting/qcolor.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gui/painting/qcolor.h b/src/gui/painting/qcolor.h
index 06b264eacf..edeba6fe61 100644
--- a/src/gui/painting/qcolor.h
+++ b/src/gui/painting/qcolor.h
@@ -66,6 +66,8 @@ Q_GUI_EXPORT QDataStream &operator>>(QDataStream &, QColor &);
class Q_GUI_EXPORT QColor
{
public:
+ // ### Qt7: make this "enum Spec: quint8 {...}" and reorder the members below for tighter
+ // struct packing. QColor could fit into the inline storage of a QVariant on 32bit.
enum Spec { Invalid, Rgb, Hsv, Cmyk, Hsl, ExtendedRgb };
enum NameFormat { HexRgb, HexArgb };