Details
-
Bug
-
Resolution: Done
-
P1: Critical
-
6.4.1
-
None
-
ef379f95c7 (qt/qtbase/dev) ef379f95c7 (qt/tqtc-qtbase/dev), aa45401ff (6.4)
Description
If the brush for the same ColorRole is set twice via QPalette:setBrush(), the second change does ot cause a modification of the cacheKey.
Example code
#include <QGuiApplication> #include <QDebug> #include <QPalette> int main(int argc, char *argv[]) { QGuiApplication app(argc, argv); QPalette pal; qDebug() << pal.cacheKey(); const QBrush red(Qt::red); pal.setBrush(QPalette::All, QPalette::ButtonText, red); qDebug() << pal.cacheKey(); const QBrush green(Qt::green); pal.setBrush(QPalette::All, QPalette::ButtonText, green); qDebug() << pal.cacheKey(); return 0; }
Output when built against Qt 6.4.0 (expected)
4294967297 4294967299 4294967302
Output when built against Qt 6.4.1 (unexpected)
4294967301 21474836486 21474836486
The 6.4.1-based output shows that the second brush change does not modyfy the cacheKey. I believe that is the reason for QTCREATORBUG-28470
Reverting change https://codereview.qt-project.org/c/qt/qtbase/+/436159 from 6.4.1 makes it work again.
Attachments
Issue Links
- split from
-
QTCREATORBUG-28470 [REG Qt 6.4.0 -> 6.4.1] Arrows in UI are black (instead of white)
-
- Closed
-
- mentioned in
-
Page Loading...
For Gerrit Dashboard: QTBUG-108709 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
444654,2 | QPalette: always increase serial number when modifying | dev | qt/qtbase | Status: MERGED | +2 | 0 |
445407,2 | QPalette: always increase serial number when modifying | 6.4 | qt/qtbase | Status: MERGED | +2 | 0 |