summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qpalette.h
diff options
context:
space:
mode:
authorVolker Hilsheimer <volker.hilsheimer@qt.io>2020-08-19 12:07:20 +0200
committerVolker Hilsheimer <volker.hilsheimer@qt.io>2020-08-26 18:03:09 +0200
commit556511f9f39ddc887481e0cd5a877134ceb0da6b (patch)
tree1254a74e922f03b9ab0b0b23194c05bd8161c9c4 /src/gui/kernel/qpalette.h
parentc501e09efacb8a60deb41f85f3402f6f4c041d95 (diff)
Move the QPalette::resolveMask into the private
With 64bits, the mask is exhausted with the 21 colors x 3 color groups we have right now. In order to support accent colors, we need more palette entries. By moving the mask into the d-pointer, we can extend QPalette within the Qt 6 series, without breaking binary compatibility. The resolveMask/setResolveMask methods that take integers are documented as internals, so we can change those signatures after Qt 6.0 as well. As a side effect, setting the resolve mask on a QPalette detaches now. Setting a mask is in most cases done on the result of QPalette::resolve, which is usually detached already. And the QPalette default constructor will have to detach from the global application palette if that palette has any colors set explicitly. Task-number: QTBUG-82925 Change-Id: I1e70f1c4d0dd98303e353b91df5dba2b1fe8ba01 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Diffstat (limited to 'src/gui/kernel/qpalette.h')
-rw-r--r--src/gui/kernel/qpalette.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/gui/kernel/qpalette.h b/src/gui/kernel/qpalette.h
index 3e2786898f..8990f58512 100644
--- a/src/gui/kernel/qpalette.h
+++ b/src/gui/kernel/qpalette.h
@@ -157,8 +157,8 @@ public:
QPalette resolve(const QPalette &other) const;
using ResolveMask = quint64;
- inline ResolveMask resolveMask() const { return data.resolveMask; }
- inline void setResolveMask(ResolveMask mask) { data.resolveMask = mask; }
+ ResolveMask resolveMask() const;
+ void setResolveMask(ResolveMask mask);
private:
void setColorGroup(ColorGroup cr, const QBrush &windowText, const QBrush &button,
@@ -183,7 +183,6 @@ private:
QPalettePrivate *d;
struct Data {
- ResolveMask resolveMask{0};
ColorGroup currentGroup{Active};
};
Data data;