Do not assume implicit string-ish → QColor conversion
We want to mark the corresponding QColor ctor(s) explicit. Use Qt::GlobalColor or the new QColor::fromString() instead. Change-Id: I68bf75a094e6821b97682de5a0ffd975834d22d0 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
This commit is contained in:
parent
abe3b4c9b9
commit
61e3fe7fd9
@ -101,8 +101,8 @@ public:
|
|||||||
m_colorNames << (str + " " + c);
|
m_colorNames << (str + " " + c);
|
||||||
|
|
||||||
QStringList duet = c.split(' ');
|
QStringList duet = c.split(' ');
|
||||||
m_firstColor << duet[0];
|
m_firstColor << QColor::fromString(duet[0]);
|
||||||
m_secondColor << duet[1];
|
m_secondColor << QColor::fromString(duet[1]);
|
||||||
}
|
}
|
||||||
|
|
||||||
setAttribute(Qt::WA_OpaquePaintEvent, true);
|
setAttribute(Qt::WA_OpaquePaintEvent, true);
|
||||||
|
@ -3548,7 +3548,7 @@ void tst_QSettings::rainersSyncBugOnMac()
|
|||||||
void tst_QSettings::recursionBug()
|
void tst_QSettings::recursionBug()
|
||||||
{
|
{
|
||||||
QPixmap pix(10,10);
|
QPixmap pix(10,10);
|
||||||
pix.fill("blue");
|
pix.fill(Qt::blue);
|
||||||
|
|
||||||
{
|
{
|
||||||
QSettings settings(settingsPath("starrunner.ini"), QSettings::IniFormat);
|
QSettings settings(settingsPath("starrunner.ini"), QSettings::IniFormat);
|
||||||
|
@ -2180,7 +2180,7 @@ void tst_QTextEdit::setDocumentPreservesPalette()
|
|||||||
|
|
||||||
QPalette defaultPal = ed->palette();
|
QPalette defaultPal = ed->palette();
|
||||||
QPalette whitePal = ed->palette();
|
QPalette whitePal = ed->palette();
|
||||||
whitePal.setColor(QPalette::Active, QPalette::Text, "white");
|
whitePal.setColor(QPalette::Active, QPalette::Text, Qt::white);
|
||||||
|
|
||||||
|
|
||||||
QVERIFY(whitePal != ed->palette());
|
QVERIFY(whitePal != ed->palette());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user